The Minimalist's AI: Shell Commands at the Speed of Thought
You know the moment. You’re staring at the terminal trying to remember whether find wants -name before or after the path, or which docker flag filters by label this week. You give up, tab over to ChatGPT or Claude, paste the answer back into your terminal, and run something you only half understand.
I got tired of that shuffle. The model already knows the answer; I just didn’t want to alt-tab to a chat window to get it. I wanted the LLM to live inside the terminal, where the work actually happens—and I wanted it to be careful about what it sent over the wire on my behalf.
So I wrote ai.
Native, not intrusive
Most AI terminal tools fall into one of two camps: they’re either dumb wrappers that hand you a string and call it a day, or they’re invasive enough to want your full shell history and every file in sight. I wanted something in between, leaning toward the boring side.
It’s written in Go, so it’s a single binary with no runtime to install and nothing to babysit.
If the terminal is your cockpit,
aiis the co-pilot that hands you the right switch at the right time—but only after you’ve verified it.
The loop is deliberately small:
- Request — type what you want in plain English.
- Review — a TUI shows the suggested command and a one-line explanation.
- Run —
Enterruns it,Esccancels.
That’s it. No agent loops, no surprise side effects.

Security as a first-class citizen
I work in IT operations, so I’m twitchy about data leaks. Shipping your whole environment off to an LLM every time you want to grep something is not okay, and I didn’t want to build a tool I wouldn’t use myself.
So ai is redaction-first. Before a request leaves your machine, anything that looks like a credential gets rewritten to [redacted]: dotenv files, PEM and SSH keys, cloud credential directories (.aws, .gcp, .azure, .kube), Terraform state, shell history, WireGuard configs, and a longer list besides.
The context it does send is intentionally thin: OS, shell, hostname, current working directory, a top-level file listing (your .gitignore is honored), and a git branch summary with counts. File contents, environment variables, command history, git diffs—none of that ever goes over the wire.
Beyond simple commands
I didn’t want this to be just a one-shot prompt box, so it grew a few modes that match how I actually work.
| Mode | Command | Best for |
|---|---|---|
| Command | ai "request" | Quick one-liners (e.g. “list all .go files over 1MB”) |
| Chat | ai -c "question" | Q&A about your environment or general tech advice |
| Pipe | cat error.log | ai explain the error | Debugging logs or processing stdout with AI context |
The power of the pipe
Pipe mode is the one I lean on most. Pipe a stack trace, a ps aux, or a noisy log into ai and that stdin gets glued onto your prompt, so the model has the actual mess in front of it instead of guessing. The review TUI still works because input is read from /dev/tty—a one-line detail that cost me about an hour to get right.

Chat mode
Sometimes I don’t want a command—I want an explanation. ai -c flips into a free-form Q&A mode. If the answer happens to imply a runnable command, the TUI quietly offers to run it. If it’s just an explanation, it stays out of your way.

Technical guts and extensibility
The project is more than just a wrapper—or at least, it’s a wrapper I had fun writing:
- TUI built with Bubble Tea and Lip Gloss. The Charm folks have made writing a terminal UI in Go genuinely pleasant.
- API through OpenRouter, so you can point it at whatever model you like—Claude, GPT, Gemini, or an open-weight model—without being married to one provider. The default is
anthropic/claude-haiku-4.5, which is fast and cheap enough that I don’t think about the cost. - Secrets via 1Password’s
opCLI, so the API key never has to sit in plaintext on disk. If you’d rather just export$OPENROUTER_API_KEY, that works too.
Final verdict
ai isn’t trying to replace the developer. It’s trying to take the friction out of remembering syntax so you can spend your brain on the actual problem. It’s the tool I wanted on my own machine, and now it lives there.
Want to try it? Binaries are available for macOS (Apple Silicon) and Linux (x86_64 and ARM64).
Homebrew:
brew install hra42/tap/ai
Or the install script, which picks the right binary for your OS/arch and verifies the SHA-256 against checksums.txt:
curl -fsSL https://ai.hra42.lol/install | sh
Source is on GitHub. Issues and PRs welcome.