Skip to main content

cortexdb-cli

Command-line interface for CortexDB — the long-term memory layer for AI systems.

Wraps the v1 HTTP API in a small, fast Click + Rich CLI. Anonymous signup in one command, no email or card; works against the public SaaS or any self-hosted CortexDB deployment.

Install

pip install cortexdb-cli

Requires Python 3.10+.

Quickstart

# 1. One-time setup — anonymous signup, writes ~/.cortexdb/state.json
cortexdb init

# 2. Store a memory
cortexdb remember "Q3 revenue: $2.4M. We're on track for $10M ARR by year-end."

# 3. Recall it
cortexdb recall "Q3 revenue?"

# 4. Or just type — drops into a REPL
cortexdb

The signup token has a 7-day TTL on the free tier. Re-run cortexdb init to refresh, or pass --api-key + --actor to use a token from your IdP.

Commands

cortexdb init                                 anonymous signup; persist token + actor
cortexdb remember "..."                       store a memory (POST /v1/experience)
cortexdb recall   "..."                       recall a stratified context pack
cortexdb search   "..."                       granular event-level search
cortexdb forget   --memory-id ...             delete with audit
cortexdb episodes {list,get,delete}           episode CRUD
cortexdb entities {list,get,link}             entity rollups over the Facts layer
cortexdb admin    {health,usage,layers}       diagnostics
cortexdb import   data.json                   bulk-load (JSON / JSONL / CSV / TXT)
cortexdb export   -o backup.json              export memories
cortexdb config   {show,set}                  view / edit ~/.cortexdb/config.toml
cortexdb                                      interactive REPL

Configuration

Three layers, in precedence order:

  1. CLI flags--api-key, --endpoint, --actor, --scope, --profile
  2. EnvironmentCORTEXDB_API_KEY, CORTEXDB_URL, CORTEXDB_ACTOR, CORTEXDB_SCOPE
  3. Persisted state:
    • ~/.cortexdb/config.toml — endpoint, profile names (human-editable)
    • ~/.cortexdb/state.json — token, actor, scope, expiry (managed by init, 0600 on POSIX)

The state.json format matches the cortexdb-mcp 0.3.0 server's, so you can copy state across to use both tools from the same anonymous identity.

Pipe-friendly

Auto-detects when stdout isn't a TTY and emits JSON:

cortexdb recall "Q3 revenue" | jq .context_block
cortexdb entities list      | jq '.[].subject'
echo "remember this"        | cortexdb remember -

Force JSON mode any time with --json.

Auth notes

  • The v1 API requires both Authorization: Bearer <PASETO> and X-Cortex-Actor. The CLI stamps both on every request — you never need to pass them by hand.
  • 401s show the specific error code (TOKEN_EXPIRED, actor_mismatch, …) and the remediation: usually cortexdb init.
  • 403s cite the missing capability and the policy tier that denied. If a recall returns diagnostics.read denied, pass --diagnostics none — free-tier tokens don't carry the diagnostics.read capability.

License

Apache-2.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cortexdb_cli-0.5.2.tar.gz (57.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cortexdb_cli-0.5.2-py3-none-any.whl (79.7 kB view details)

Uploaded Python 3

File details

Details for the file cortexdb_cli-0.5.2.tar.gz.

File metadata

  • Download URL: cortexdb_cli-0.5.2.tar.gz
  • Upload date:
  • Size: 57.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.9

File hashes

Hashes for cortexdb_cli-0.5.2.tar.gz
Algorithm Hash digest
SHA256 c5f2fcb8338005040fac4111e960b8a0b8861ade310a3e0c199cb3ca7b30069e
MD5 84e79b6ccd9b989c3bbd01561f9ce7a5
BLAKE2b-256 96fe9e4a94cf61b292ee0a439395e4ffd2d8f272f9bf04a786b1f2728763cf22

See more details on using hashes here.

File details

Details for the file cortexdb_cli-0.5.2-py3-none-any.whl.

File metadata

  • Download URL: cortexdb_cli-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 79.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.9

File hashes

Hashes for cortexdb_cli-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 49cb997e49dca5550232fae74642667407af67321606f3a48920b3aae3fd90ed
MD5 b0f81ac1ef957c7c063262a004cf2cb9
BLAKE2b-256 4160ffe22a360d66df3ea586b7c5024199c0696976be396543a40a37764529f4

See more details on using hashes here.

Release history Release notifications | RSS feed

0.5.3

2 files

This release

0.5.2 This release

2 files

0.5.1

2 files

0.5.0

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page