@agi_inc/cli
v0.5.16
Published
Terminal-based agent interaction for AGI desktop automation
Readme
@agi_inc/cli
Terminal-based AI agent for desktop automation. Give it a task in plain English and watch it take control of your computer to get it done.
npx @agi_inc/cli "open calculator and compute 2+2"Installation
Zero-install (recommended):
npx @agi_inc/cli "your task here"Global install:
npm install -g @agi_inc/cli
agi "your task here"Homebrew (macOS/Linux):
brew install agi-inc/tap/agi
agi "your task here"Authentication
Log in with your AGI account to automatically configure your API key:
agi loginThis opens a browser-based device authorization flow. Once approved, your API key is saved to ~/.agi/credentials and used automatically.
agi logout # remove stored credentialsAlternatively, set your API key via environment variable:
export AGI_API_KEY=your_api_key
# or
export ANTHROPIC_API_KEY=your_api_keyUsage
# Basic usage
agi "Open calculator and compute 2+2"
# Use a specific model
agi "Find flights from SFO to JFK" --model claude-opus
# Verbose output (shows agent thinking)
agi "Install Node.js" --verbose
# Auto-approve confirmations
agi "Delete old files" --no-confirmWhen the agent needs approval before a destructive action, it shows a confirmation dialog:
When the agent needs more information, it prompts with a question:
Commands
| Command | Description |
|---------|-------------|
| agi "task" | Run the agent with a task |
| agi login | Authenticate via browser-based device flow |
| agi logout | Remove stored credentials |
| agi update | Check for updates and self-update |
Options
| Option | Alias | Description | Default |
|--------|-------|-------------|---------|
| --model | -m | Model to use (claude-sonnet, claude-opus) | claude-sonnet |
| --verbose | -v | Show agent thinking | false |
| --no-confirm | | Auto-approve confirmations | false |
| --help | -h | Show help | |
| --version | -V | Show version | |
Keyboard Shortcuts
While the agent is running:
| Key | Action |
|-----|--------|
| Space | Pause/Resume |
| Q | Stop |
| Ctrl+C | Cancel |
Updating
agi updateDetects your install method (npm or Homebrew) and runs the appropriate upgrade command.
How It Works
- Captures screenshots of your desktop
- Analyzes them using Claude
- Decides on and executes actions
- Repeats until the task is complete
Requirements
- Node.js 20.4.0 or later
- macOS, Linux, or Windows
- AGI API key or Anthropic API key
SDKs
- agi-python — Python SDK
- agi-node — Node.js SDK
- agi-csharp — C# SDK
License
MIT
