Analysis updated 2026-05-18
Turn a manual terminal session into a reusable bash script automatically.
Document the exact working steps of a task without writing a script by hand.
Share a clean setup script with a teammate after figuring out the steps live.
| oscarpastry/trapsh | atelico/gdstyle | athxrvx/spear | |
|---|---|---|---|
| Stars | 17 | 17 | 17 |
| Language | Rust | Rust | Rust |
| Setup difficulty | easy | easy | moderate |
| Complexity | 2/5 | 2/5 | 2/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Needs a separate shell-hook setup step after installing the binary for the supported shell.
trapsh is a command-line tool that records what you type in your terminal and turns it into a clean, reusable script. The idea is that instead of writing a script from scratch, you just do the work normally in your terminal while trapsh runs in the background, and when you are done it hands you a ready-to-use script containing only the commands that worked. The tool filters out noise automatically. If you mistype a command, run something that fails, or repeat the same command twice, trapsh strips those out of the final output. What remains is a standardized bash script file you can run again later or share with someone else. You can also preview what the script will look like before you stop the recording session, and you can pass a flag to save the unfiltered version if you want to see everything including the failed commands. It works with several shells: fish, bash, zsh, and PowerShell. The workflow is three commands: trapsh start to begin recording, run your work normally, then trapsh stop to write the output file. You can choose the output filename or let it default to trapsh_out.sh. Installation is available in two ways. Pre-built binaries for Linux, macOS, and Windows are available on the releases page and require no additional software to run. Alternatively, if you have Rust installed on your machine, you can build and install it from the source code with a single command. After installation, a separate setup step installs the shell hooks that let trapsh observe your session. The README also includes a short debugging section for the common case where the tool is installed but the terminal cannot find it, with fixes for each supported shell.
A command-line tool that records a terminal session and turns the working commands into a clean, reusable script.
Mainly Rust. The stack also includes Rust.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.