Command-line interface for CortexDB — the long-term memory layer for AI.
Project description
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:
- 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: usuallycortexdb 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 thediagnostics.readcapability.
License
Apache-2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cortexdb_cli-0.2.0.tar.gz.
File metadata
- Download URL: cortexdb_cli-0.2.0.tar.gz
- Upload date:
- Size: 27.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0d15732f7a338421b53e0b162c95b7e3fd1bf02019fe9028335793c9b7ab817
|
|
| MD5 |
4bf7ba50c36734170e8ff78f341bc4e4
|
|
| BLAKE2b-256 |
e41716c6610cf66ef464e9bfc90c180408dddc0c575cc424a43a4c8f7b912740
|
File details
Details for the file cortexdb_cli-0.2.0-py3-none-any.whl.
File metadata
- Download URL: cortexdb_cli-0.2.0-py3-none-any.whl
- Upload date:
- Size: 44.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3260a7dc1fd365dba4c0f067a92947bad7829a4ba1563f7d932724681f1e8814
|
|
| MD5 |
96b462c5876958f8feb93c0275373aff
|
|
| BLAKE2b-256 |
4868c4f97f1ae0940b579ce6ce5024dc9793e569e7c6a3de998b0968a68cdd26
|