cortexdb-cli 0.5.2__tar.gz → 0.5.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/.gitignore +109 -101
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/PKG-INFO +20 -4
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/README.md +106 -90
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/cortexdb_cli/__init__.py +3 -3
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/cortexdb_cli/client.py +8 -0
- cortexdb_cli-0.5.4/cortexdb_cli/commands/admin.py +612 -0
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/cortexdb_cli/commands/code.py +60 -4
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/pyproject.toml +56 -56
- cortexdb_cli-0.5.2/cortexdb_cli/commands/admin.py +0 -83
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/cortexdb_cli/commands/__init__.py +0 -0
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/cortexdb_cli/commands/answer.py +0 -0
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/cortexdb_cli/commands/audit.py +0 -0
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/cortexdb_cli/commands/auth.py +0 -0
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/cortexdb_cli/commands/beliefs.py +0 -0
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/cortexdb_cli/commands/claims.py +0 -0
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/cortexdb_cli/commands/compose.py +0 -0
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/cortexdb_cli/commands/config_cmd.py +0 -0
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/cortexdb_cli/commands/conflicts.py +0 -0
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/cortexdb_cli/commands/entities.py +0 -0
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/cortexdb_cli/commands/episodes.py +0 -0
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/cortexdb_cli/commands/experience.py +0 -0
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/cortexdb_cli/commands/export_cmd.py +0 -0
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/cortexdb_cli/commands/facts.py +0 -0
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/cortexdb_cli/commands/forget.py +0 -0
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/cortexdb_cli/commands/import_cmd.py +0 -0
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/cortexdb_cli/commands/init.py +0 -0
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/cortexdb_cli/commands/interactive.py +0 -0
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/cortexdb_cli/commands/onboard.py +0 -0
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/cortexdb_cli/commands/policy.py +0 -0
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/cortexdb_cli/commands/recall.py +0 -0
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/cortexdb_cli/commands/scopes.py +0 -0
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/cortexdb_cli/commands/search.py +0 -0
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/cortexdb_cli/commands/understanding.py +0 -0
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/cortexdb_cli/commands/wire.py +0 -0
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/cortexdb_cli/config.py +0 -0
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/cortexdb_cli/errors.py +0 -0
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/cortexdb_cli/harness_packs_data.py +0 -0
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/cortexdb_cli/main.py +0 -0
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/cortexdb_cli/onboarding.py +0 -0
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/cortexdb_cli/output.py +0 -0
- {cortexdb_cli-0.5.2 → cortexdb_cli-0.5.4}/cortexdb_cli/state.py +0 -0
|
@@ -1,101 +1,109 @@
|
|
|
1
|
-
# Rust
|
|
2
|
-
/target
|
|
3
|
-
**/*.rs.bk
|
|
4
|
-
|
|
5
|
-
# Environment / secrets
|
|
6
|
-
.env
|
|
7
|
-
.env.local
|
|
8
|
-
.env*.local
|
|
9
|
-
*.pem
|
|
10
|
-
*.key
|
|
11
|
-
.npmrc
|
|
12
|
-
|
|
13
|
-
# SQLite database
|
|
14
|
-
*.sqlite
|
|
15
|
-
*.sqlite-wal
|
|
16
|
-
*.sqlite-shm
|
|
17
|
-
|
|
18
|
-
# OS
|
|
19
|
-
.DS_Store
|
|
20
|
-
Thumbs.db
|
|
21
|
-
desktop.ini
|
|
22
|
-
|
|
23
|
-
# IDE
|
|
24
|
-
.idea/
|
|
25
|
-
.vscode/
|
|
26
|
-
*.swp
|
|
27
|
-
*.swo
|
|
28
|
-
|
|
29
|
-
# Data directories
|
|
30
|
-
cortexdb_data*/
|
|
31
|
-
/data/
|
|
32
|
-
# Per-bench tenant stores (RocksDB + Tantivy + HNSW state; regeneratable per run)
|
|
33
|
-
/data_*/
|
|
34
|
-
# Experimental per-branch stores (not tracked on this branch but left gitignored
|
|
35
|
-
# so checkout from other branches doesn't surface them in git status)
|
|
36
|
-
/event_memory_store/
|
|
37
|
-
/llm_cache/
|
|
38
|
-
|
|
39
|
-
# Benchmark inputs and per-run outputs (kept local, regenerated each run)
|
|
40
|
-
benchmarks/longmemeval/data/
|
|
41
|
-
benchmarks/longmemeval/server_results/
|
|
42
|
-
benchmarks/longmemeval/fast_results/
|
|
43
|
-
benchmarks/longmemeval/micro_results/
|
|
44
|
-
benchmarks/longmemeval/server_logs/
|
|
45
|
-
benchmarks/longmemeval/*.log
|
|
46
|
-
benchmarks/locomo/locomo_results*.json
|
|
47
|
-
benchmarks/locomo/server_results/
|
|
48
|
-
benchmarks/locomo/*.log
|
|
49
|
-
/answer_out.json
|
|
50
|
-
|
|
51
|
-
# Local Claude Code state
|
|
52
|
-
.claude/
|
|
53
|
-
.tmp/
|
|
54
|
-
|
|
55
|
-
# Python
|
|
56
|
-
__pycache__/
|
|
57
|
-
*.pyc
|
|
58
|
-
.venv/
|
|
59
|
-
venv/
|
|
60
|
-
|
|
61
|
-
# Node
|
|
62
|
-
node_modules/
|
|
63
|
-
dist/
|
|
64
|
-
.next/
|
|
65
|
-
|
|
66
|
-
# Egg info
|
|
67
|
-
*.egg-info/
|
|
68
|
-
|
|
69
|
-
# Scratch/debug text files at root
|
|
70
|
-
/*.txt
|
|
71
|
-
/*.log
|
|
72
|
-
|
|
73
|
-
# Local debug / marketing / private content (not for repo)
|
|
74
|
-
harness/.reports/
|
|
75
|
-
harness_data_*/
|
|
76
|
-
blog/
|
|
77
|
-
sales/
|
|
78
|
-
videos/
|
|
79
|
-
local-instance/
|
|
80
|
-
|
|
81
|
-
# doc-claims verifier scratch output
|
|
82
|
-
tools/verifier_out*/
|
|
83
|
-
|
|
84
|
-
# Generated benchmark / runtime data (audit M-10: hundreds of untracked
|
|
85
|
-
# data dirs at the workspace root slow every git status/search and risk
|
|
86
|
-
# being packaged; results JSONs are artifacts, never source)
|
|
87
|
-
benchmarks/data_*/
|
|
88
|
-
benchmarks/**/fast_results/
|
|
89
|
-
data_*/
|
|
90
|
-
*_data/
|
|
91
|
-
*_data_20*/
|
|
92
|
-
cortexdb_data*/
|
|
93
|
-
server_results/
|
|
94
|
-
*.log
|
|
95
|
-
docker_build.log
|
|
96
|
-
|
|
97
|
-
# local gate/bench data stores
|
|
98
|
-
gate*_data_*/
|
|
99
|
-
|
|
100
|
-
# Code-plane benchmark local run outputs (official results are committed deliberately)
|
|
101
|
-
benchmarks/codeplane/runs/
|
|
1
|
+
# Rust
|
|
2
|
+
/target
|
|
3
|
+
**/*.rs.bk
|
|
4
|
+
|
|
5
|
+
# Environment / secrets
|
|
6
|
+
.env
|
|
7
|
+
.env.local
|
|
8
|
+
.env*.local
|
|
9
|
+
*.pem
|
|
10
|
+
*.key
|
|
11
|
+
.npmrc
|
|
12
|
+
|
|
13
|
+
# SQLite database
|
|
14
|
+
*.sqlite
|
|
15
|
+
*.sqlite-wal
|
|
16
|
+
*.sqlite-shm
|
|
17
|
+
|
|
18
|
+
# OS
|
|
19
|
+
.DS_Store
|
|
20
|
+
Thumbs.db
|
|
21
|
+
desktop.ini
|
|
22
|
+
|
|
23
|
+
# IDE
|
|
24
|
+
.idea/
|
|
25
|
+
.vscode/
|
|
26
|
+
*.swp
|
|
27
|
+
*.swo
|
|
28
|
+
|
|
29
|
+
# Data directories
|
|
30
|
+
cortexdb_data*/
|
|
31
|
+
/data/
|
|
32
|
+
# Per-bench tenant stores (RocksDB + Tantivy + HNSW state; regeneratable per run)
|
|
33
|
+
/data_*/
|
|
34
|
+
# Experimental per-branch stores (not tracked on this branch but left gitignored
|
|
35
|
+
# so checkout from other branches doesn't surface them in git status)
|
|
36
|
+
/event_memory_store/
|
|
37
|
+
/llm_cache/
|
|
38
|
+
|
|
39
|
+
# Benchmark inputs and per-run outputs (kept local, regenerated each run)
|
|
40
|
+
benchmarks/longmemeval/data/
|
|
41
|
+
benchmarks/longmemeval/server_results/
|
|
42
|
+
benchmarks/longmemeval/fast_results/
|
|
43
|
+
benchmarks/longmemeval/micro_results/
|
|
44
|
+
benchmarks/longmemeval/server_logs/
|
|
45
|
+
benchmarks/longmemeval/*.log
|
|
46
|
+
benchmarks/locomo/locomo_results*.json
|
|
47
|
+
benchmarks/locomo/server_results/
|
|
48
|
+
benchmarks/locomo/*.log
|
|
49
|
+
/answer_out.json
|
|
50
|
+
|
|
51
|
+
# Local Claude Code state
|
|
52
|
+
.claude/
|
|
53
|
+
.tmp/
|
|
54
|
+
|
|
55
|
+
# Python
|
|
56
|
+
__pycache__/
|
|
57
|
+
*.pyc
|
|
58
|
+
.venv/
|
|
59
|
+
venv/
|
|
60
|
+
|
|
61
|
+
# Node
|
|
62
|
+
node_modules/
|
|
63
|
+
dist/
|
|
64
|
+
.next/
|
|
65
|
+
|
|
66
|
+
# Egg info
|
|
67
|
+
*.egg-info/
|
|
68
|
+
|
|
69
|
+
# Scratch/debug text files at root
|
|
70
|
+
/*.txt
|
|
71
|
+
/*.log
|
|
72
|
+
|
|
73
|
+
# Local debug / marketing / private content (not for repo)
|
|
74
|
+
harness/.reports/
|
|
75
|
+
harness_data_*/
|
|
76
|
+
blog/
|
|
77
|
+
sales/
|
|
78
|
+
videos/
|
|
79
|
+
local-instance/
|
|
80
|
+
|
|
81
|
+
# doc-claims verifier scratch output
|
|
82
|
+
tools/verifier_out*/
|
|
83
|
+
|
|
84
|
+
# Generated benchmark / runtime data (audit M-10: hundreds of untracked
|
|
85
|
+
# data dirs at the workspace root slow every git status/search and risk
|
|
86
|
+
# being packaged; results JSONs are artifacts, never source)
|
|
87
|
+
benchmarks/data_*/
|
|
88
|
+
benchmarks/**/fast_results/
|
|
89
|
+
data_*/
|
|
90
|
+
*_data/
|
|
91
|
+
*_data_20*/
|
|
92
|
+
cortexdb_data*/
|
|
93
|
+
server_results/
|
|
94
|
+
*.log
|
|
95
|
+
docker_build.log
|
|
96
|
+
|
|
97
|
+
# local gate/bench data stores
|
|
98
|
+
gate*_data_*/
|
|
99
|
+
|
|
100
|
+
# Code-plane benchmark local run outputs (official results are committed deliberately)
|
|
101
|
+
benchmarks/codeplane/runs/
|
|
102
|
+
|
|
103
|
+
# Deliberately untracked, four times over: `git add docs/` keeps sweeping the
|
|
104
|
+
# investor deck sources and the 2.7 MB OpenClaw design PDF back in (7dda2a51,
|
|
105
|
+
# 3a778b5e, then again in the 2026-09-09 checkpoint). They live on disk; they do
|
|
106
|
+
# not belong in the repo. Stage explicit paths, never a directory.
|
|
107
|
+
docs/investor_deck/
|
|
108
|
+
docs/CORTEX_OPENCLAW_AGENT_OS_DESIGN.md
|
|
109
|
+
docs/CORTEX_OPENCLAW_AGENT_OS_DESIGN.pdf
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: cortexdb-cli
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.4
|
|
4
4
|
Summary: Command-line interface for CortexDB — the long-term memory layer for AI.
|
|
5
5
|
Project-URL: Homepage, https://cortexdb.ai
|
|
6
6
|
Project-URL: Documentation, https://cortexdb.ai/docs
|
|
@@ -62,8 +62,22 @@ cortexdb recall "Q3 revenue?"
|
|
|
62
62
|
cortexdb
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
The signup token has a 7-day TTL on the free tier.
|
|
66
|
-
|
|
65
|
+
The signup token has a 7-day TTL on the free tier.
|
|
66
|
+
|
|
67
|
+
**Re-running `cortexdb init` does not refresh it.** `init` reuses an existing
|
|
68
|
+
identity and changes nothing; against an expired one it refuses and exits 3.
|
|
69
|
+
That is deliberate: a new identity is a new *brain*, and memories written
|
|
70
|
+
under the old actor stay where they are, unreachable from the new config.
|
|
71
|
+
|
|
72
|
+
When a token expires you have two safe options:
|
|
73
|
+
|
|
74
|
+
- `cortexdb init --api-key <token> --actor <actor>` — keep the same brain
|
|
75
|
+
with a token you already hold (e.g. from your IdP).
|
|
76
|
+
- `cortexdb init --force` — deliberately start a NEW brain. The previous
|
|
77
|
+
identity is backed up to `state.json.replaced` first.
|
|
78
|
+
|
|
79
|
+
For a second brain alongside the first, isolate instead of replacing:
|
|
80
|
+
`cortexdb --config-dir <dir> init`, or set `CORTEXDB_HOME`.
|
|
67
81
|
|
|
68
82
|
## Commands
|
|
69
83
|
|
|
@@ -112,7 +126,9 @@ Force JSON mode any time with `--json`.
|
|
|
112
126
|
- The v1 API requires both `Authorization: Bearer <PASETO>` and `X-Cortex-Actor`.
|
|
113
127
|
The CLI stamps both on every request — you never need to pass them by hand.
|
|
114
128
|
- 401s show the specific error code (`TOKEN_EXPIRED`, `actor_mismatch`, …)
|
|
115
|
-
and the remediation
|
|
129
|
+
and the remediation. Note that `TOKEN_EXPIRED` is **not** fixed by re-running
|
|
130
|
+
`cortexdb init` — see the identity note above; that would mint a different
|
|
131
|
+
brain rather than restore access to yours.
|
|
116
132
|
- 403s cite the missing capability and the policy tier that denied. If a
|
|
117
133
|
recall returns `diagnostics.read denied`, pass `--diagnostics none` —
|
|
118
134
|
free-tier tokens don't carry the `diagnostics.read` capability.
|
|
@@ -1,90 +1,106 @@
|
|
|
1
|
-
# cortexdb-cli
|
|
2
|
-
|
|
3
|
-
Command-line interface for [CortexDB](https://cortexdb.ai) — the long-term memory layer for AI systems.
|
|
4
|
-
|
|
5
|
-
Wraps the v1 HTTP API in a small, fast Click + Rich CLI. Anonymous signup
|
|
6
|
-
in one command, no email or card; works against the public SaaS or any
|
|
7
|
-
self-hosted CortexDB deployment.
|
|
8
|
-
|
|
9
|
-
## Install
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
pip install cortexdb-cli
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Requires Python 3.10+.
|
|
16
|
-
|
|
17
|
-
## Quickstart
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
# 1. One-time setup — anonymous signup, writes ~/.cortexdb/state.json
|
|
21
|
-
cortexdb init
|
|
22
|
-
|
|
23
|
-
# 2. Store a memory
|
|
24
|
-
cortexdb remember "Q3 revenue: $2.4M. We're on track for $10M ARR by year-end."
|
|
25
|
-
|
|
26
|
-
# 3. Recall it
|
|
27
|
-
cortexdb recall "Q3 revenue?"
|
|
28
|
-
|
|
29
|
-
# 4. Or just type — drops into a REPL
|
|
30
|
-
cortexdb
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
The signup token has a 7-day TTL on the free tier.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
cortexdb
|
|
43
|
-
|
|
44
|
-
cortexdb
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
cortexdb
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
1
|
+
# cortexdb-cli
|
|
2
|
+
|
|
3
|
+
Command-line interface for [CortexDB](https://cortexdb.ai) — the long-term memory layer for AI systems.
|
|
4
|
+
|
|
5
|
+
Wraps the v1 HTTP API in a small, fast Click + Rich CLI. Anonymous signup
|
|
6
|
+
in one command, no email or card; works against the public SaaS or any
|
|
7
|
+
self-hosted CortexDB deployment.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pip install cortexdb-cli
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Requires Python 3.10+.
|
|
16
|
+
|
|
17
|
+
## Quickstart
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# 1. One-time setup — anonymous signup, writes ~/.cortexdb/state.json
|
|
21
|
+
cortexdb init
|
|
22
|
+
|
|
23
|
+
# 2. Store a memory
|
|
24
|
+
cortexdb remember "Q3 revenue: $2.4M. We're on track for $10M ARR by year-end."
|
|
25
|
+
|
|
26
|
+
# 3. Recall it
|
|
27
|
+
cortexdb recall "Q3 revenue?"
|
|
28
|
+
|
|
29
|
+
# 4. Or just type — drops into a REPL
|
|
30
|
+
cortexdb
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
The signup token has a 7-day TTL on the free tier.
|
|
34
|
+
|
|
35
|
+
**Re-running `cortexdb init` does not refresh it.** `init` reuses an existing
|
|
36
|
+
identity and changes nothing; against an expired one it refuses and exits 3.
|
|
37
|
+
That is deliberate: a new identity is a new *brain*, and memories written
|
|
38
|
+
under the old actor stay where they are, unreachable from the new config.
|
|
39
|
+
|
|
40
|
+
When a token expires you have two safe options:
|
|
41
|
+
|
|
42
|
+
- `cortexdb init --api-key <token> --actor <actor>` — keep the same brain
|
|
43
|
+
with a token you already hold (e.g. from your IdP).
|
|
44
|
+
- `cortexdb init --force` — deliberately start a NEW brain. The previous
|
|
45
|
+
identity is backed up to `state.json.replaced` first.
|
|
46
|
+
|
|
47
|
+
For a second brain alongside the first, isolate instead of replacing:
|
|
48
|
+
`cortexdb --config-dir <dir> init`, or set `CORTEXDB_HOME`.
|
|
49
|
+
|
|
50
|
+
## Commands
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
cortexdb init anonymous signup; persist token + actor
|
|
54
|
+
cortexdb remember "..." store a memory (POST /v1/experience)
|
|
55
|
+
cortexdb recall "..." recall a stratified context pack
|
|
56
|
+
cortexdb search "..." granular event-level search
|
|
57
|
+
cortexdb forget --memory-id ... delete with audit
|
|
58
|
+
cortexdb episodes {list,get,delete} episode CRUD
|
|
59
|
+
cortexdb entities {list,get,link} entity rollups over the Facts layer
|
|
60
|
+
cortexdb admin {health,usage,layers} diagnostics
|
|
61
|
+
cortexdb import data.json bulk-load (JSON / JSONL / CSV / TXT)
|
|
62
|
+
cortexdb export -o backup.json export memories
|
|
63
|
+
cortexdb config {show,set} view / edit ~/.cortexdb/config.toml
|
|
64
|
+
cortexdb interactive REPL
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Configuration
|
|
68
|
+
|
|
69
|
+
Three layers, in precedence order:
|
|
70
|
+
|
|
71
|
+
1. **CLI flags** — `--api-key`, `--endpoint`, `--actor`, `--scope`, `--profile`
|
|
72
|
+
2. **Environment** — `CORTEXDB_API_KEY`, `CORTEXDB_URL`, `CORTEXDB_ACTOR`, `CORTEXDB_SCOPE`
|
|
73
|
+
3. **Persisted state**:
|
|
74
|
+
- `~/.cortexdb/config.toml` — endpoint, profile names (human-editable)
|
|
75
|
+
- `~/.cortexdb/state.json` — token, actor, scope, expiry (managed by `init`, 0600 on POSIX)
|
|
76
|
+
|
|
77
|
+
The state.json format matches the cortexdb-mcp 0.3.0 server's, so you can
|
|
78
|
+
copy state across to use both tools from the same anonymous identity.
|
|
79
|
+
|
|
80
|
+
## Pipe-friendly
|
|
81
|
+
|
|
82
|
+
Auto-detects when stdout isn't a TTY and emits JSON:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
cortexdb recall "Q3 revenue" | jq .context_block
|
|
86
|
+
cortexdb entities list | jq '.[].subject'
|
|
87
|
+
echo "remember this" | cortexdb remember -
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Force JSON mode any time with `--json`.
|
|
91
|
+
|
|
92
|
+
## Auth notes
|
|
93
|
+
|
|
94
|
+
- The v1 API requires both `Authorization: Bearer <PASETO>` and `X-Cortex-Actor`.
|
|
95
|
+
The CLI stamps both on every request — you never need to pass them by hand.
|
|
96
|
+
- 401s show the specific error code (`TOKEN_EXPIRED`, `actor_mismatch`, …)
|
|
97
|
+
and the remediation. Note that `TOKEN_EXPIRED` is **not** fixed by re-running
|
|
98
|
+
`cortexdb init` — see the identity note above; that would mint a different
|
|
99
|
+
brain rather than restore access to yours.
|
|
100
|
+
- 403s cite the missing capability and the policy tier that denied. If a
|
|
101
|
+
recall returns `diagnostics.read denied`, pass `--diagnostics none` —
|
|
102
|
+
free-tier tokens don't carry the `diagnostics.read` capability.
|
|
103
|
+
|
|
104
|
+
## License
|
|
105
|
+
|
|
106
|
+
Apache-2.0
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"""CortexDB CLI - command-line interface for the v1 memory API."""
|
|
2
|
-
|
|
3
|
-
__version__ = "0.5.
|
|
1
|
+
"""CortexDB CLI - command-line interface for the v1 memory API."""
|
|
2
|
+
|
|
3
|
+
__version__ = "0.5.4"
|
|
@@ -63,6 +63,14 @@ class CortexClient:
|
|
|
63
63
|
) -> httpx.Response:
|
|
64
64
|
return self._http.post(path, json=json, params=params)
|
|
65
65
|
|
|
66
|
+
def put(
|
|
67
|
+
self,
|
|
68
|
+
path: str,
|
|
69
|
+
json: dict[str, Any] | None = None,
|
|
70
|
+
params: dict[str, Any] | None = None,
|
|
71
|
+
) -> httpx.Response:
|
|
72
|
+
return self._http.put(path, json=json, params=params)
|
|
73
|
+
|
|
66
74
|
def delete(self, path: str, params: dict[str, Any] | None = None) -> httpx.Response:
|
|
67
75
|
return self._http.delete(path, params=params)
|
|
68
76
|
|