Skip to content

CLI Reference ​

cortexa-cli is a standalone binary that communicates with a running Cortexa app over its HTTP API. It provides 26 commands with --json available on all structured-output commands.

Configuration ​

bash
# Set URL and token (from Settings → External)
cortexa-cli config --url http://127.0.0.1:7373 --token <TOKEN>
cortexa-cli config --show

# Or use environment variables
export CORTEXA_URL=http://127.0.0.1:7373
export CORTEXA_TOKEN=<TOKEN>

Config file: %APPDATA%\com\cortexa\cortexa-cli\config\cli.json (Windows) or platform equivalent. Env vars override the config file.

Shell Completions ​

Generate shell completions for your shell:

bash
cortexa-cli completions bash   # Bash
cortexa-cli completions zsh    # Zsh
cortexa-cli completions fish   # Fish
cortexa-cli completions powershell  # PowerShell

Commands ​

ingest ​

bash
cortexa-cli ingest "A new thought"
echo "from stdin" | cortexa-cli ingest --stdin

capture ​

bash
cortexa-cli capture "Architecture decision" \
  --thought-type decision \
  --agent cli \
  --project myapp \
  --confidence high \
  --tag arch --tag backend
bash
cortexa-cli search "auth middleware" --limit 5
cortexa-cli search "auth middleware" --json

list ​

bash
cortexa-cli list --limit 20 --tag architecture --pinned
cortexa-cli list --session-id <uuid>
cortexa-cli list --include-archived
cortexa-cli list --json

get ​

bash
cortexa-cli get <item-id>
cortexa-cli get <item-id> --json

context ​

bash
cortexa-cli context "fixing the thesis parser" \
  --project Cortexa \
  --file src-tauri/src/agent/handlers.rs \
  --limit 10
cortexa-cli context "auth bugs" --json

sync-context ​

Generate .cortexa-context.md in a project directory.

bash
cortexa-cli sync-context MyProject --dir /path/to/project
# Output: Synced 15 items → /path/to/project/.cortexa-context.md

think ​

bash
cortexa-cli think <item-id>

brief ​

bash
cortexa-cli brief <item-id>
cortexa-cli brief <item-id> --json

orchestrate ​

bash
cortexa-cli orchestrate <item-id>
cortexa-cli orchestrate <item-id> --json

tools ​

bash
cortexa-cli tools
cortexa-cli tools --json

run-tool ​

bash
cortexa-cli run-tool decompose <item-id>
cortexa-cli run-tool apply_lens <item-id> --params '{"lens": "pre-mortem"}'

confidence-history ​

bash
cortexa-cli confidence-history <item-id>
cortexa-cli confidence-history <item-id> --json

peer-profiles ​

bash
cortexa-cli peer-profiles
cortexa-cli peer-profiles --json

learned-procedures ​

bash
cortexa-cli learned-procedures
cortexa-cli learned-procedures --thought-type decision --json

tool-metrics ​

bash
cortexa-cli tool-metrics
cortexa-cli tool-metrics --json

reflection ​

bash
cortexa-cli reflection

publications ​

bash
cortexa-cli publications
cortexa-cli publications --json

completions ​

bash
cortexa-cli completions <shell>

ping ​

bash
cortexa-cli ping

Building ​

bash
cargo build -p cortexa-cli --release
# Binary: target/release/cortexa-cli

Built with Rust, Tauri, and a lot of captured thoughts.