-
-
Notifications
You must be signed in to change notification settings - Fork 119
CLI Reference
Complete reference for all cortex commands. Commands are organized into nested domain groups.
| Command | Description |
|---|---|
| agent | Agent management, chat, and execution |
agent chat |
Interactive streaming chat session (TUI) |
agent tui |
Full-featured terminal UI with tool panel |
agent exec <prompt> |
One-shot non-interactive agent execution |
agent list |
List all registered agents |
agent show <id> |
Show agent configuration details |
agent create <name> |
Create a new agent |
agent update <id> |
Update an existing agent |
agent delete <id> |
Delete an agent |
agent select <id> |
Set as default/active agent |
agent inspect <id> |
Inspect agent identity (soul/user/memory) |
agent clone <source> <name> |
Clone an existing agent |
agent import <source> |
Import from URL or marketplace |
agent sessions |
List recent chat sessions |
agent eval |
Run agent evaluation suites |
agent reflect |
Inspect consolidation patterns |
agent lint |
Audit agent configs, tools, plugins, prompts |
agent voice |
Manage voice mode |
| server | HTTP server management |
server start |
Start HTTP + WebSocket server with Web UI |
server stop |
Stop background server |
server restart |
Restart background server |
| sandbox | Code execution sandbox |
sandbox run <file> |
Execute a code file with optional LLM auto-fix |
| daemon | Background process management |
daemon start |
Start supervisor daemon in background |
daemon stop |
Stop daemon processes |
daemon restart |
Restart daemon processes |
daemon run |
Run supervisor in foreground |
daemon status |
Show daemon health |
| config | Configuration management |
config get <key> |
Read a dot-notation config key |
config set <key> <value> |
Set a config value (JSON5 auto-parsed) |
config unset <key> |
Remove a config key |
config list |
Pretty-print full config (secrets redacted) |
config validate |
Validate config against schema |
| db | Database management |
db migrate |
Initialize or migrate all databases |
| self | Self-management |
self update |
Check for and apply updates |
| setup | Run the setup wizard |
| memory | Search and manage memory |
| vault | Encrypted credential vault |
| policy | Security policy rules |
| soul | Agent identity and personality templates |
| plugins | Install and manage plugins |
| marketplace | Browse plugin/agent marketplace |
| models | List and configure LLM models |
| jobs | Manage scheduled jobs |
| git | Git workspace operations |
| github | GitHub integration |
| mcp | MCP server management |
mcp chrome |
Manage Chrome Bridge browser automation |
mcp a2a |
A2A Protocol agent card, skills, connections |
mcp gateway |
MCP Gateway management |
| service | Micro-service CRUD and system service install |
service list |
List micro-services |
service show <id> |
Show service details |
service create <name> |
Create a new service |
service update <id> |
Update service configuration |
service delete <id> |
Delete a service |
service start <name> |
Start a service |
service stop <name> |
Stop a service |
service install |
Install as system service |
service uninstall |
Remove system service |
| node | Manage distributed nodes |
| swarm | Manage distributed agent swarm |
| channels | Manage channel adapters |
| hooks | Manage pipeline hooks |
| triggers | Manage event triggers |
| workflow | Workflow engine operations |
| import | Import data from other platforms |
| qm | Quartermaster tool orchestration learning |
| mqm | Model Quartermaster (MQM) intelligence |
| eval | Run agent evaluation suites |
| eval memory | Run memory benchmark suite |
| projects | Project management |
| desktop | Desktop automation |
| login | Authenticate with username+password or API token |
| logout | Clear stored authentication |
| whoami | Show current authenticated user and teams |
| users | Manage instance users (list/create/disable/enable) |
| teams | Manage teams (list/create) |
| debug | Live introspection: sessions, health, metrics, memory |
| log | Logging configuration and viewing |
| compliance | Compliance management |
| memori | Persistent checkpointing and agent-state survival |
Backward compatibility: Old flat commands (
cortex chat,cortex serve,cortex restart,cortex start,cortex stop) have been removed as of v0.51.0. Usecortex agent chat,cortex server start,cortex daemon start|stop|restartdirectly.
cortex agent chat # Start a new chat session (TUI)
cortex agent chat --model gpt-4o # Override the active model
cortex agent chat --agent my-agent # Use a specific agent
cortex agent chat --resume sess_abc123 # Resume an existing session
cortex agent chat --no-stream # Disable streaming output
cortex agent tui # Full-featured terminal UI
cortex agent exec "fix the eslint config" # One-shot non-interactive
cortex agent exec --json "summarize" # JSON output for CI/scripting
cortex agent exec --max-turns 5 "..." # Limit tool-call rounds
cortex agent exec -o result.md "..." # Write response to file
cortex agent list # List all agents
cortex agent show my-agent # Show agent details
cortex agent create "Security Auditor" # Create a new agent
cortex agent update my-agent # Update an existing agent
cortex agent delete my-agent # Delete an agent
cortex agent select my-agent # Set as default agent
cortex agent inspect my-agent # Inspect agent identity
cortex agent clone my-agent "Clone" # Clone an existing agent
cortex agent import https://... # Import from marketplace/URL
cortex agent sessions # List recent sessions
cortex agent eval # Run evaluation suites
cortex agent reflect # Inspect consolidation
cortex agent lint # Audit agent config
cortex agent voice # Manage voice settingsAvailable during interactive chat sessions:
| Command | Description |
|---|---|
/model <name> |
Switch model mid-session |
/compact |
Trigger context compaction |
/status |
Show session info |
/clear |
Clear chat history |
/save [file] |
Save transcript to file |
/load <file> |
Load transcript from file |
/export |
Export session as markdown |
/theme <name> |
Switch theme (dark/light/contrast) |
/diff |
Show last file change as diff |
/review |
Review pending tool approvals |
/plan |
Enter planning mode |
/help |
List all commands and keybindings |
/! <cmd> |
Execute bash command in sandbox |
/exit, /quit
|
Exit chat session |
cortex server start # http://127.0.0.1:3000 (foreground)
cortex server start --port 8080 --host 0.0.0.0
cortex server start -d # Run in background (daemon mode)
cortex server start -d -r # Restart background server
cortex server start -s # Stop background server
cortex server stop # Stop background server
cortex server restart # Restart background servercortex daemon start # Start supervisor in background
cortex daemon stop # Stop all daemon processes
cortex daemon restart # Restart daemon processes
cortex daemon run # Run supervisor in foreground
cortex daemon status # Show daemon healthThree daemon processes: Validator (policy enforcement), Executor (tool execution), Scheduler (cron + memory consolidation). Auto-restart with exponential backoff (min(2^n × 1s, 30s)).
cortex sandbox run script.py # Execute with language inference
cortex sandbox run script.sh --lang bash # Explicit language
cortex sandbox run broken.py --fix # Auto-fix loop on failure
cortex sandbox run broken.py --fix --max-fix 10
cortex sandbox run script.py --no-sandbox # Skip Docker, use subprocesscortex config get defaultAgent # Read a config value
cortex config set defaultAgent "assistant" # Set a config value
cortex config set agents.myAgent.model "gpt-4" # Dot-notation nesting
cortex config set providers.openai.apiKey "sk-..." # Auto-encrypted storage
cortex config unset agents.oldAgent # Remove a key
cortex config list # Pretty-print (secrets redacted)
cortex config validate # Check schema compliancecortex self update --check # Check for available updates
cortex self update # Apply latest update
cortex self update --channel pre-release # Use pre-release channel
cortex self update --status # Show current/latest version
cortex self update --rollback # Rollback to previous versioncortex db migrate # Initialize or migrate databasescortex mcp chrome start # Start Chrome Bridge (browser automation)
cortex mcp chrome stop # Stop Chrome Bridge
cortex mcp chrome status # Show Chrome Bridge status
cortex mcp chrome tools # List available browser tools
cortex mcp a2a card # Show A2A agent card
cortex mcp a2a skills # List A2A skills
cortex mcp a2a remote # List remote A2A agents
cortex mcp gateway status # MCP Gateway health
cortex mcp gateway health # MCP Gateway health checkcortex setup # Re-run the setup wizardConfigures provider credentials, default model, agent identity, and optional features (embedding, voice, channels).
cortex login # Interactive username+password login
cortex login --token <token> # Login with an API token
cortex login --host http://localhost:11434 # Specify server URLAuth token stored in ~/.cortex/auth.json.
cortex logout # Clear stored authentication tokencortex whoami # Show current user, teams, and rolecortex users list # List all users (instance admin)
cortex users create <username> <password> # Create a new user (instance admin)
cortex users disable <userId> # Disable a user (instance admin)
cortex users enable <userId> # Enable a disabled user (instance admin)cortex teams list # List your teams
cortex teams create <name> # Create a team (instance admin)Live introspection tools for debugging active agent sessions and system health:
cortex debug sessions # List all active sessions
cortex debug memory # Show memory subsystem metrics
cortex debug health # Show system health overview
cortex debug metrics # Show performance metrics
cortex debug tools # List all tools an agent can access
cortex debug daemons # Show daemon process statuscortex memory search "pattern" # Search memory
cortex memory add "fact" --type semantic # Add memory entry
cortex memory health # Show memory system health
cortex memory heuristics # Show consolidation heuristicscortex jobs list # List all scheduled jobs
cortex jobs add --name "backup" --cron "0 0 * * *" --command "..."
cortex jobs cancel <job-id> # Cancel a scheduled job
cortex jobs run-due # Run all due jobs immediatelycortex vault list # List stored secrets
cortex vault set <key> <value> # Store encrypted secret
cortex vault get <key> # Decrypt and retrieve
cortex vault delete <key> # Remove a stored secretcortex policy list # List security policy rules
cortex policy add --rule "..." # Add a policy rule
cortex policy delete <rule-id> # Remove a policy rule
cortex policy enable <rule-id> # Enable a disabled rule
cortex policy disable <rule-id> # Disable (without deleting)cortex plugins list # List installed plugins
cortex plugins install <name> # Install from marketplace
cortex plugins uninstall <name> # Uninstall a plugin
cortex plugins enable <name> # Enable a disabled plugin
cortex plugins disable <name> # Disable (without uninstalling)
cortex plugins info <name> # Show plugin detailscortex marketplace list # List available plugins/agents
cortex marketplace search <query> # Search marketplace
cortex marketplace info <name> # Show item details
cortex marketplace install <name> # Install from marketplacecortex models list # List configured LLM models
cortex models set <provider> <model> # Set active model for provider
cortex models test <provider> # Test provider connectivitycortex git status # Show workspace status
cortex git diff # Show workspace diff
cortex git commit -m "message" # Commit changes
cortex git log # Show commit historycortex github pr list # List open pull requests
cortex github pr create # Create a new PR
cortex github issue list # List open issues
cortex github issue create # Create a new issue
cortex github repo list # List reposcortex node connect <url> # Connect to a hub node
cortex node disconnect # Disconnect from hub
cortex node status # Show node connection statuscortex channels list # List configured channels
cortex channels enable <name> # Enable a channel
cortex channels disable <name> # Disable a channel
cortex channels config <name> # Configure channel settingscortex triggers list # List event triggers
cortex triggers add --event "..."" --action "..."
cortex triggers delete <trigger-id>
cortex triggers enable <trigger-id>
cortex triggers disable <trigger-id>cortex workflow list # List workflows
cortex workflow run <name> # Execute a workflow
cortex workflow status <run-id> # Check run statusImport data from other agent platforms and formats:
cortex import openclaw # Import from OpenClaw (config, sessions, memory)
cortex import openclaw --config-only # Import only config (providers, agents, model pool)
cortex import openclaw --sessions-only # Import only session transcripts
cortex import openclaw --memory-only # Import only memory files (MEMORY.md, SOUL.md, USER.md)
cortex import openclaw --dry-run # Preview what would be imported
cortex import hermes # Import from Hermes (config, state.db, memory)
cortex import hermes --config-only # Import only config.yaml
cortex import hermes --sessions-only # Import from state.db or JSONL exports
cortex import hermes --memory-only # Import SOUL.md, MEMORY.md, USER.md, skills/
cortex import zeroclaw # Import from ZeroClaw
cortex import transcripts <dir> # Import from JSONL transcript directory
cortex import config openclaw <path> # Convert OpenClaw config to Cortex format
cortex import config openclaw --dry-run # Preview config conversionSupports --dry-run for all sources. Auto-discovers config files, state databases, and memory files from detected directories.
Quartermaster tool orchestration learning — analyze and manage tool selection patterns:
cortex qm patterns # Show learned tool selection patterns
cortex qm weights # Show current tool weights
cortex qm stats # Show orchestration statistics
cortex qm decisions # Show recent tool decisions
cortex qm accuracy # Show prediction accuracy metrics
cortex qm reset # Reset all learned patterns and weightsModel Quartermaster (MQM) — analyze and manage model selection intelligence:
cortex mqm stats # Show MQM statistics
cortex mqm decisions # Show recent model selection decisions
cortex mqm weights # Show signal weights
cortex mqm accuracy # Show model selection accuracyRun agent evaluation suites and manage baselines:
cortex eval list # List available evaluation suites
cortex eval run <name> # Run a specific evaluation suite
cortex eval baselines # Show evaluation baselines and scorescortex projects list # List projects
cortex projects create <name> # Create a new project
cortex projects use <name> # Set active project
cortex projects delete <name> # Delete a projectcortex log show # Show recent log entries
cortex log tail # Follow log output
cortex log clear # Clear log file
cortex log set-level <level> # Set log level (debug/info/warn/error)
cortex log path # Show log file path
cortex log status # Show logging configurationcortex memori list <session-id> # List checkpoints for session
cortex memori create <session-id> # Create a manual checkpoint
cortex memori restore <checkpoint-id> # Restore session to checkpoint
cortex memori delete <checkpoint-id> # Delete a checkpointcortex install # Install daemon + server as system services
cortex install --port 8080 --host 0.0.0.0
cortex install --daemon-only # Install only the daemon service
cortex install --server-only # Install only the server service
cortex install --no-start # Create service files without starting
cortex uninstall # Remove all system services
cortex uninstall --daemon-only # Remove only the daemon service
cortex uninstall --server-only # Remove only the server serviceManages Cortex as system services via systemd (Linux), launchd (macOS), or NSSM (Windows).
cortex agent lint check <agent-id> # Audit agent config, tools, plugins
cortex agent lint config # Show lint configurationcortex compliance check # Run compliance checks
cortex compliance report # Generate compliance reportcortex desktop install # Install desktop app dependencies
cortex desktop build # Build desktop app
cortex desktop run # Run desktop app in dev modecortex service list # List micro-services
cortex service show <name> # Show service details
cortex service create <name> # Create a new service
cortex service update <name> # Update service configuration
cortex service delete <name> # Delete a service
cortex service start <name> # Start a service
cortex service stop <name> # Stop a service
cortex service status <name> # Show service status
cortex service install # Install as system service
cortex service uninstall # Remove system serviceAll commands support these global flags:
| Flag | Description |
|---|---|
--json |
Machine-readable JSON output |
-v, --verbose |
Enable verbose debug logging |
--no-color |
Disable ANSI color output |
--config <path> |
Override config file path |
-m, --model <model> |
Override default model |
--profile <name> |
Config profile to use |
- Configuration — Full config file reference
- Architecture — System design and components
- Quick Start — Get started in 5 minutes
CortexPrism — Open-source AI agent operating system · Discord · Apache 2.0 License · Built with Deno 2.x + TypeScript
- Agent Loop
- Built-in Agents
- Metacognition
- Memory System
- Skills System
- Sub-Agents
- Built-in Tools
- Code Intelligence
- Code Sandbox
- Cross-Agent Context Protocol
- Prompt Lab
- PKM Assistant
- Voice Pipeline
- Computer Use
- Browser Tool
- Git & GitHub
- Scheduler & Jobs
- Dashboard
- Observability
- A2A Protocol
- MCP Gateway
- Distributed Nodes
- Memori Checkpoints
- Eval System
- Workflow Engine
- Triggers
- Projects
- TUI
- Glossary
- Update System
- Chrome Bridge
- Swarm
- AgentLint
- Model Benchmarking
- Smart Context
- Cost Optimizer