-
-
Notifications
You must be signed in to change notification settings - Fork 17
CLI Reference
Complete reference for all cortex commands.
| Command | Description |
|---|---|
chat |
Interactive streaming chat session |
setup |
Re-run the setup wizard |
sessions |
List recent chat sessions |
run <file> |
Execute a code file in the sandbox |
serve |
Start the HTTP + WebSocket server with Web UI |
daemon |
Manage background processes |
start |
Start daemon + server processes |
restart |
Restart daemon + server processes |
stop |
Stop all background processes |
voice |
Manage voice mode |
memory |
Search and manage memory |
reflect |
Inspect consolidation patterns |
jobs |
Manage scheduled jobs |
vault |
Encrypted credential vault |
policy |
Security policy rules |
migrate |
Initialise or migrate databases |
update |
Check for and apply updates |
git |
Git workspace operations |
github |
GitHub integration |
remote |
Manage remote Cortex agents |
mqm |
Model Quartermaster stats |
qm |
Quartermaster tool orchestration |
models |
List and configure LLM models |
soul |
Agent identity and personality templates |
plugins |
Install and manage plugins |
marketplace |
Browse plugin/agent marketplace |
import |
Import data from OpenClaw or Cortex exports |
log |
Logging configuration and viewing |
agent |
Manage custom agents |
service |
Manage micro-services |
node |
Manage distributed nodes |
eval |
Run agent evaluation suites |
install |
Install as system service |
uninstall |
Remove system service |
hooks |
Manage pipeline hooks |
triggers |
Manage event triggers |
channels |
Manage channel adapters |
mcp |
Start MCP server (stdio) |
tui |
Launch terminal UI |
desktop |
Desktop automation |
workflow |
Workflow engine operations |
projects |
Project management |
a2a |
A2A Protocol agent card, skills, and connections |
agentlint |
Audit agent configs, tools, plugins, and prompts |
mcp-gateway |
Managed MCP server health and status |
memori |
Persistent checkpointing and agent-state survival |
cortex chat # Start a new chat session
cortex chat --model gpt-4o # Override the active model
cortex chat --agent my-agent # Use a specific agent
cortex chat --resume sess_abc123 # Resume an existing session
cortex chat -s sess_abc123 # Resume (short flag)
cortex chat --no-stream # Disable streaming outputSlash commands inside chat: /exit, /help, /clear
cortex serve # http://127.0.0.1:3000 (foreground)
cortex serve --port 8080 --host 0.0.0.0
cortex serve -d # Run in the background (daemon mode)
cortex serve -d -r # Restart background server
cortex serve -s # Stop background server
cortex stop # Stop server + all daemons
cortex stop --server-only
cortex stop --daemon-onlycortex daemon start # Start supervisor in background
cortex daemon stop
cortex daemon restart
cortex daemon run # Run supervisor in foreground
cortex daemon statusThree daemon processes: Validator (policy enforcement), Executor (tool execution), Scheduler (cron + memory consolidation). Auto-restart with exponential backoff (min(2^n × 1s, 30s)).
cortex run script.py # Run in Docker sandbox (auto-detect language)
cortex run script.py --no-sandbox # Run as direct subprocess
cortex run script.py --fix # Enable LLM auto-fix loop
cortex run script.py --fix --max-fix 6 # Up to 6 fix attemptsSupported languages: python, javascript, typescript, bash, ruby, go, rust
cortex memory search "sqlite" # Keyword + vector hybrid search
cortex memory search "sqlite" --type semantic # Vector only
cortex memory add "Uses SQLite WAL mode"
cortex memory health # Per-tier stats with color-coded decay
cortex memory heuristics # Trigger heuristic learning cycleexport CORTEX_VAULT_KEY="your-passphrase"
cortex vault store "openai-key" --service openai
cortex vault get "openai-key"
cortex vault list
cortex vault delete "openai-key"cortex policy list
cortex policy add "curl.*evil\.com" --kind shell --effect deny --reason "Blocked"
cortex policy check shell "rm -rf /etc"
cortex policy remove pol_abc123Default deny rules: rm -rf /, fork bombs, direct disk writes, chmod 777 /
cortex update # Check for updates and apply
cortex update --check # Dry-run
cortex update --channel pre-release # Include pre-releases
cortex update --rollback # Revert to previous version (24h grace period)
cortex update --status # Show current/latest version
cortex update --force # Bypass dirty working tree checkSupports source mode (git pull) and binary mode (download + SHA-256 + optional GPG verification).
cortex plugins install <source> # Install from URL, file, or marketplace
cortex plugins list # List installed plugins
cortex plugins enable <name> # Enable a plugin
cortex plugins disable <name> # Disable a plugin
cortex plugins remove <name> # Remove a plugin
cortex plugins update <name> # Update a plugin
cortex plugins update --all # Update all plugins
cortex plugins verify <name> # Verify integrity hash
cortex plugins permissions <name> # Inspect permissionscortex log show # Last 100 entries
cortex log show --lines=200 --level=warn # Filter by level
cortex log tail # Live tail (Ctrl+C to stop)
cortex log tail --level=debug # Tail with filters
cortex log clear # Truncate log file
cortex log path # Print log file path
cortex log set-level info # Update level in config
cortex log status # Show current configcortex git status [--agent <id>]
cortex git log [--agent <id>] [--limit 20]
cortex git diff [--agent <id>] [--stat] [--file <path>]
cortex git add <files> [--agent <id>]
cortex git add --all [--agent <id>]
cortex git commit <message> [--agent <id>]
cortex git push [--agent <id>] [--remote origin] [--branch <name>]
cortex git pull [--agent <id>]
cortex git clone <url> <dest> [--branch <name>]
cortex git branch [--agent <id>]
cortex git branch --create <name> [--agent <id>]
cortex git branch --checkout <name> [--agent <id>]
cortex git remote --add <name> --url <url> [--agent <id>]cortex github pr list <repo> [--state open] [--limit 10]
cortex github pr get <repo> <number>
cortex github pr create <repo> <title> <head> <base> [--body "..."] [--draft]
cortex github pr merge <repo> <number> [--method merge|squash|rebase]
cortex github pr close <repo> <number>
cortex github issue list <repo> [--state open] [--limit 10] [--labels a,b]
cortex github issue create <repo> <title> [--body "..."] [--labels a,b]
cortex github issue close <repo> <number>
cortex github repo list [--type all|owner|public|private] [--limit 20]
cortex github repo get <repo>
cortex github repo branches <repo> [--limit 30]
cortex github tokenRequires GITHUB_TOKEN env var, githubToken in config, or vault entry github_token.
cortex remote add <name> <endpoint> # Configure a remote agent
cortex remote connect <id> # Connect as a remote agent
cortex remote remove <id> # Remove a remote agent configcortex voice enable # Enable voice mode
cortex voice disable # Disable voice mode
cortex voice status # Show current voice config
cortex voice set-voice <id> # Change default voicecortex models list # List all configured models
cortex models show <provider> # Detailed view of one provider
cortex models set <provider> <key> <val> # Set model parameter
cortex models available [provider] # Fetch available models from API# Quartermaster (Tool Orchestration)
cortex qm patterns # Learned tool patterns
cortex qm weights # Signal weights
cortex qm stats # Tool statistics
cortex qm decisions # Recent decisions
cortex qm dashboard # ASCII dashboard
cortex qm accuracy # Prediction accuracy
cortex qm reset # Reset learned state
# Model Quartermaster (MQM)
cortex mqm stats # Model performance stats
cortex mqm decisions # Recent routing decisions
cortex mqm weights # Signal weights
cortex mqm accuracy # Prediction accuracycortex node register <name> [--tier root|sudo|unprivileged] # Register node
cortex node list # List all nodes
cortex node show <id> # Show node + metrics
cortex node deregister <id> # Remove node
cortex node rekey <id> # Rotate auth token
cortex node connect <endpoint> [--tier <tier>] # Connect as Nodecortex eval list # List evaluation suites
cortex eval run <suite> # Run a suite
cortex eval run <suite> --save-baseline # Save as baseline
cortex eval run <suite> --baseline <name> # Compare against baseline
cortex eval baselines # List baselinescortex mcp serve # MCP server in HTTP mode
cortex mcp stdio # MCP server over stdiocortex workflow list # List workflows
cortex workflow run <name> # Execute workflow
cortex workflow approve <runId> # Approve pending stepcortex triggers list # List triggers
cortex triggers add <type> [--pattern <glob>] # Add trigger
cortex triggers remove <id> # Remove trigger
cortex triggers install-hooks # Install git hooks
cortex triggers uninstall-hooks # Remove git hookscortex channels list # List channels
cortex channels start <name> # Start channel adapter
cortex channels stop <name> # Stop channel adaptercortex desktop screenshot # Capture screenshot
cortex desktop click <x> <y> # Click at coordinates
cortex desktop type <text> # Type text
cortex desktop keypress <key> # Press key or combo
cortex desktop clipboard get|set <text> # Clipboard ops
cortex desktop dockerfile # Docker config
cortex desktop entrypoint # Automation entrypointcortex projects list # List projects
cortex projects create <name> # Create project
cortex projects delete <name> # Delete projectcortex hooks list # List pipeline hooks
cortex hooks disable <name> # Disable a hook
cortex hooks init # Initialize hook configcortex soul edit <file> # Edit SOUL/USER/MEMORY.md
cortex soul templates # List personality templates
cortex soul apply-template <name> # Apply personality template
cortex soul validate # Validate SOUL.md structurecortex agent list # List agents
cortex agent show <id> # Show agent details
cortex agent create <name> # Create agent
cortex agent update <id> # Update agent
cortex agent delete <id> # Delete agent
cortex agent select <id> # Set as active
cortex agent inspect <id> # Full identity dumpcortex service list # List services
cortex service show <id> # Show service details
cortex service create <name> # Create service
cortex service update <id> # Update service
cortex service delete <id> # Delete service
cortex service start <id> # Start service
cortex service stop <id> # Stop servicecortex start # Start daemon + server (defaults)
cortex start --port 8080 --host 0.0.0.0
cortex start --daemon-only # Start only the daemon supervisor
cortex start --server-only # Start only the HTTP serverStarts daemon (validator, executor, scheduler) and/or HTTP server as background processes.
cortex stop # Stop server + all daemons
cortex stop --port 8080 # Stop server on custom port
cortex stop --server-only # Stop only the HTTP server
cortex stop --daemon-only # Stop only daemon processesStops all Cortex background processes. Use --server-only or --daemon-only for targeted shutdown.
cortex a2a card # Display the Cortex agent card (JSON)
cortex a2a skills # List registered A2A agent skillsGoogle Agent2Agent (A2A) v1.0 protocol bridge for cross-framework agent interoperability. Exposes Cortex as an A2A agent on port 4220.
cortex agentlint check # Run checks on default agent config
cortex agentlint config # Lint current agent configuration from config fileAudits agent configuration for issues: missing tools, misconfigured providers, prompt hazards, and best-practice violations. Outputs pass/warning/error counts with per-issue suggestions.
cortex marketplace list plugins # Browse available plugins (--search, --kind, --category)
cortex marketplace list agents # Browse available agents (--search, --provider)
cortex marketplace categories # List marketplace categories
cortex marketplace stats # Show marketplace statistics
cortex marketplace install <slug> # Install a plugin with permission preview
cortex marketplace install <slug> -y # Skip confirmation promptBrowse and install from cortexprism.io marketplace. marketplace install shows required permissions and prompts for confirmation before installing.
cortex mcp-gateway status # Show managed servers and health
cortex mcp-gateway health # Run health checks on all managed serversEnterprise MCP server management. status lists all managed MCP servers with transport, tool count, and health. health runs active health checks and reports latency.
cortex memori list # List all recent checkpoints
cortex memori list <sessionId> # List checkpoints for a specific session
cortex memori prune <sessionId> # Prune old checkpoints (keep last 5)
cortex memori prune <sessionId> --keep 10 # Keep last 10 checkpointsPersistent agent-state checkpointing for survival across restarts. Checkpoints capture messages, tool calls, tokens used, and optional goal snapshots.
cortex migrate # Initialize or migrate all Cortex databasesRuns pending schema migrations on all database files (core, sessions, memory, vault). Safe to run repeatedly — applies only unapplied migrations.
cortex sessions # List 20 most recent sessions
cortex sessions --limit 50 # Show 50 most recent sessionsLists chat sessions with status indicator (● active, ○ closed), turn count, duration, channel badge, and sub-agent relationships.
cortex tui # Launch the interactive terminal UIFull-featured terminal UI with streaming chat, slash commands, tool panels, message history (Up/Down), and keyboard shortcuts (Ctrl+C cancel, Ctrl+L clear).
cortex 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). install registers and starts services; uninstall stops and removes them.
- Configuration — Full config file reference
- Architecture — System design and components
CortexPrism — Open-source agentic AI harness · MIT License · Built with Deno 2.x + TypeScript
- Agent Loop
- 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