shell-buddy: Generate Commands in Your Existing Shell
shell-buddy v0.1.0 turns // prompts into editable command suggestions in Zsh, Bash and PowerShell, with a separate confirmation before execution.
Topics: ai, software-engineering, shell
Contents (4)
shell-buddy v0.1.0 is released. It is a native-shell AI command assistant I built to turn natural-language requests into editable command suggestions in Zsh, Bash and PowerShell.
Start a line with // and describe what you want to do. A suggestion appears below the current input area. Press Enter once to put it into the command line, inspect or edit it, then press Enter again to execute it in the current shell. v0.1.0 release
Stay in the shell you already use
shell-buddy starts where ordinary terminal work happens. Regular commands work as usual; only // at the beginning of a line enters the AI suggestion flow. There is no separate chat interface to switch to.
That choice also determines execution. The generated command goes into Zsh’s ZLE, Bash’s Readline or PowerShell’s PSReadLine input buffer before the current shell runs it. Commands such as cd, variables and subsequent commands remain part of the existing session, rather than losing their state in a separate child shell. Interaction and shell integration
This release focuses on turning an intention into a command. It does not take over an entire terminal task or autonomously execute commands, inspect their results and choose the next action.
Leave room for judgment between the two presses of Enter
Separating a suggestion from its execution is an important boundary in shell-buddy.
After the first Enter, the command is still editable. Change a path, adjust an option or cancel it. Execution happens only on the second Enter, keeping the inspection step in the command line.
Two presses of Enter provide an opportunity to check the result. They do not guarantee correctness or create a security sandbox. Commands that delete, overwrite, change permissions or operate on remote systems still need to be understood before they run.
This follows the point I made in Use AI, But Don't Be Ignorant: AI can help write something without taking over judgment or responsibility.
Cache, rules, then a model
A model request is not necessary for every input. shell-buddy checks a local cache, then rules for explicit intentions, before using the selected model profile.
The cache stores only commands the user has accepted, with a limit of 256 entries. Rules handle common intentions they can recognize explicitly. When a model is needed, suggestions stream through an OpenAI-compatible interface. Cache and rule hits do not require a model call, but that does not mean arbitrary natural-language requests work offline. Configuration and behavior reference
Models can be local or cloud-hosted. A local model requires a separately prepared and running service. A cloud provider requires attention to the context included in requests and the provider’s data practices.
A small tool with specific requirements
shell-buddy is written in Zig and distributed as a single executable. The tool itself does not require Python or Node.js. It starts a process for an AI editing session rather than running a persistent daemon. A local model service is separate and must run independently. Project overview
v0.1.0 includes packages for macOS Apple Silicon, macOS Intel, Linux x86_64 and Windows x86_64. Shell requirements are Zsh 5.8+, Bash 5+, or PowerShell 7.4+ with PSReadLine 2.3.6+. The old Bash bundled with macOS is not supported.
The initial release packages are unsigned and not notarized. The installer checks SHA256SUMS from the same release, but a checksum is not a publisher signature. Inspect the download source and installer before using them, and do not treat system security warnings as a step to ignore. Installation guide
shell-buddy provides a specific entry point: use natural language when you need help writing a command, then continue working in the shell you know. Source code, release packages and documentation are available in the GitHub repository.