aicli

Natural language → shell commands. OpenAI or Anthropic.

Install: gem install aicli (Ruby 3.0+). Command: ai.

Setup

ai config set PROVIDER=openai
ai config set OPENAI_KEY=<token>

Or ai config for the interactive setup. Config: ~/.aicli/config.

Anthropic:

ai config set PROVIDER=anthropic
ai config set ANTHROPIC_KEY=<token>

Shell history (optional — ↑ recalls the run command, not ai ...):

ai config shell
source ~/.zshrc

Usage

ai list all log files
ai 'what is my ip address'    # quote special chars
ai chat                       # multi-turn; Ctrl+d to quit
ai -s list log files          # skip Explain in menu
ai config set SILENT_MODE=true
ai config set MODEL=gpt-4o-mini
ai config set LANGUAGE=it
ai update

Development

bundle install
bundle exec bin/ai list all log files

License

MIT