aish Adds Inline AI Command Suggestions to Zsh
Summary
aish is a single-file Zsh plugin of roughly 300 lines that displays an AI-predicted next command as grey inline text after each command, or completes a partially typed command after a pause. It considers the previous command, its exit status, up to 60 lines of output, 20 history entries, the current directory, Git status, and the presence of common project files. Pressing Tab, the right arrow, or Ctrl-Space accepts a suggestion; suggestions are never executed automatically, and Alt-A or Ctrl-X A requests one immediately. The plugin requires Zsh 5.3+ and curl, works in any terminal, and is installed by cloning the repository and adding a source line to .zshrc; a new terminal window is required because it wraps the session with script(1) to capture output. It can use Anthropic's Claude Haiku by default, an OpenRouter model, or Ollama at localhost:11434 for a fully local setup. Background requests are delivered through zle -F and rendered with Zsh's POSTDISPLAY, while a debounce timer and generation counter prevent stale completions from replacing newer input. The project warns that the listed command and project data are sent to the configured provider after every command; users can inspect requests with AISH_DEBUG or use Ollama locally, and a leading space can keep a command out of history when hist_ignore_space is enabled.