co ai
AI coding agent in your terminal. Run one-shot prompts or start an interactive agent with full tool access.
Quick Start: Type co ai "create a FastAPI hello world app" and watch the AI write code for you.
One-Shot Mode
Run a single prompt and exit - perfect for quick code generation:
More Examples
Interactive Mode
Start without a prompt for multi-turn conversation:
Web Server Mode
Start a web server to interact with the agent via browser:
Web Interface Features
Configuration
Model Selection
Default model: co/claude-opus-4-5
Max Iterations
Control how many times the agent can iterate:
Default: 100 iterations
Combined Options
Available Tools
The AI agent has access to powerful tools:
File Operations
- • Read files
- • Write new files
- • Edit existing files
- • Search with glob/grep
Code Execution
- • Run bash commands
- • Execute tests
- • Install packages
- • Git operations
Planning
- • Create task lists
- • Track progress
- • Plan implementation
- • Design architecture
Sub-Agents
- • Explore codebase
- • Plan features
- • Run specialized tasks
- • Parallel execution
Common Use Cases
1. Rapid Prototyping
Generates complete working code in seconds
2. Bug Fixing
Analyzes code, identifies issue, applies fix
3. Adding Features
Understands existing code, adds feature cleanly
4. Code Migration
Refactors across multiple files consistently
5. Test Generation
Generates test cases with proper fixtures and assertions
Best Practices
Command Reference
| Option | Short | Default | Description |
|---|---|---|---|
| --port | -p | 8000 | Web server port |
| --model | -m | co/claude-opus-4-5 | Model to use |
| --max-iterations | -i | 100 | Maximum iterations |
