Installation
Install ai-cli and configure API access.
Install
Or with other package managers:
API key
ai-cli requires an API key for model access. Set one of the following environment variables:
AI_GATEWAY_API_KEY
stringVercel AI Gateway key. Provides access to all supported models through a single key.
OPENAI_API_KEY
stringProvider-specific key. Use if you only need OpenAI models.
Get a gateway key from the Vercel AI Gateway dashboard.
Add this to your shell profile (~/.zshrc, ~/.bashrc, etc.) to persist across sessions.
Verify
If you see generated text, you're ready.
Requirements
Bun
1.0+requiredai-cli runs with Bun. Install from bun.sh.
API key
stringrequiredA Vercel AI Gateway key or provider-specific key.