Project

aicli

0.0
The project is in a healthy, maintained state
ai turns natural language into runnable shell commands using OpenAI or Anthropic. Chat with the model and execute suggested commands live in your shell in one seamless flow. Install the aicli gem, then run the ai command.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

~> 1.3
~> 0.8
~> 1.16
~> 1.3
~> 0.23
>= 0.3.0
 Project Readme

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