Back to browse
GitHub Repository

Bunsh - replace shell commands with bun scripts easily

2 starsRust

Replace shell commands with bun shell typescript scripts

by aagamd·Jun 1, 2026·2 points·0 comments

AI Analysis

●●SolidCozySolve My Problem

Shell history manipulation for script iteration is genuinely clever DX.

Strengths
  • History editing lets you press ↑ to iterate on scripts like REPL commands
  • Bun's shell module enables real JS and shell command interop in one script
  • XDG-compliant storage with timestamps makes scripts findable later
Weaknesses
  • Requires Rust compilation, no prebuilt binaries available yet
  • Niche appeal limited to Bun users who already prefer scripts over shell
Target Audience

Developers who write shell scripts and use Bun

Similar To

rust-script · just · task

Post Description

I am very bad at remembering shell command options, so I often prefer to use scripts. But shell commands are nice because 1) I can just press ↑ to iterate 2) scripts need a name and location, which is hard to think of 3) they make it so easy to interact with files!

bunsh aims to bridge the cap. It's a little utility that drops you into $EDITOR and lets you write a script. When you finish, the script is executed and you can see the output in your shell. bunsh can also edit your shell history so that when you press ↑ you see `bunsh <some-script-you-were-working-on>`

It solves painpoint 1) and 2) from above by collapsing the typical `vim/hx <some-script>` and `node/python <some-script>` into just `bunsh` and then ↑ for each further iteration. Bun handles 3) because of its shell (https://bun.com/docs/runtime/shell) module, which lets you interoperate between shell commands and JS (so e.g., you can use cat)

Similar Projects

Noclaw

One-liner shell wrapper, but GitHub's full boilerplate page obscures actual functionality.

lucalanziani
103mo ago