rai-cli-1.1.2 is not a library.
Install
cargo:
curl:
|
From source:
Quick start
1. First-time setup:
Pick a provider, enter your API key, and choose a default model.
2. Run a prompt:
3. Pipe input:
|
4. Run a task file:
5. Auto-approve tool calls:
Usage
rai [OPTIONS] <PROMPT|FILE>
| Command | Description |
|---|---|
rai "prompt" |
Run an ad-hoc prompt |
rai run task.md |
Run a task file |
rai plan task.md |
Preview task structure before execution |
rai create task.md |
Create a task file interactively |
rai start |
First-time setup wizard |
rai config |
Open configuration menu |
rai profile list |
List configuration profiles |
| Flag | Description |
|---|---|
-y, --yes |
Auto-approve all tool calls |
-m, --model <MODEL> |
Override AI model (e.g. gpt-4o, kimi-k2) |
--profile <NAME> |
Select configuration profile |
-s, --silent |
No follow-up input |
--no-tools |
Disable tool calling |
--bill |
Print API and token usage summary |
--detail |
Show detailed runtime logs |
--think |
Ask provider to show thinking chain |
-v, --verbose |
Debug logging |
Configuration
Config files live in ~/.config/rai/:
| File | Purpose |
|---|---|
config.toml |
Default profile config |
config.<profile>.toml |
Named profile config |
API keys are stored in ~/.local/share/rai/credentials (mode 0600). Use --keyring to store in the OS keyring instead.
Supported providers: OpenAI, Anthropic, Google, Poe, xAI, OpenRouter, Ollama, DeepSeek, MiniMax, Kimi, ZAI, Bedrock, and any OpenAI-compatible endpoint.
Documentation
- Quick Start - installation and first run
- Task Files - markdown runbooks, variables, and subtasks
- Tools & Permissions - built-in tools and permission system
- Providers & Models - provider setup and model selection
- Advanced Flags - CLI flags and options
Development
# Build
# Run tests
# Lint
Note: On Linux, if using
--keyring, install:libdbus-1-dev,pkg-config
License
See LICENSE for details.