Pipecut - Interactive Pipeline Editor
From the early days of Unix, the command shell and filter utilities have been combined by using the pipe (|) symbol, and the pipe(2) libc function / system call.
Building up an effective command line requires familiarity with common Unix utilities, knowing the types of data transformation that are available, and developing a facility with command line editing to work with data in its initial state, and gradually progress it towards the desired output format.
Pipecut tries to facilitate the development of pipelines by letting you see your data and your shell commands at the same time, eliminating the back and forth editing cycle of entering and quitting more(or less), then recalling and editing the command line. Since pipecut has an AST view of the Unix command line, it can provide shortcuts, optimizations, and do code generation that would not be possible otherwise.
Lastly, pipecut provides interactive as-you-type help (e.g. interactive highlighting of regular expressions as you type them) for some of the most common Unix commands, and will add support for more commands over time.
Pipecut needs names for certain objects, to make it easier to explain and discuss them.
cat file.txt | egrep -v 'foo' | sort
The above line is called a 'toolset' in pipecut lingo. Each component of a toolset is called a 'blade'.
Pipecut is a modal environment, like vi, but in pipecut, the tool can flow from one mode to another depending on the keys you press, without the user actively selecting the mode. Some modes are explicitly activated by the user (e.g. the Look-ahead (LA) and Regular Expression (RE) modes).
Why is it called pipecut?
One of the cuts in the name pipecut refers to the ability to quickly browse a toolset and view the state of the data at any stage of processing - cutting in to see what the pipe sees.
Another meaning of cut in pipecut's name is that the full-screen vi-like interface shows you a cut of just one screenful of data from the input file. The user can browse up and down in the file, but by default, pipecut operates on a small slice of data, which keeps the UI very snappy and responsive.
Finally, pipecut cuts down the effort to develop pipelines, and can shorten them in terms of runtime or length
- Add data transformation filters with a single keypress
- Works with every current and future Unix filter utility. (Works even better with well-known ones)
- Name toolsets you develop. Save them for use later. Share them with others.
- Use saved toolsets as Unix filters. pipecut -t toolsetname
- Modify existing blades with the intuitive dash-letter keystroke
- Delete blades from the end of your toolset with Backspace.
- Delete blades from the middle of your toolset with Delete.
- Browse the view of the data at any point in the toolset by navigating through it with the left and right cursor keys.
- Use the Lookahead (LA) mode to see which lines will be affected by the subsequent blade.
- Use the Regular Expression (RE) mode to see matches highlighted in real time as you type.
- Run your entire datafile through the standard system tools your toolset represents, with one keypress (|)
- Instantly generate a shell script equivalent to your toolset (!)
- Work in your shell first, then create a pipecut toolset with 'history | pipecut'
More information is available here: http://22.214.171.124/ (will be linked to pipecut.org soon)