Convert Figma logo to code with AI

akavel logoup

Ultimate Plumber is a tool for writing Linux pipes with instant live preview

8,221
128
8,221
28

Top Related Projects

2,155

A TUI system monitor written in Rust

26,263

Glances an Eye on your system. A top/htop alternative for GNU/Linux, BSD, Mac OS and Windows operating systems.

19,111

A monitor of resources

4,055

Terminal-based CPU stress and monitoring utility

2,744

A terminal based graphical activity monitor inspired by gtop and vtop

9,759

Yet another cross-platform graphical process/system monitor.

Quick Overview

"up" is a command-line tool designed to help users interactively explore and analyze text-based data. It allows for quick and efficient data manipulation, filtering, and visualization directly in the terminal, making it particularly useful for working with log files, CSV data, and other structured text formats.

Pros

  • Intuitive and interactive interface for data exploration
  • Supports various data formats and operations (filtering, sorting, aggregation)
  • No need for complex scripting or programming for basic data analysis tasks
  • Lightweight and fast, suitable for both small and large datasets

Cons

  • Limited to text-based data formats
  • May require some learning curve for users unfamiliar with command-line tools
  • Not as feature-rich as full-fledged data analysis tools or programming languages
  • Dependency on terminal capabilities for advanced visualizations

Getting Started

To get started with "up", follow these steps:

  1. Install "up" using Go:

    go install github.com/akavel/up@latest
    
  2. Run "up" on a sample file:

    up sample.log
    
  3. Use the interactive interface to explore and analyze your data. Some basic commands:

    • /pattern to filter lines
    • |field1,field2 to select specific fields
    • >field to sort by a field
    • ? for help and more commands

For more detailed instructions and advanced usage, refer to the project's GitHub repository: https://github.com/akavel/up

Competitor Comparisons

2,155

A TUI system monitor written in Rust

Pros of ytop

  • More visually appealing interface with colorful graphs and charts
  • Provides a wider range of system metrics, including network and disk usage
  • Cross-platform support (Linux, macOS, Windows)

Cons of ytop

  • Higher resource usage due to more complex UI and features
  • Less focused on a single task compared to up's simplicity
  • Requires more screen space to display all information effectively

Code Comparison

up:

func (u *UI) Draw() {
    u.screen.Clear()
    u.drawTitle()
    u.drawProgress()
    u.drawHelp()
    u.screen.Show()
}

ytop:

fn draw(&mut self) -> Result<()> {
    self.terminal.draw(|f| {
        let chunks = Layout::default()
            .direction(Direction::Vertical)
            .constraints([Constraint::Percentage(50), Constraint::Percentage(50)].as_ref())
            .split(f.size());
        self.draw_cpu(f, chunks[0]);
        self.draw_mem(f, chunks[1]);
    })?;
    Ok(())
}

The code comparison shows that ytop uses a more complex drawing system with layouts and constraints, while up has a simpler drawing approach. This reflects the difference in UI complexity between the two projects.

26,263

Glances an Eye on your system. A top/htop alternative for GNU/Linux, BSD, Mac OS and Windows operating systems.

Pros of Glances

  • More comprehensive system monitoring with a wide range of metrics
  • Cross-platform support (Linux, macOS, Windows)
  • Web-based interface and REST API for remote monitoring

Cons of Glances

  • More complex setup and configuration
  • Higher resource usage due to extensive monitoring capabilities
  • Steeper learning curve for users

Code Comparison

Glances (Python):

from glances import __version__, psutil
import argparse

def main():
    # Initialize Glances
    core = GlancesCore()
    # Start monitoring
    core.run()

Up (Go):

package main

import (
    "fmt"
    "os"
    "github.com/akavel/up/terminal"
)

func main() {
    term := terminal.New()
    defer term.Restore()
    // Main loop
}

Summary

Glances is a more feature-rich system monitoring tool with cross-platform support and remote monitoring capabilities. It offers a comprehensive view of system resources but requires more setup and resources. Up, on the other hand, is a simpler, lightweight tool focused on real-time command output visualization. It's easier to use for quick tasks but lacks the extensive monitoring features of Glances. The code comparison shows that Glances is written in Python and has a more complex structure, while Up is written in Go and has a simpler implementation.

19,111

A monitor of resources

Pros of btop

  • More comprehensive system monitoring with CPU, memory, network, and processes
  • Highly customizable interface with themes and layout options
  • Cross-platform support (Linux, macOS, FreeBSD, OpenBSD)

Cons of btop

  • Larger codebase and more complex installation process
  • Higher system resource usage due to more features
  • Steeper learning curve for configuration and customization

Code Comparison

up:

func main() {
    flag.Parse()
    if flag.NArg() == 0 {
        log.Fatal("Error: please provide a command to run")
    }
    cmd := exec.Command(flag.Arg(0), flag.Args()[1:]...)
    // ... (additional code)
}

btop:

int main(int argc, char **argv) {
    (void)argc;
    (void)argv;
    Runner::startup();
    Config::loadConfig();
    Input::init();
    // ... (additional code)
}

Summary

btop offers a more feature-rich system monitoring experience with extensive customization options, while up focuses on simplicity and ease of use for running and restarting commands. btop's comprehensive approach comes at the cost of increased complexity and resource usage, whereas up maintains a lightweight footprint and straightforward functionality.

4,055

Terminal-based CPU stress and monitoring utility

Pros of s-tui

  • Provides real-time system monitoring with a graphical interface
  • Offers stress testing capabilities for CPU and memory
  • Includes temperature monitoring for various system components

Cons of s-tui

  • More complex to use and set up compared to up
  • Requires additional dependencies and system access for full functionality
  • May consume more system resources due to its comprehensive monitoring features

Code Comparison

s-tui (Python):

def get_cpu_freq(self):
    cpu_freq = psutil.cpu_freq()
    return OrderedDict([
        ('Current', cpu_freq.current),
        ('Min', cpu_freq.min),
        ('Max', cpu_freq.max)
    ])

up (Go):

func (u *UI) Draw() {
    u.screen.Clear()
    u.drawBorder()
    u.drawContent()
    u.screen.Show()
}

Summary

s-tui is a comprehensive system monitoring tool with a graphical interface, offering real-time data and stress testing capabilities. It provides more detailed information but requires more setup and resources. up, on the other hand, is a simpler command-line tool focused on displaying and manipulating piped input, making it more lightweight and easier to use for specific text-processing tasks. The choice between them depends on the user's specific needs for system monitoring versus text manipulation.

2,744

A terminal based graphical activity monitor inspired by gtop and vtop

Pros of gotop

  • More comprehensive system monitoring, including CPU, memory, disk, and network usage
  • Customizable interface with color schemes and layout options
  • Active development with regular updates and bug fixes

Cons of gotop

  • Higher resource usage due to more extensive monitoring features
  • Steeper learning curve for configuration and customization
  • Requires more dependencies and system access for full functionality

Code Comparison

up:

func main() {
    termbox.Init()
    defer termbox.Close()
    // ... (simplified main loop)
}

gotop:

func main() {
    app := tview.NewApplication()
    pages := tview.NewPages()
    // ... (more complex setup with multiple widgets)
    if err := app.SetRoot(pages, true).Run(); err != nil {
        panic(err)
    }
}

Summary

up is a simpler, lightweight tool focused on basic process monitoring, while gotop offers a more feature-rich system monitoring experience. up is easier to set up and use out of the box, but gotop provides more detailed information and customization options for power users. The code comparison shows that gotop has a more complex structure to support its additional features, while up maintains a simpler codebase for its focused functionality.

9,759

Yet another cross-platform graphical process/system monitor.

Pros of bottom

  • More feature-rich, offering detailed system monitoring including CPU, memory, network, and processes
  • Cross-platform support for Linux, macOS, and Windows
  • Actively maintained with frequent updates and improvements

Cons of bottom

  • Larger and more complex codebase, potentially harder to contribute to or customize
  • Requires more system resources due to its comprehensive monitoring capabilities
  • Steeper learning curve for users due to more advanced features and options

Code Comparison

bottom (Rust):

pub fn get_cpu_data_list(&self) -> &[CpuData] {
    &self.cpu_data
}

up (Go):

func (u *UI) drawChart(buf *bytes.Buffer, width int) {
    // Chart drawing logic
}

Summary

bottom is a more comprehensive system monitoring tool with cross-platform support and active development. It offers detailed insights into various system metrics but comes with increased complexity and resource usage. up, on the other hand, is a simpler, lightweight tool focused on visualizing Unix pipes, making it easier to use and modify for specific needs. The choice between them depends on whether you need in-depth system monitoring or a quick way to visualize data streams.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

up - the Ultimate Plumber

up is the Ultimate Plumber, a tool for writing Linux pipes in a terminal-based UI interactively, with instant live preview of command results.

The main goal of the Ultimate Plumber is to help interactively and incrementally explore textual data in Linux, by making it easier to quickly build complex pipelines, thanks to a fast feedback loop. This is achieved by boosting any typical Linux text-processing utils such as grep, sort, cut, paste, awk, wc, perl, etc., etc., by providing a quick, interactive, scrollable preview of their results.

Usage

Download up for Linux   |   ArchLinux: aur/up   |   FreeBSD: pkg install up   |   macOS: brew install up   |   Other OSes

To start using up, redirect any text-emitting command (or pipeline) into it — for example:

$ lshw |& ./up

then:

  • use PgUp/PgDn and Ctrl-[←]/Ctrl-[→] for basic browsing through the command output;
  • in the input box at the top of the screen, start writing any bash pipeline; then press Enter to execute the command you typed, and the Ultimate Plumber will immediately show you the output of the pipeline in the scrollable window below (replacing any earlier contents)
    • For example, you can try writing: grep network -A2 | grep : | cut -d: -f2- | paste - - — on my computer, after pressing Enter, the screen then shows the pipeline and a scrollable preview of its output like below:

         | grep network -A2 | grep : | cut -d: -f2- | paste - -
         Wireless interface      Centrino Advanced-N 6235
         Ethernet interface      RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
      
    • WARNING: Please be careful when using it! It could be dangerous. In particular, writing "rm" or "dd" into it could be like running around with a chainsaw. But you'd be careful writing "rm" anywhere in Linux anyway, no?

  • when you are satisfied with the result, you can press Ctrl-X to exit the Ultimate Plumber, and the command you built will be written into up1.sh file in the current working directory (or, if it already existed, up2.sh, etc., until 1000, based on Shlemiel the Painter's algorithm). Alternatively, you can press Ctrl-C to quit without saving.
  • If the command you piped into up is long-running (in such case you will see a tilde ~ indicator character in the top-left corner of the screen, meaning that up is still waiting for more input), you may need to press Ctrl-S to temporarily freeze up's input buffer (a freeze will be indicated by a # character in top-left corner), which will inject a fake EOF into the pipeline; otherwise, some commands in the pipeline may not print anything, waiting for full input (especially commands like wc or sort, but grep, perl, etc. may also show incomplete results). To unfreeze back, press Ctrl-Q.

Additional Notes

  • The pipeline is passed verbatim to a bash -c command, so any bash-isms should work.
  • The input buffer of the Ultimate Plumber is currently fixed at 40 MB. If you reach this limit, a + character should get displayed in the top-left corner of the screen. (This is intended to be changed to a dynamically/manually growable buffer in a future version of up.)
  • MacOSX support: I don't have a Mac, thus I have no idea if it works on one. You are welcome to try, and also to send PRs. If you're interested in me providing some kind of official-like support for MacOSX, please consider trying to find a way to send me some usable-enough Mac computer. Please note I'm not trying to "take advantage" of you by this, as I'm actually not at all interested in achieving a Mac otherwise. (Also, trying to commit to this kind of support will be an extra burden and obligation on me. Knowing someone out there cares enough to do a fancy physical gesture would really help alleviate this.) If you're serious enough to consider this option, please contact me by email (mailto:czapkofan@gmail.com) or keybase (https://keybase.io/akavel), so that we could try to research possible ways to achieve this. Thanks for understanding!
  • Prior art: I was surprised no one seemed to write a similar tool before, that I could find. It should have been possible to write this since the dawn of Unix already, or earlier! And indeed, after I announced up, I got enough publicity that my attention was directed to one such earlier project already: Pipecut. Looks interesting! You may like to check it too! (Thanks @TronDD.)
  • Other influences: I don't remember the fact too well already, but I'm rather sure that this must have been inspired in big part by The Bret Victor's Talk(s).

Future Ideas

  • I have quite a lot of ideas for further experimentation of development of up, including but not limited to:
    • RIIR (once I learn enough of Rust... at some point in future... maybe...) — esp. to hopefully make up be a smaller binary (and also to maybe finally learn some Rust); though I'm somewhat afraid if it might ossify the codebase and make harder to develop further..? ...but maybe actually converse?...
    • Maybe it could be made into an UI-less, RPC/REST/socket/text-driven service, like gocode or Language Servers, for integration with editors/IDEs (emacs? vim? VSCode?...) I'd be especially interested in eventually merging it into Luna Studio; RIIR may help in this. (Before this, as a simpler approach, multi-line editing may be needed, or at least left&right scrolling of the command editor input box. Also, some kind of jumping between words in the command line; readline's Alt-b & Alt-f?)
    • Make it possible to capture output of already running processes! (But maybe that could be better made as a separate, composable tool! In Rust?)
    • Adding tests... (ahem; see also #1) ...also write --help...
    • Making it work on Windows, somehow? Also, obviously, would be nice to have some CI infrastructure enabling porting it to MacOSX, BSDs, etc., etc...
    • Integration with fzf and other TUI tools? I only have some vague thoughts and ideas about it as of now, not even sure how this could look like.
    • Adding more previews, for each | in the pipeline; also forking of pipelines, merging, feedback loops, and other mixing and matching (though I'd strongly prefer if Luna was to do it eventually).
  • If you are interested in financing my R&D work, contact me by email at: czapkofan@gmail.com, or on keybase.io as akavel. I suppose I will probably be developing the Ultimate Plumber further anyway, but at this time it's purely a hobby project, with all the fun and risks this entails.

— Mateusz Czapliński
October 2018

PS. The UP logo was conceived and generously sponsored by Thoai Nguyen and GPU Exchange, with a helping hand from Many Pixels.