AI-powered zsh command generation with reviewable, risk-scored shell suggestions.
hi-shell turns natural language into shell commands and shows the result as ghost text in your current zsh line. Press Tab to accept the suggestion, edit it if needed, then press Enter yourself.
It is not an autonomous shell agent, terminal emulator, or chat UI. It keeps command generation inside your normal terminal workflow while leaving execution under your control.
Shell commands are often easy to describe and annoying to spell out. hi-shell handles the translation without taking over the terminal.
- Stay in zsh instead of switching to a chat window.
- Review every generated command before it can run.
- Accept suggestions into the real command line, not a separate UI.
- Revise a suggestion or ask what it does before running it.
- Block clearly catastrophic commands by default.
- Natural-language command generation from your shell.
- Ghost-text suggestions powered by zsh ZLE widgets.
- Tab-to-accept flow; Enter only runs after you accept.
safe,warn, andblockedrisk scoring.- Built-in support for OpenAI and DeepSeek APIs.
- OpenAI-compatible provider configuration.
- Optional shell context and filtered history.
- Clean install and uninstall with one managed
.zshrcblock.
curl -fsSL https://raw.githubusercontent.com/longyijdos/hi-shell/main/scripts/install.sh | sh
exec zshMake sure ~/.local/bin is in your PATH.
From source:
git clone https://github.com/longyijdos/hi-shell.git
cd hi-shell
./scripts/install.sh
exec zshPrerequisites for source installs: Go 1.22+, git, and zsh.
OpenAI is the default provider:
export OPENAI_API_KEY="sk-..."
hi-shell config set provider openai
hi-shell config set openai.api_key_env OPENAI_API_KEY
hi-shell config set openai.model gpt-4.1-miniDeepSeek is also supported:
export DEEPSEEK_API_KEY="sk-..."
hi-shell config set provider deepseek
hi-shell config set deepseek.api_key_env DEEPSEEK_API_KEY
hi-shell config set deepseek.model deepseek-v4-flashSecrets stay in environment variables. The config file stores environment variable names, not API keys.
See Configuration for the full config reference.
Type a natural-language request with the hi prefix:
hi list go filesPress Enter to generate a suggestion. If the command looks right, press Tab to accept it into your shell input line. Press Enter again to run it.
Use the prefix key, Ctrl-] by default, to revise, ask about, edit, or dismiss the current suggestion. See Usage and Keybindings for details.
hi-shell never runs generated commands automatically.
The shell plugin only inserts a suggestion after you accept it. You still review the final command and press Enter yourself. Local risk scoring classifies suggestions as safe, warn, or blocked; clearly catastrophic commands such as rm -rf / are blocked by default.
See Risk Scoring for the detailed model.
hi-shell uninstall
exec zshTo remove all hi-shell files, including config:
hi-shell uninstall --purge
exec zshMIT

