Show HN: Aish – Warp-style AI command suggestions in 300 lines of Zsh Developer oguzbilgic released Aish, a 300-line Zsh plugin that provides Warp-style AI command suggestions after every shell command, predicting the next command based on failure status, output, and project context. The tool supports Anthropic's Claude Haiku (default), OpenRouter models, or fully local Ollama, and requires only Zsh 5.3+ and curl. Aish is open-source on GitHub and installable via a one-line curl command or popular plugin managers. Warp-style inline AI command suggestions for Zsh in ~300 lines of shell. After every command, aish looks at what you ran, whether it failed, what it printed, and your project context git status, files, history , then predicts the most likely next command as grey inline text. Tab accepts it. Pause mid-command and it completes what you started. One file, ~300 lines of zsh. Dependencies: zsh 5.3+ and curl. Works in any terminal. Nothing is ever executed on your behalf. curl -fsSL https://raw.githubusercontent.com/oguzbilgic/aish/main/install.sh | sh That clones to ~/.zsh-aish and appends one source line to ~/.zshrc . Then set a provider and open a new terminal: export ANTHROPIC API KEY=sk-ant-... Claude Haiku default , or export OPENROUTER API KEY=sk-or-... any OpenRouter model, or nothing: falls back to Ollama at localhost:11434 fully local A new terminal window is required, not source ~/.zshrc : aish wraps the session in script 1 to capture command output. Manual install / plugin managers Keep aish last in .zshrc , after compinit , autosuggestions and your prompt. manual git clone https://github.com/oguzbilgic/aish ~/.zsh-aish source ~/.zsh-aish/aish.plugin.zsh oh-my-zsh git clone https://github.com/oguzbilgic/aish ${ZSH CUSTOM:-~/.oh-my-zsh/custom}/plugins/aish plugins= ... aish last in the list zinit zinit light oguzbilgic/aish antidote ~/.zsh plugins.txt oguzbilgic/aish zplug zplug "oguzbilgic/aish" Persistent history makes suggestions much better: HISTFILE=~/.zsh history; HISTSIZE=100000; SAVEHIST=100000 setopt share history inc append history extended history hist ignore space | Key | Action | |---|---| | Tab, →, Ctrl-Space | accept the suggestion Tab falls through to normal completion when nothing is shown | | Alt-A or Ctrl-X A | ask for a suggestion now | | anything else | dismiss | Set before the source line. | Variable | Default | | |---|---|---| | AISH PROVIDER | auto | anthropic , openrouter , ollama ; auto picks by which key is set | | AISH MODEL | claude-haiku-4-5-20251001 | Anthropic model | | AISH OPENROUTER MODEL | qwen/qwen-2.5-coder-32b-instruct | OpenRouter slug, e.g. qwen/qwen3-coder | | AISH OLLAMA MODEL | qwen2.5-coder:7b | Ollama model | | AISH ON SUCCESS | 1 | 0 = only suggest after a command fails | | AISH DEBOUNCE | 0.4 | seconds of typing pause before completing | | AISH MIN CHARS | 2 | minimum buffer length to complete | | AISH MAX OUT | 60 | lines of command output sent | | AISH DEBUG | | set to log every request/response to /tmp/aish.log | preexec / precmd hooks record the command and exit status. A shell never sees its children's stdout, so output is read back from the script transcript or tmux capture-pane inside tmux . The request runs in a background process and is delivered through zle -F ; the ghost text is drawn via POSTDISPLAY , the same primitive zsh-autosuggestions uses aish yields when autosuggestions is already showing something . Typing bumps a generation counter and starts a debounce timer; if you pause, the partial buffer is sent and only the remainder is shown. The prompt is small: last command, exit status, last 60 lines of output, 20 history entries, ls of the cwd, git status --short , and which project files exist package.json , Cargo.toml , ... . One request per command with Haiku costs a fraction of a cent. Everything listed above goes to the provider you configure, after every command. Prefix a command with a space hist ignore space to keep it out of history. Use Ollama for a fully local setup. AISH DEBUG=1 shows you exactly what is sent. Remove the source line from ~/.zshrc and rm -rf ~/.zsh-aish . pip install asciinema curl -Lo agg https://github.com/asciinema/agg/releases/latest/download/agg-$ uname -m -unknown-linux-gnu && chmod +x agg python3 demo/drive rec.py scripted keystrokes; demo/stub.zsh stubs the backend for deterministic timing ./agg --theme dracula --font-size 18 --idle-time-limit 1.5 /tmp/demo.cast aish-demo.gif MIT