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-running cortexdb init does not refresh it. init reuses an existing
identity and changes nothing; against an expired one it refuses and exits 3.
That is deliberate: a new identity is a new brain, and memories written
under the old actor stay where they are, unreachable from the new config.
When a token expires you have two safe options:
cortexdb init --api-key <token> --actor <actor>— keep the same brain with a token you already hold (e.g. from your IdP).cortexdb init --force— deliberately start a NEW brain. The previous identity is backed up tostate.json.replacedfirst.
For a second brain alongside the first, isolate instead of replacing:
cortexdb --config-dir <dir> init, or set CORTEXDB_HOME.
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:
- CLI flags —
--api-key,--endpoint,--actor,--scope,--profile - Environment —
CORTEXDB_API_KEY,CORTEXDB_URL,CORTEXDB_ACTOR,CORTEXDB_SCOPE - Persisted state:
~/.cortexdb/config.toml— endpoint, profile names (human-editable)~/.cortexdb/state.json— token, actor, scope, expiry (managed byinit, 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>andX-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. Note thatTOKEN_EXPIREDis not fixed by re-runningcortexdb init— see the identity note above; that would mint a different brain rather than restore access to yours. - 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 thediagnostics.readcapability.
License
Apache-2.0
Metadata
Release files for cortexdb-cli 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cortexdb_cli-0.6.0.tar.gz | 62.7 kB | Without provenance | Details for cortexdb_cli-0.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cortexdb_cli-0.6.0-py3-none-any.whl | Python 3 | none | any | Details for cortexdb_cli-0.6.0-py3-none-any.whl |
Total release size: 149.2 kB
Release files / cortexdb_cli-0.6.0.tar.gz
| Download URL | cortexdb_cli-0.6.0.tar.gz |
|---|---|
| Size | 62.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cc2d4345c165c75df37125ecc7458042c6bac7ca7469e9cf09e0175567968fed
|
|
BLAKE2b-256 checksum How to use checksums |
ac612076ba5d961d86aad8c3aa9f3dadcf502c5cff84133d1a6a5bb9c53df19c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Release files / cortexdb_cli-0.6.0-py3-none-any.whl
| Download URL | cortexdb_cli-0.6.0-py3-none-any.whl |
|---|---|
| Size | 86.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e439dc4e40452418d70d0bdcc4644872314aa282742b36098781b27209579066
|
|
BLAKE2b-256 checksum How to use checksums |
a4df556989ff9dbf2b79fef352a3ee5afe0d863251fe0e2f91c927358f34b975
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Security for cortexdb-cli 0.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.