cd /news/ai-tools/show-hn-aish-warp-style-ai-command-s… · home topics ai-tools article
[ARTICLE · art-124157] src=github.com ↗ pub= topic=ai-tools verified=true sentiment=↑ positive

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.

read3 min views1 publishedSep 9, 2026
Show HN: Aish – Warp-style AI command suggestions in 300 lines of Zsh
Image: Michielbdejong (auto-discovered)

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. 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

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.

git clone https://github.com/oguzbilgic/aish ~/.zsh-aish
source ~/.zsh-aish/aish.plugin.zsh

git clone https://github.com/oguzbilgic/aish ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/aish
plugins=(... aish)          # last in the list

zinit light oguzbilgic/aish

oguzbilgic/aish

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 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 , 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

── more in #ai-tools 4 stories · sorted by recency
── more on @oguzbilgic 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/show-hn-aish-warp-st…] indexed:0 read:3min 2026-09-09 ·