Skip to content

CLI Reference

CortexPrism edited this page Jun 17, 2026 · 1 revision

CLI Reference

Complete reference for all cortex commands.

Command Index

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
mqm Model Quartermaster stats
qm Quartermaster tool orchestration
models List and configure LLM models
soul Agent identity and personality
plugins Install and manage plugins
marketplace Browse plugin/agent marketplace
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

cortex chat

cortex chat                          # Start a new chat session
cortex chat --model gpt-4o           # Override the active model
cortex chat --resume sess_abc123     # Resume an existing session
cortex chat -s sess_abc123           # Resume (short flag)
cortex chat --no-stream              # Disable streaming output

Slash commands inside chat: /exit, /help, /clear

cortex serve

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
cortex serve -d -r                   # Restart background server
cortex serve -s                      # Stop background server

cortex daemon

cortex daemon start                  # Start supervisor in background
cortex daemon stop
cortex daemon restart
cortex daemon run                    # Run supervisor in foreground
cortex daemon status

Three daemon processes: Validator, Executor, Scheduler.

cortex run <file>

cortex run script.py                    # Run in Docker sandbox
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 attempts

Supported languages: python, javascript, typescript, bash, ruby, go, rust

cortex memory

cortex memory search "sqlite"              # Keyword + vector hybrid search
cortex memory search "sqlite" --semantic    # Vector only
cortex memory add "Uses SQLite WAL mode"
cortex memory health                       # Per-tier stats
cortex memory heuristics                   # Trigger heuristic learning cycle

cortex vault

export 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

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_abc123

Default deny rules: rm -rf /, fork bombs, direct disk writes, chmod 777 /

cortex update

cortex update              # Check for updates and apply
cortex update --check      # Dry-run
cortex update --channel pre # Include pre-releases
cortex update --rollback   # Revert to previous version
cortex update --status     # Show current/latest version
cortex update --force      # Bypass dirty tree check

cortex plugins

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 permissions

cortex log

cortex log show                          # Last 100 entries
cortex log show --lines=200 --level=warn # Filter by level
cortex log tail                          # Live tail
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 config

cortex git

cortex 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 commit <message> [--agent <id>]
cortex git push [--agent <id>]
cortex git pull [--agent <id>]
cortex git clone <url> <dest>
cortex git branch [--create|--checkout <name>]
cortex git remote --add <name> --url <url>

cortex github

cortex github pr list <repo> [--state open] [--limit 10]
cortex github pr create <repo> <title> <head> <base> [--body "..."] [--draft]
cortex github pr merge <repo> <number> [--method merge|squash|rebase]
cortex github issue list <repo> [--state open]
cortex github issue create <repo> <title> [--body "..."] [--labels a,b]
cortex github repo list [--type all|owner|public|private]

Clone this wiki locally