MCPcopy Index your code
hub / github.com/elkowar/pipr

github.com/elkowar/pipr @v0.8

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.8 ↗ · + Follow
78 symbols 195 edges 8 files 1 documented · 1% updated 47d agov0.0.16 · 2021-11-06★ 5439 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Pipr

Pipr is a commandline pipe-building tool, written in Rust!

Pipr can automatically evaluate the pipeline you're editing in the background, showing you the results as you go. This makes writing complex sed and awk chains a lot easier, as you'll immediately see what they do.

Because this could be dangerous, (imagine typing rm ./*.txt to delete all text files, but it already being executed at rm ./*, deleting all files in your working directory), Pipr uses bubblewrap to execute your command in an isolated, read-only environment, making it safe to use. I wont give any guarantees, but you should be good :D.

To allow for even more efficiency, Pipr features a command history and a bookmark system, allowing you to quickly go back to previously worked on pipelines or look at how you did something before.

It also features a snippet-system, allowing you to define custom snippets that can be inserted with the press of a button. These can be used to insert common stuff like sed -r 's///g', even allowing you to specify where the cursor should be placed after inserting the snippet.

Showcase

showcase

Usage

Just start pipr!

Help is available in pipr by pressing F1.

Autoeval mode, propably the most important feature, can be toggled by pressing F2.

In the textfield, use Alt+Enter to insert a newline. These will be removed when evaluating, so you don't need to add any \es to the end of your lines.

Pipr will store it's history and bookmarks as well as a configuration file in ~/.config/pipr.

Dependencies

Currently, Pipr uses bubblewrap to execute your command in an isolated environment, preventing most (but maybe not all, I won't give you any guarantees) dangers like accidentally deleting something while you're typing a command.

This means that you'll need to have bubblewarp somewhere on your PATH, or you'll have to use the unsafe-mode by passing the no-isolation flag.

Troubleshooting

If there are problems executing any command, your isolated environment might be missing some necessary folders. You can adjust which directories are mounted into the isolated environment in the pipr.toml config-file in ~/.config/pipr.

To make sure this is the problem, try running unsafe-mode (by passing --no-isolation). In this mode, your commands get executed directly without a layer of isolation, so be cautious to not do rm ./ or something. This could delete your stuff.

Building

You'll need to have the Rust toolchain installed.

Pipr is currently built with Rust nightly - I like to live dangerous ;D.

$ git clone https://gitlab.com/Elkowar/pipr.git
$ cd pipr
$ cargo build --release
$ chmod +x ./target/release/pipr

To install, move the pipr binary to somewhere on your $PATH.

Core symbols most depended-on inside this repo

len
called by 32
src/commandlist.rs
apply_event
called by 28
src/lineeditor.rs
current_line
called by 14
src/lineeditor.rs
push
called by 13
src/commandlist.rs
content_to_commandentry
called by 10
src/lineeditor.rs
set_content
called by 8
src/lineeditor.rs
current_line_mut
called by 8
src/lineeditor.rs
content_str
called by 7
src/lineeditor.rs

Shape

Method 45
Function 21
Class 8
Enum 4

Languages

Rust100%

Modules by API surface

src/lineeditor.rs22 symbols
src/commandlist.rs16 symbols
src/app.rs12 symbols
src/command_evaluation.rs10 symbols
src/ui.rs7 symbols
src/pipr_config.rs5 symbols
src/snippets.rs3 symbols
src/main.rs3 symbols

For agents

$ claude mcp add pipr \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact