{"id":13539481,"url":"https://github.com/elkowar/pipr","last_synced_at":"2025-05-16T06:07:23.090Z","repository":{"id":41065098,"uuid":"273879977","full_name":"elkowar/pipr","owner":"elkowar","description":"A tool to interactively write shell pipelines.","archived":false,"fork":false,"pushed_at":"2025-05-03T16:00:10.000Z","size":1982,"stargazers_count":505,"open_issues_count":12,"forks_count":13,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-03T16:48:13.672Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elkowar.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-21T10:16:37.000Z","updated_at":"2025-05-03T15:59:44.000Z","dependencies_parsed_at":"2024-01-14T04:45:13.837Z","dependency_job_id":"a902d8be-02f5-4441-8da9-b78234a9558f","html_url":"https://github.com/elkowar/pipr","commit_stats":{"total_commits":124,"total_committers":4,"mean_commits":31.0,"dds":"0.12096774193548387","last_synced_commit":"51bdfac9ef7678a9d42241f698618362458c6eb8"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elkowar%2Fpipr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elkowar%2Fpipr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elkowar%2Fpipr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elkowar%2Fpipr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elkowar","download_url":"https://codeload.github.com/elkowar/pipr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254478190,"owners_count":22077676,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest"],"created_at":"2024-08-01T09:01:26.496Z","updated_at":"2025-05-16T06:07:18.064Z","avatar_url":"https://github.com/elkowar.png","language":"Rust","funding_links":[],"categories":["Rust","Security \u0026 Auditing"],"sub_categories":[],"readme":"# Pipr\nPipr is a commandline pipe-building tool, written in Rust!\n\nPipr can automatically evaluate the pipeline you're editing in the background,\nshowing you the results as you go. \nThis makes writing complex `sed` and `awk` chains a lot easier, \nas you'll immediately see what they do.\n\nBecause this _could_ be dangerous,\n(imagine typing `rm ./*.txt` to delete all text files, \nbut it already being executed at `rm ./*`, deleting all files in your working directory),\nPipr uses [bubblewrap](https://github.com/containers/bubblewrap) to execute your command\nin an isolated, read-only environment, making it safe to use. I wont give any guarantees,\nbut you _should_ be good :D.\n\nTo allow for even more efficiency, \nPipr features a command history and a bookmark system, \nallowing you to quickly go back to previously worked on pipelines \nor look at how you did something before.\n\nIt also features a snippet-system, allowing you to define custom snippets \nthat can be inserted with the press of a button.\nThese can be used to insert common stuff like `sed -r 's///g'`, \neven allowing you to specify where the cursor should be placed after inserting the snippet.\n\nYou can even look up documentation and help of your commands on the fly.\nSimply hover your cursor over the desired command and press `F5`.\nYou can then choose between different documentation-options to look at.\nYou can add your own options (for example [tldr](https://tldr.sh/)) in the config file\nin the `[help_viewers]` section.\n\n## Showcase\n![showcase](showcase.gif)\n\n## Installing\n[![Packaging status](https://repology.org/badge/vertical-allrepos/pipr.svg)](https://repology.org/project/pipr/versions)\n\n### Using the static binary\nIf none of the listed installation-options are available to you, \nyou can simply use the static binary provided on the \n[releases page](https://gitlab.com/Elkowar/pipr/-/releases).\nThis _should_ work on most unix-based systems.\n\n### Arch Linux: Using the AUR\nPipr is available on the AUR, so you can simply install it using your favourite AUR-helper:\n```sh\n$ yay -S pipr-git\n```\nor for a binary:\n```sh\n$ yay -S pipr-bin\n```\n\n### Using Cargo\nIf you have a Rust-setup and have `cargo` installed, you can install pipr using cargo:\n```sh\n$ cargo install pipr\n```\n\n\n## Usage\nJust start `pipr`!\n\nHelp is available in `pipr` by pressing F1.\n\n### Basics\nYou can evaluate a command by pressing enter. \n\nThere is also the **autoeval mode**: Enabled by simply pressing `F2`, this mode runs your command after every keypress.\n\nThe textfield works like you would expect, supporting `Ctrl+A`, `Ctrl+E` to jump to the start / end of the line,\n`Ctrl+U` to clear the whole text-field, and `Alt+Enter` to insert a newline.\n\n### History and Bookmarks\nPipr keeps a history of your commands, through which you can cycle using `Ctrl+P` and `Ctrl+N`. \nYou can also look at the whole History by pressing `F4`.\nIn autoeval mode, you're not pressing Enter that often, so pipr might loose some parts of history.\nIf you want to avoid that, you can enter \"paranoid history mode\" by pressing `F3`, \nin which Pipr will save any command that successfully runs into the history.\n\nIf you _really_ like a command you worked on, you can also *bookmark* it by pressing `Ctrl+S`.\nYou can look through all bookmarked commands by pressing `Ctrl+B`.\n\n### Snippets\nA lot of times, you'll type the same things over and over again, for example `awk '{print $...}'`, `sed 's/.../.../g'`.\nTo make this more efficient, pipr supports *snippets*: By pressing `Ctrl+V`, \nyou can open a menu of all your configured snippets. Just choose one by pressing it's respective key, \nand it will be inserted at your cursor, placing your cursor where it is supposed to.\nYou can configure your own snippets in the config file!\n\n### Helpviewers\nEver worked on a long pipeline, and suddenly forgot that one flag you _really_ need?\nNo problem, just hover your cursor over the command and press `F5`.\nThis will open a menu, giving you the option to open the commands help-output or man-page.\nYou can also configure more help-viewers in the config-file.\n\n### Outputviewers\nIf you need to inspect your commands output a bit more deeply, \npipr's built-in output window might not be sufficient.\nThat's not a problem, because you can open the output in a pager of your liking.\nSimply press `F6` and choose your outputviewer.\nThese are also configurable, so you can add more specific things like [fx](https://github.com/antonmedv/fx).\n\n### Output caching\nIf your command uses the output of a slow command, or maybe the result of a http-request, \nrerunning that command with every keypress might not be a good idea.\nFor this, you can hover over any `|` symbol and press `F7` to cache everything up to that pipe. \nThis way, it will not be rerun unless you change it.\n\n(This is especially important if you're using an external API with rate-limiting!)\n\n### Tab completion\nWell,... pipr has it. Never forget your filenames ever again!\n\n### Configuration file\nPipr's configuration is stored in `~/.config/pipr/pipr.toml`.\nYou can add your own output-viewers, help-viewers, snippets and much more here. \nAlso, configure things like enabling autoeval-mode by default.\n\nIf you accidentally removed something from the config, fear not: \npipr can print out it's well-commented default config if you pass it the `--config-reference` flag.\n\n#### Finish_hook\nthe finish hook (configured in the config-file) is a command that will be executed after you close pipr, \nand will get the finished bash command line piped into stdin.\nThis can be used to pipe your work into xclip, storing it in your clipboard, \nthus making it possible to quickly paste it into the terminal.\n\n\n## Terminal integration\nIn the `shell_integration/` folder in this repository you'll find some scripts for different interactive shells.\nThese allow you to call pipr from the terminal with a simple keypress, \ninserting your current line-buffer into pipr.\nIf you're using fish, it will even put the final command back into your terminal's linebuffer after closing pipr.\n\nTo use these, simply put the lines from the respective file into your `.bashrc` or `config.fish` file.\n\n__Keymappings__  \n*Fish:* Ctrl+Alt+a  \n*Bash:* Alt+a\n\n## Dependencies\nPipr uses [bubblewrap](https://github.com/containers/bubblewrap)\nto execute your command in an isolated environment, \npreventing most (but maybe not all, I won't give you any guarantees) dangers \nlike accidentally deleting something while you're typing a command.\n\nThis means that you'll need to have bubblewrap somewhere on your `PATH`,\nor you'll have to use the unsafe-mode by passing the `no-isolation` flag.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felkowar%2Fpipr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felkowar%2Fpipr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felkowar%2Fpipr/lists"}