Convert natural language into a shell command via Claude CLI.
clai cmd "list all files in the current directory"
clai cmd "find all Python files modified today"Note: This feature is not yet fully implemented.
Ask Claude a question with terminal context (cwd + shell).
clai ask "How do I find large files?"
clai ask --context "git status\nmake test" "What should I run next?"Note: This feature is not yet fully implemented.
Get suggestions for the current prefix. Falls back to shell history when the history daemon is unavailable. With an empty prefix, returns the cached AI suggestion.
clai suggest "git st" # Top suggestion
clai suggest --limit 5 "git" # Up to 5 suggestions
clai suggest --json "git" # JSON output (includes risk field)Query command history stored in the clai database. By default, it uses the current session ID.
clai history # Recent commands (current session)
clai history git # Commands starting with "git"
clai history --global # Across all sessions
clai history --cwd /tmp # Filter by working directory
clai history --status success
clai history --format jsonEnable or disable suggestion UX globally (config) or for the current session.
clai off
clai on
clai off --session
clai on --sessionInstall shell integration by writing a hook file and sourcing it from your rc file.
clai install
clai install --shell=zsh
clai install --shell=bash
clai install --shell=fishRemove shell integration lines from your rc file.
clai uninstallPrint the shell integration script to stdout and generate a session ID.
Use this if you prefer eval in your rc file instead of clai install.
eval "$(clai init zsh)"
clai init fish | sourceGet or set configuration values in ~/.clai/config.yaml.
clai config
clai config suggestions.enabled
clai config suggestions.enabled falseShow status for Claude CLI, shell integration, session ID, and the history daemon.
clai statusPrint version, git commit, and build date.
clai version- History daemon (
claid): gRPC daemon that stores history and serves session-aware suggestions. It is started byclai-shimwhen available. Ifclaidis not installed,clai suggestfalls back to your shell history.