Skip to content

Terminal-based agent interaction for AGI desktop automation

Notifications You must be signed in to change notification settings

agi-inc/agi-cli

Repository files navigation

@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.

AGI CLI running a task

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 login

This opens a browser-based device authorization flow. Once approved, your API key is saved to ~/.agi/credentials and used automatically.

agi logout   # remove stored credentials

Alternatively, set your API key via environment variable:

export AGI_API_KEY=your_api_key
# or
export ANTHROPIC_API_KEY=your_api_key

Usage

# 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-confirm

When the agent needs approval before a destructive action, it shows a confirmation dialog:

AGI CLI confirmation dialog

When the agent needs more information, it prompts with a question:

AGI CLI question dialog

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

AGI CLI paused state

Updating

agi update

agi update output

Detects your install method (npm or Homebrew) and runs the appropriate upgrade command.

How It Works

  1. Captures screenshots of your desktop
  2. Analyzes them using Claude
  3. Decides on and executes actions
  4. Repeats until the task is complete

AGI CLI task completed

Requirements

  • Node.js 20.4.0 or later
  • macOS, Linux, or Windows
  • AGI API key or Anthropic API key

SDKs

License

MIT

About

Terminal-based agent interaction for AGI desktop automation

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •