The CAI CLI provides a powerful, terminal-based interface for interacting with cybersecurity AI agents through a traditional command-line environment, optimized for automation, scripting, and integration workflows.
CCCCCCCCCCCCC ++++++++ ++++++++ IIIIIIIIII
CCC::::::::::::C ++++++++++ ++++++++++ I::::::::I
CC:::::::::::::::C ++++++++++ ++++++++++ I::::::::I
C:::::CCCCCCCC::::C +++++++++ ++ +++++++++ II::::::II
C:::::C CCCCCC +++++++ +++++ +++++++ I::::I
C:::::C +++++ +++++++ +++++ I::::I
C:::::C ++++ ++++ I::::I
C:::::C ++ ++ I::::I
C:::::C + +++++++++++++++ + I::::I
C:::::C +++++++++++++++++++ I::::I
C:::::C +++++++++++++++++ I::::I
C:::::C CCCCCC +++++++++++++++ I::::I
C:::::CCCCCCCC::::C +++++++++++++ II::::::II
CC:::::::::::::::C +++++++++ I::::::::I
CCC::::::::::::C +++++ I::::::::I
CCCCCCCCCCCCC ++ IIIIIIIIII
Cybersecurity AI (CAI), v0.6.0
Bug bounty-ready AI
CAI>
The CLI is the foundational interface for CAI, offering:
- ⚡ Lightweight Execution: Minimal resource overhead for maximum performance
- 🤖 Direct Agent Interaction: Immediate access to all CAI agents
- 📝 Command System: 30+ built-in commands for complete control
- 🔄 Automation Ready: Perfect for scripting and CI/CD pipelines
- 🧩 Queue System: Batch processing with command chaining
- ⚙️ Parallel Execution: Run multiple agents simultaneously
- 💾 Session Management: Save and restore conversations
- 🔧 Shell Integration: Direct shell command execution
| Feature | CLI | TUI |
|---|---|---|
| Scripting/Automation | ✅ Full support | ❌ Interactive only |
| CI/CD Integration | ✅ Perfect fit | ❌ Not suitable |
| Resource Usage | ✅ Minimal | |
| Batch Processing | ✅ Queue system | |
| Visual Feedback | ✅ Rich UI | |
| Multi-agent Workflows | ✅ Parallel mode | ✅ Visual split-screen |
| Remote/Headless | ✅ SSH friendly | |
| Learning Curve | ✅ Intuitive |
Use CLI for: Automation, scripting, CI/CD, headless servers, SSH sessions, batch processing
Use TUI for: Interactive testing, visual multi-agent workflows, exploratory analysis, real-time monitoring
Launch the CLI:
caiWith an initial prompt:
cai --prompt "scan 192.168.1.1 for open ports"With YAML configuration:
cai --yaml agents.yamlBasic workflow:
- Launch CAI:
cai - Configure API key in
.envor environment - Select a model:
/model alias1 - Choose an agent:
/agent redteam_agent - Type your prompt and press Enter
See the Getting Started Guide for detailed instructions.
Over 30 built-in commands organized by category:
- Agent Management:
/agent,/parallel - Memory & History:
/memory,/history,/compact,/flush,/load,/merge,/save - Environment:
/env(cataloglist/get/set/default),/help var(per-variable help),/workspace,/virtualization - Tools & Integration:
/mcp,/shell - Utilities:
/model,/graph,/cost,/help
All commands support aliases for faster typing (e.g., /a for /agent, /h for /help).
Learn more: Commands Reference
Run multiple agents simultaneously:
# Configure parallel agents
/parallel add redteam_agent
/parallel add bug_bounter_agent
/parallel add blueteam_agent
# Execute on all agents
/parallel run "analyze target.com"Or use YAML configuration:
cai --yaml agents.yaml --prompt "test application security"Learn more: Advanced Usage
Execute shell commands directly:
# Using /shell command
/shell nmap -sV 192.168.1.1
# Using $ shortcut
$ whoami
# Using /$ alias
/$ ls -laSave and restore conversations:
# Save current session
/save pentest_session.json
# Save as Markdown report
/save findings_report.md
# Load previous session
/load pentest_session.jsonAdvanced memory features for long-term context:
# Enable episodic memory
CAI_MEMORY=episodic cai
# Save memory snapshot
/memory save "web app vulnerabilities found"
# List saved memories
/memory list
# Apply memory to current session
/memory apply mem_12345- Python: 3.9 or higher
- Terminal: Any modern terminal (bash, zsh, fish)
- API Key: Valid
ALIAS_API_KEY(get one from Alias Robotics) - Operating System: Linux, macOS, Windows (WSL recommended)
- ✅ bash (Linux/macOS/WSL)
- ✅ zsh (macOS/Linux)
- ✅ fish (Linux/macOS)
- ✅ PowerShell (Windows)
- ✅ SSH sessions
- ✅ tmux/screen
- ✅ CI/CD environments
CAI CLI
├── Core Components
│ ├── run_cai_cli - Main interactive loop
│ ├── AgentManager - Agent lifecycle management
│ ├── CommandRegistry - Command routing and execution
│ └── SessionRecorder - Session logging and persistence
├── Command System
│ ├── AgentCommand - Agent switching and management
│ ├── ParallelCommand - Multi-agent coordination
│ ├── MCPCommand - External tool integration
│ ├── ConfigCommand - Environment management
│ └── 25+ additional commands
└── Integration Layer
├── PromptToolkit - Input handling and completion
├── FuzzyCompleter - Intelligent autocompletion
├── QueueManager - Batch execution
└── ShellExecutor - Direct shell access
For technical details, see the Architecture Overview.
# Set up CTF environment
export CTF_NAME="hackableii"
export CTF_CHALLENGE="web_challenge"
export CAI_AGENT_TYPE="redteam_agent"
# Launch with auto-execution
cai --prompt "analyze the challenge and find the flag"# Configure bug bounty workflow
/agent bug_bounter_agent
/model alias1
# Execute reconnaissance
Perform full reconnaissance on bugcrowd.example.com#!/bin/bash
# security-check.sh
export CAI_MAX_TURNS=10
export CAI_PRICE_LIMIT=5.0
export CAI_TRACING=false
cai --prompt "scan $CI_TARGET for OWASP Top 10 vulnerabilities ; generate JSON report" > security-report.json# agents.yaml
agents:
- name: subdomain_scanner
agent_type: redteam_agent
model: alias1
- name: port_scanner
agent_type: network_security_analyzer_agent
model: alias1
- name: vulnerability_checker
agent_type: bug_bounter_agent
model: alias1
# Execute
cai --yaml agents.yaml --prompt "full reconnaissance on target.com"| Command | Description | Example |
|---|---|---|
/agent list |
List all agents | /agent list |
/agent <name> |
Switch agent | /agent redteam_agent |
/model <name> |
Change model | /model alias1 |
/env list |
Catalog + live values | /env list |
/help |
Show help | /help agent |
/save <file> |
Save session | /save session.json |
/load <file> |
Load session | /load session.json |
/cost |
Show costs | /cost |
| Shortcut | Action |
|---|---|
Tab |
Autocomplete commands |
↑/↓ |
Navigate command history |
Ctrl+C |
Interrupt execution |
Ctrl+L |
Clear screen |
Ctrl+D |
Exit CAI |
Ctrl+Z |
Suspend process |
Ctrl+X Ctrl+E |
Open editor |
See the complete Commands Reference for all commands.
CAI CLI can be configured via:
- Environment Variables:
CAI_MODEL,CAI_AGENT_TYPE, etc. .envFile: Place in your working directory/envcommand: Runtime changes via catalog (/env set …,/env default, …)- YAML Files: Agent and workflow definitions
Example .env:
ALIAS_API_KEY=ak_live_1234567890abcdef
CAI_MODEL=alias1
CAI_AGENT_TYPE=redteam_agent
CAI_DEBUG=1
CAI_PRICE_LIMIT=10.0
CAI_MAX_TURNS=50For all configuration options, see Configuration Guide.
- Getting Started - First steps and basic usage
- Commands Reference - Essential commands
- Commands Reference - Complete command list
- Advanced Usage - Automation, scripting, and advanced features
- Configuration Guide - All environment variables
- Architecture Overview - Technical architecture
- TUI Documentation - Terminal UI alternative
- Documentation: https://docs.aliasrobotics.com
- GitHub Issues: https://github.com/aliasrobotics/cai/issues
- Discord: Join our community
- Twitter: @aliasrobotics
- 📖 Getting Started Guide - Learn the basics
- 📚 Commands Reference - Master all commands
- 🚀 Advanced Usage - Unlock powerful features
Last updated: November 2025 | CAI CLI v0.6+