mem-os-python 1.6.27__py3-none-any.whl
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.
- mem_os_python-1.6.27.dist-info/METADATA +1032 -0
- mem_os_python-1.6.27.dist-info/RECORD +253 -0
- mem_os_python-1.6.27.dist-info/WHEEL +4 -0
- mem_os_python-1.6.27.dist-info/entry_points.txt +2 -0
- mem_os_python-1.6.27.dist-info/licenses/LICENSE +21 -0
- memos/__init__.py +16 -0
- memos/_js/adapters/anthropic.d.ts +279 -0
- memos/_js/adapters/anthropic.d.ts.map +1 -0
- memos/_js/adapters/anthropic.js +348 -0
- memos/_js/adapters/anthropic.js.map +1 -0
- memos/_js/adapters/base.d.ts +10 -0
- memos/_js/adapters/base.d.ts.map +1 -0
- memos/_js/adapters/base.js +2 -0
- memos/_js/adapters/base.js.map +1 -0
- memos/_js/adapters/openai.d.ts +264 -0
- memos/_js/adapters/openai.d.ts.map +1 -0
- memos/_js/adapters/openai.js +342 -0
- memos/_js/adapters/openai.js.map +1 -0
- memos/_js/apps/explorer.d.ts +244 -0
- memos/_js/apps/explorer.d.ts.map +1 -0
- memos/_js/apps/explorer.js +738 -0
- memos/_js/apps/explorer.js.map +1 -0
- memos/_js/citations.d.ts +65 -0
- memos/_js/citations.d.ts.map +1 -0
- memos/_js/citations.js +143 -0
- memos/_js/citations.js.map +1 -0
- memos/_js/cli-browse.d.ts +3 -0
- memos/_js/cli-browse.d.ts.map +1 -0
- memos/_js/cli-browse.js +129 -0
- memos/_js/cli-browse.js.map +1 -0
- memos/_js/cli-completion.d.ts +31 -0
- memos/_js/cli-completion.d.ts.map +1 -0
- memos/_js/cli-completion.js +340 -0
- memos/_js/cli-completion.js.map +1 -0
- memos/_js/cli-help.d.ts +18 -0
- memos/_js/cli-help.d.ts.map +1 -0
- memos/_js/cli-help.js +357 -0
- memos/_js/cli-help.js.map +1 -0
- memos/_js/cli.d.ts +28 -0
- memos/_js/cli.d.ts.map +1 -0
- memos/_js/cli.js +2880 -0
- memos/_js/cli.js.map +1 -0
- memos/_js/compression.d.ts +25 -0
- memos/_js/compression.d.ts.map +1 -0
- memos/_js/compression.js +319 -0
- memos/_js/compression.js.map +1 -0
- memos/_js/confidence-machine.d.ts +99 -0
- memos/_js/confidence-machine.d.ts.map +1 -0
- memos/_js/confidence-machine.js +222 -0
- memos/_js/confidence-machine.js.map +1 -0
- memos/_js/context-pack.d.ts +506 -0
- memos/_js/context-pack.d.ts.map +1 -0
- memos/_js/context-pack.js +1435 -0
- memos/_js/context-pack.js.map +1 -0
- memos/_js/contradictions.d.ts +160 -0
- memos/_js/contradictions.d.ts.map +1 -0
- memos/_js/contradictions.js +255 -0
- memos/_js/contradictions.js.map +1 -0
- memos/_js/dashboard.d.ts +30 -0
- memos/_js/dashboard.d.ts.map +1 -0
- memos/_js/dashboard.js +302 -0
- memos/_js/dashboard.js.map +1 -0
- memos/_js/ebbinghaus.d.ts +29 -0
- memos/_js/ebbinghaus.d.ts.map +1 -0
- memos/_js/ebbinghaus.js +32 -0
- memos/_js/ebbinghaus.js.map +1 -0
- memos/_js/embedding-queue.d.ts +190 -0
- memos/_js/embedding-queue.d.ts.map +1 -0
- memos/_js/embedding-queue.js +316 -0
- memos/_js/embedding-queue.js.map +1 -0
- memos/_js/embeddings.d.ts +187 -0
- memos/_js/embeddings.d.ts.map +1 -0
- memos/_js/embeddings.js +633 -0
- memos/_js/embeddings.js.map +1 -0
- memos/_js/entity-extraction.d.ts +54 -0
- memos/_js/entity-extraction.d.ts.map +1 -0
- memos/_js/entity-extraction.js +325 -0
- memos/_js/entity-extraction.js.map +1 -0
- memos/_js/entity-index.d.ts +93 -0
- memos/_js/entity-index.d.ts.map +1 -0
- memos/_js/entity-index.js +165 -0
- memos/_js/entity-index.js.map +1 -0
- memos/_js/event-memory.d.ts +147 -0
- memos/_js/event-memory.d.ts.map +1 -0
- memos/_js/event-memory.js +290 -0
- memos/_js/event-memory.js.map +1 -0
- memos/_js/external-import.d.ts +98 -0
- memos/_js/external-import.d.ts.map +1 -0
- memos/_js/external-import.js +669 -0
- memos/_js/external-import.js.map +1 -0
- memos/_js/fidelity.d.ts +367 -0
- memos/_js/fidelity.d.ts.map +1 -0
- memos/_js/fidelity.js +911 -0
- memos/_js/fidelity.js.map +1 -0
- memos/_js/graph-expansion.d.ts +119 -0
- memos/_js/graph-expansion.d.ts.map +1 -0
- memos/_js/graph-expansion.js +213 -0
- memos/_js/graph-expansion.js.map +1 -0
- memos/_js/graph-mermaid.d.ts +13 -0
- memos/_js/graph-mermaid.d.ts.map +1 -0
- memos/_js/graph-mermaid.js +32 -0
- memos/_js/graph-mermaid.js.map +1 -0
- memos/_js/graph.d.ts +170 -0
- memos/_js/graph.d.ts.map +1 -0
- memos/_js/graph.js +482 -0
- memos/_js/graph.js.map +1 -0
- memos/_js/harness.d.ts +63 -0
- memos/_js/harness.d.ts.map +1 -0
- memos/_js/harness.js +93 -0
- memos/_js/harness.js.map +1 -0
- memos/_js/importance.d.ts +118 -0
- memos/_js/importance.d.ts.map +1 -0
- memos/_js/importance.js +144 -0
- memos/_js/importance.js.map +1 -0
- memos/_js/index.d.ts +51 -0
- memos/_js/index.d.ts.map +1 -0
- memos/_js/index.js +53 -0
- memos/_js/index.js.map +1 -0
- memos/_js/mcp.d.ts +58 -0
- memos/_js/mcp.d.ts.map +1 -0
- memos/_js/mcp.js +1853 -0
- memos/_js/mcp.js.map +1 -0
- memos/_js/memory.d.ts +1762 -0
- memos/_js/memory.d.ts.map +1 -0
- memos/_js/memory.js +6283 -0
- memos/_js/memory.js.map +1 -0
- memos/_js/procedural.d.ts +74 -0
- memos/_js/procedural.d.ts.map +1 -0
- memos/_js/procedural.js +125 -0
- memos/_js/procedural.js.map +1 -0
- memos/_js/project-config.d.ts +68 -0
- memos/_js/project-config.d.ts.map +1 -0
- memos/_js/project-config.js +59 -0
- memos/_js/project-config.js.map +1 -0
- memos/_js/proof-of-forgetting.d.ts +57 -0
- memos/_js/proof-of-forgetting.d.ts.map +1 -0
- memos/_js/proof-of-forgetting.js +80 -0
- memos/_js/proof-of-forgetting.js.map +1 -0
- memos/_js/provenance.d.ts +122 -0
- memos/_js/provenance.d.ts.map +1 -0
- memos/_js/provenance.js +182 -0
- memos/_js/provenance.js.map +1 -0
- memos/_js/quarantine-commands.d.ts +23 -0
- memos/_js/quarantine-commands.d.ts.map +1 -0
- memos/_js/quarantine-commands.js +42 -0
- memos/_js/quarantine-commands.js.map +1 -0
- memos/_js/quarantine.d.ts +120 -0
- memos/_js/quarantine.d.ts.map +1 -0
- memos/_js/quarantine.js +873 -0
- memos/_js/quarantine.js.map +1 -0
- memos/_js/redact.d.ts +12 -0
- memos/_js/redact.d.ts.map +1 -0
- memos/_js/redact.js +26 -0
- memos/_js/redact.js.map +1 -0
- memos/_js/repl.d.ts +57 -0
- memos/_js/repl.d.ts.map +1 -0
- memos/_js/repl.js +295 -0
- memos/_js/repl.js.map +1 -0
- memos/_js/rerank-local.d.ts +61 -0
- memos/_js/rerank-local.d.ts.map +1 -0
- memos/_js/rerank-local.js +210 -0
- memos/_js/rerank-local.js.map +1 -0
- memos/_js/retain-filter.d.ts +98 -0
- memos/_js/retain-filter.d.ts.map +1 -0
- memos/_js/retain-filter.js +232 -0
- memos/_js/retain-filter.js.map +1 -0
- memos/_js/retrieval.d.ts +265 -0
- memos/_js/retrieval.d.ts.map +1 -0
- memos/_js/retrieval.js +1018 -0
- memos/_js/retrieval.js.map +1 -0
- memos/_js/revert.d.ts +77 -0
- memos/_js/revert.d.ts.map +1 -0
- memos/_js/revert.js +252 -0
- memos/_js/revert.js.map +1 -0
- memos/_js/scope.d.ts +30 -0
- memos/_js/scope.d.ts.map +1 -0
- memos/_js/scope.js +71 -0
- memos/_js/scope.js.map +1 -0
- memos/_js/semantic-screen.d.ts +152 -0
- memos/_js/semantic-screen.d.ts.map +1 -0
- memos/_js/semantic-screen.js +290 -0
- memos/_js/semantic-screen.js.map +1 -0
- memos/_js/session-hooks.d.ts +127 -0
- memos/_js/session-hooks.d.ts.map +1 -0
- memos/_js/session-hooks.js +482 -0
- memos/_js/session-hooks.js.map +1 -0
- memos/_js/storage/sqlite.d.ts +427 -0
- memos/_js/storage/sqlite.d.ts.map +1 -0
- memos/_js/storage/sqlite.js +2428 -0
- memos/_js/storage/sqlite.js.map +1 -0
- memos/_js/sync.d.ts +213 -0
- memos/_js/sync.d.ts.map +1 -0
- memos/_js/sync.js +389 -0
- memos/_js/sync.js.map +1 -0
- memos/_js/tamper-log.d.ts +98 -0
- memos/_js/tamper-log.d.ts.map +1 -0
- memos/_js/tamper-log.js +327 -0
- memos/_js/tamper-log.js.map +1 -0
- memos/_js/temporal.d.ts +92 -0
- memos/_js/temporal.d.ts.map +1 -0
- memos/_js/temporal.js +536 -0
- memos/_js/temporal.js.map +1 -0
- memos/_js/time-travel.d.ts +38 -0
- memos/_js/time-travel.d.ts.map +1 -0
- memos/_js/time-travel.js +46 -0
- memos/_js/time-travel.js.map +1 -0
- memos/_js/timestamp-format.d.ts +18 -0
- memos/_js/timestamp-format.d.ts.map +1 -0
- memos/_js/timestamp-format.js +52 -0
- memos/_js/timestamp-format.js.map +1 -0
- memos/_js/triple-extraction.d.ts +31 -0
- memos/_js/triple-extraction.d.ts.map +1 -0
- memos/_js/triple-extraction.js +116 -0
- memos/_js/triple-extraction.js.map +1 -0
- memos/_js/types.d.ts +2474 -0
- memos/_js/types.d.ts.map +1 -0
- memos/_js/types.js +20 -0
- memos/_js/types.js.map +1 -0
- memos/_js/updater.d.ts +95 -0
- memos/_js/updater.d.ts.map +1 -0
- memos/_js/updater.js +268 -0
- memos/_js/updater.js.map +1 -0
- memos/_js/version.d.ts +17 -0
- memos/_js/version.d.ts.map +1 -0
- memos/_js/version.js +34 -0
- memos/_js/version.js.map +1 -0
- memos/_js/vision/clip-query-cache.d.ts +58 -0
- memos/_js/vision/clip-query-cache.d.ts.map +1 -0
- memos/_js/vision/clip-query-cache.js +79 -0
- memos/_js/vision/clip-query-cache.js.map +1 -0
- memos/_js/vision/clip.d.ts +113 -0
- memos/_js/vision/clip.d.ts.map +1 -0
- memos/_js/vision/clip.js +224 -0
- memos/_js/vision/clip.js.map +1 -0
- memos/_js/vision/fake-clip.d.ts +55 -0
- memos/_js/vision/fake-clip.d.ts.map +1 -0
- memos/_js/vision/fake-clip.js +122 -0
- memos/_js/vision/fake-clip.js.map +1 -0
- memos/_js/vision/index.d.ts +15 -0
- memos/_js/vision/index.d.ts.map +1 -0
- memos/_js/vision/index.js +13 -0
- memos/_js/vision/index.js.map +1 -0
- memos/_js/vision/store.d.ts +137 -0
- memos/_js/vision/store.d.ts.map +1 -0
- memos/_js/vision/store.js +383 -0
- memos/_js/vision/store.js.map +1 -0
- memos/adapters/__init__.py +0 -0
- memos/adapters/crewai.py +385 -0
- memos/adapters/langchain.py +301 -0
- memos/adapters/ollama.py +396 -0
- memos/server/__init__.py +0 -0
- memos/server/main.py +547 -0
- memos/server/routes.py +360 -0
memos/_js/cli-help.js
ADDED
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared CLI help data: the canonical command list, did-you-mean suggestions,
|
|
3
|
+
* and per-command usage text for `memos <command> --help`.
|
|
4
|
+
*
|
|
5
|
+
* Kept in its own module (no process.argv reads) so it can be unit-tested.
|
|
6
|
+
*
|
|
7
|
+
* @module @memos/cli-help
|
|
8
|
+
*/
|
|
9
|
+
/** Every command the CLI actually implements (mirrors the dispatch in cli.ts). */
|
|
10
|
+
export const CLI_COMMANDS = [
|
|
11
|
+
"init",
|
|
12
|
+
"store",
|
|
13
|
+
"retrieve",
|
|
14
|
+
"search",
|
|
15
|
+
"forget",
|
|
16
|
+
"summarize",
|
|
17
|
+
"graph",
|
|
18
|
+
"browse",
|
|
19
|
+
"image",
|
|
20
|
+
"link",
|
|
21
|
+
"count",
|
|
22
|
+
"tag",
|
|
23
|
+
"untag",
|
|
24
|
+
"list",
|
|
25
|
+
"export",
|
|
26
|
+
"backup",
|
|
27
|
+
"restore",
|
|
28
|
+
"import-external",
|
|
29
|
+
"import",
|
|
30
|
+
"learn",
|
|
31
|
+
"lesson",
|
|
32
|
+
"lessons",
|
|
33
|
+
"cite",
|
|
34
|
+
"quarantine",
|
|
35
|
+
"harness",
|
|
36
|
+
"history",
|
|
37
|
+
"revert",
|
|
38
|
+
"reminders",
|
|
39
|
+
"remind",
|
|
40
|
+
"digest",
|
|
41
|
+
"consolidate",
|
|
42
|
+
"encrypt",
|
|
43
|
+
"decrypt",
|
|
44
|
+
"stats",
|
|
45
|
+
"compact",
|
|
46
|
+
"doctor",
|
|
47
|
+
"connect",
|
|
48
|
+
"reindex-embeddings",
|
|
49
|
+
"extract-facts",
|
|
50
|
+
"session-hook",
|
|
51
|
+
"dashboard",
|
|
52
|
+
"sync",
|
|
53
|
+
"log",
|
|
54
|
+
"beta",
|
|
55
|
+
"update",
|
|
56
|
+
"mcp",
|
|
57
|
+
"trio",
|
|
58
|
+
"completion",
|
|
59
|
+
"help",
|
|
60
|
+
];
|
|
61
|
+
/** Classic Levenshtein edit distance (small inputs; clarity over speed). */
|
|
62
|
+
function levenshtein(a, b) {
|
|
63
|
+
const prev = Array.from({ length: b.length + 1 }, (_, i) => i);
|
|
64
|
+
for (let i = 1; i <= a.length; i++) {
|
|
65
|
+
const curr = [i];
|
|
66
|
+
for (let j = 1; j <= b.length; j++) {
|
|
67
|
+
curr[j] = Math.min(prev[j] + 1, curr[j - 1] + 1, prev[j - 1] + (a[i - 1] === b[j - 1] ? 0 : 1));
|
|
68
|
+
}
|
|
69
|
+
for (let j = 0; j <= b.length; j++)
|
|
70
|
+
prev[j] = curr[j];
|
|
71
|
+
}
|
|
72
|
+
return prev[b.length];
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Suggest the most likely intended command for a typo'd input.
|
|
76
|
+
* Returns null when nothing is close enough to be helpful.
|
|
77
|
+
*/
|
|
78
|
+
export function suggestCommand(input) {
|
|
79
|
+
if (!input)
|
|
80
|
+
return null;
|
|
81
|
+
let best = null;
|
|
82
|
+
let bestDist = Infinity;
|
|
83
|
+
for (const cmd of CLI_COMMANDS) {
|
|
84
|
+
if (cmd === "help")
|
|
85
|
+
continue;
|
|
86
|
+
const dist = levenshtein(input.toLowerCase(), cmd);
|
|
87
|
+
if (dist < bestDist) {
|
|
88
|
+
bestDist = dist;
|
|
89
|
+
best = cmd;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
if (best === null)
|
|
93
|
+
return null;
|
|
94
|
+
// Accept only genuinely close matches: small absolute distance for short
|
|
95
|
+
// words, or within ~40% of the input length for longer ones.
|
|
96
|
+
const threshold = Math.max(2, Math.floor(input.length * 0.4));
|
|
97
|
+
return bestDist <= threshold ? best : null;
|
|
98
|
+
}
|
|
99
|
+
/** One-paragraph usage for each command, shown by `memos <command> --help`. */
|
|
100
|
+
const COMMAND_HELP = {
|
|
101
|
+
init: `memos init [--yes]
|
|
102
|
+
|
|
103
|
+
Interactive setup wizard: picks the database path and embedding provider,
|
|
104
|
+
runs a store → search → forget smoke test, and saves ~/.memos/config.json.
|
|
105
|
+
--yes accepts all defaults (for scripts; also auto-detected when stdin is
|
|
106
|
+
not a TTY). Environment variables (MEMOS_DB_PATH, MEMOS_EMBEDDING_*)
|
|
107
|
+
always override the saved config.`,
|
|
108
|
+
store: `memos store "<content>" [--type <type>] [--ttl <seconds>]
|
|
109
|
+
[--pool <pool>] [--context <ctx>] [--scope user:alice[,agent:coder][,run:r1]]
|
|
110
|
+
[--tags a,b] [--json]
|
|
111
|
+
|
|
112
|
+
Store a new memory. Example:
|
|
113
|
+
memos store "User prefers dark mode" --type preference`,
|
|
114
|
+
retrieve: `memos retrieve <id> [--json]
|
|
115
|
+
|
|
116
|
+
Retrieve a single memory by its ID.`,
|
|
117
|
+
search: `memos search "<query>" [--limit <n>] [--pool event|note|procedure]
|
|
118
|
+
[--scope user:alice[,...]] [--harness <name|all>] [--json]
|
|
119
|
+
|
|
120
|
+
Search memories by text (full-text + semantic when embeddings are on).
|
|
121
|
+
Example:
|
|
122
|
+
memos search "dark mode" --limit 5`,
|
|
123
|
+
forget: `memos forget <id> [--json]
|
|
124
|
+
|
|
125
|
+
Delete a memory by ID. The deletion is recorded in the bitemporal ledger,
|
|
126
|
+
so it can be audited (see: memos history <id>).`,
|
|
127
|
+
summarize: `memos summarize [--json]
|
|
128
|
+
|
|
129
|
+
Print a summary of all stored memories.`,
|
|
130
|
+
graph: `memos graph [--mermaid] [--json]
|
|
131
|
+
|
|
132
|
+
Print the full memory graph. --mermaid emits a GitHub-renderable
|
|
133
|
+
Mermaid diagram (memos graph --mermaid > graph.mmd).`,
|
|
134
|
+
browse: `memos browse
|
|
135
|
+
|
|
136
|
+
Interactive terminal browser: search, inspect, and forget memories.`,
|
|
137
|
+
image: `memos image add <path|url> [--caption <text>] [--kind <kind>] [--tags a,b]
|
|
138
|
+
memos image list [--limit <n>]
|
|
139
|
+
memos image search <query> [--limit <n>]
|
|
140
|
+
memos image show <ref|id> [--out <path>]
|
|
141
|
+
memos image purge
|
|
142
|
+
|
|
143
|
+
Image memories. Requires --vision (caption track only) or
|
|
144
|
+
--vision-clip (also matches image pixels with CLIP). Both can be set
|
|
145
|
+
permanently in .memos.json under "vision".
|
|
146
|
+
|
|
147
|
+
add Store an image. The caption becomes the memory's text, so
|
|
148
|
+
keyword and semantic search find it like any other memory.
|
|
149
|
+
--kind sets the taxonomy (photo|screenshot|chart|diagram|
|
|
150
|
+
memo|meme|other); --tags adds filter tags.
|
|
151
|
+
list List stored images, newest first.
|
|
152
|
+
search Find images by query — caption leg always, CLIP pixel leg
|
|
153
|
+
when --vision-clip is on.
|
|
154
|
+
show Resolve an [img:...] ref (or a node id) back to its bytes.
|
|
155
|
+
--out writes them to a file.
|
|
156
|
+
purge Delete blobs no live node references any more.`,
|
|
157
|
+
link: `memos link <src-id> <dst-id> [--json]
|
|
158
|
+
|
|
159
|
+
Create an explicit link between two memories.`,
|
|
160
|
+
count: `memos count [--json]
|
|
161
|
+
|
|
162
|
+
Show the number of stored memories.`,
|
|
163
|
+
tag: `memos tag <id> <tag> [tag...] [--json]
|
|
164
|
+
|
|
165
|
+
Add one or more tags to a memory.`,
|
|
166
|
+
untag: `memos untag <id> <tag> [tag...] [--json]
|
|
167
|
+
|
|
168
|
+
Remove one or more tags from a memory.`,
|
|
169
|
+
list: `memos list --tag <tag> [--json]
|
|
170
|
+
|
|
171
|
+
List memories carrying a tag.`,
|
|
172
|
+
export: `memos export [--format json|markdown|obsidian] [--output <path>]
|
|
173
|
+
[--tag <tag>]
|
|
174
|
+
|
|
175
|
+
Export memories to a file. Example:
|
|
176
|
+
memos export --format markdown --output ./my-export`,
|
|
177
|
+
backup: `memos backup [--output <path>]
|
|
178
|
+
|
|
179
|
+
Back up the database file (default: ./memos-backup-<timestamp>.db).`,
|
|
180
|
+
restore: `memos restore <path>
|
|
181
|
+
|
|
182
|
+
Restore the database from a backup file.`,
|
|
183
|
+
"import-external": `memos import-external <file> [--source auto|chatgpt|claude|generic]
|
|
184
|
+
[--dry-run] [--max-items <n>] [--namespace <ns>]
|
|
185
|
+
|
|
186
|
+
Import a ChatGPT/Claude memory export file.`,
|
|
187
|
+
import: `memos import --from chatgpt|claude|slack (--file <path> | --dir <path>)
|
|
188
|
+
[--synthesize] [--dry-run] [--max-items <n>] [--namespace <ns>]
|
|
189
|
+
|
|
190
|
+
Import a chat export. --dry-run previews without writing.`,
|
|
191
|
+
learn: `memos learn "<lesson>" [--context <ctx>] [--tags a,b] [--json]
|
|
192
|
+
|
|
193
|
+
Capture a procedural lesson — behavioral guidance, not a fact.`,
|
|
194
|
+
lesson: `memos lesson <id> --outcome success|failure [--json]
|
|
195
|
+
|
|
196
|
+
Record a lesson outcome: reinforces or demotes the lesson's score.`,
|
|
197
|
+
lessons: `memos lessons [--namespace <ns>] [--limit <n>] [--json]
|
|
198
|
+
|
|
199
|
+
List procedural lessons.`,
|
|
200
|
+
cite: `memos cite <id> [--json]
|
|
201
|
+
|
|
202
|
+
Trace a [mem:xxxx] citation token back to its full source memory.`,
|
|
203
|
+
quarantine: `memos quarantine <list|release> [--limit <n>] [--json]
|
|
204
|
+
|
|
205
|
+
Review the write-gate quarantine queue: list flagged memories, or release
|
|
206
|
+
one back into recall.`,
|
|
207
|
+
harness: `memos harness <list|merge> [--from <db-path>] [--dry-run] [--json]
|
|
208
|
+
|
|
209
|
+
Cross-harness memory: per-harness memory counts (list), or merge another
|
|
210
|
+
harness's DB file into this one (merge).`,
|
|
211
|
+
history: `memos history <id> [--json]
|
|
212
|
+
|
|
213
|
+
Version timeline for one memory: supersedes / superseded-by / derived notes.`,
|
|
214
|
+
revert: `memos revert (--last | --id <id> | --about <topic> | "<natural language>")
|
|
215
|
+
[--dry-run] [--reason <r>] [--actor <a>] [--json]
|
|
216
|
+
|
|
217
|
+
Revert a memory to its previous version. Natural language works too:
|
|
218
|
+
memos revert "forget the last thing I told you"`,
|
|
219
|
+
reminders: `memos reminders [--due] [--namespace <ns>] [--json]
|
|
220
|
+
|
|
221
|
+
List scheduled event reminders, earliest first. --due shows only reminders
|
|
222
|
+
due as of now.`,
|
|
223
|
+
remind: `memos remind "<text>" at <when> [--json]
|
|
224
|
+
|
|
225
|
+
Store a reminder firing at <when>. Example:
|
|
226
|
+
memos remind "call mom" at tomorrow 9am`,
|
|
227
|
+
digest: `memos digest [--json]
|
|
228
|
+
|
|
229
|
+
Run consolidation now and print a summary.`,
|
|
230
|
+
consolidate: `memos consolidate [--dry-run] [--no-summarize] [--no-decay]
|
|
231
|
+
[--decay-half-life <days>] [--min-retention <score>] [--older-than <days>]
|
|
232
|
+
[--namespace <ns>] [--watch] [--interval-min <n>]
|
|
233
|
+
|
|
234
|
+
Offline maintenance pass: merge duplicates, archive stale memories,
|
|
235
|
+
supersede decayed ones (kept as history), distill cluster summary notes.`,
|
|
236
|
+
encrypt: `memos encrypt --db <path> --key <key>
|
|
237
|
+
|
|
238
|
+
Encrypt the database in place (requires better-sqlite3-multiple-ciphers).
|
|
239
|
+
The key can also come from the MEMOS_KEY environment variable. The
|
|
240
|
+
previous plaintext file is kept as a backup.`,
|
|
241
|
+
decrypt: `memos decrypt --db <path> --key <key>
|
|
242
|
+
|
|
243
|
+
Remove encryption in place. The previous encrypted file is kept as a backup.`,
|
|
244
|
+
stats: `memos stats [--json]
|
|
245
|
+
|
|
246
|
+
Token-savings telemetry for this process (packs built, tokens injected
|
|
247
|
+
vs naive baseline).`,
|
|
248
|
+
compact: `memos compact [--stats] [--namespace <ns>] [--limit <n>] [--dry-run]
|
|
249
|
+
|
|
250
|
+
Fidelity backfill: generate missing L1/L2 levels for stored memories.
|
|
251
|
+
--stats shows average tokens per level.`,
|
|
252
|
+
doctor: `memos doctor [--json]
|
|
253
|
+
|
|
254
|
+
Health-check the store, embedding config, and endpoints. Prints findings
|
|
255
|
+
with pointers to the Troubleshooting Playbook.`,
|
|
256
|
+
connect: `memos connect <target> [--write] [--json]
|
|
257
|
+
|
|
258
|
+
Register the MemOS MCP server with a coding harness: claude-code, cursor,
|
|
259
|
+
windsurf, cline, opencode, codex, gemini, or generic. --write saves the
|
|
260
|
+
config to the harness.`,
|
|
261
|
+
"reindex-embeddings": `memos reindex-embeddings [--purge-stale]
|
|
262
|
+
|
|
263
|
+
Re-embed all memories with the configured provider. --purge-stale deletes
|
|
264
|
+
vectors produced by other models first.`,
|
|
265
|
+
"extract-facts": `memos extract-facts --transcript <path> [--namespace <ns>]
|
|
266
|
+
[--min-confidence <n>] [--dry-run] [--json]
|
|
267
|
+
|
|
268
|
+
Extract durable facts from a session transcript (Claude Code JSONL or
|
|
269
|
+
plain text) and store them. Uses the same extractFacts() path as the
|
|
270
|
+
session hook. --dry-run shows what would be stored without writing.`,
|
|
271
|
+
"session-hook": `memos session-hook [--transcript <path>] [--opencode-session <id>] [--namespace <ns>] [--json]
|
|
272
|
+
|
|
273
|
+
Session-end hook entrypoint for Claude Code / OpenCode. Claude Code
|
|
274
|
+
passes hook JSON (with transcript_path) on stdin; the OpenCode plugin
|
|
275
|
+
passes --opencode-session <id> and memos loads the session from
|
|
276
|
+
OpenCode's data dir. Extracts durable facts from the transcript and
|
|
277
|
+
stores them. Fail-open: never breaks session teardown. Set
|
|
278
|
+
MEMOS_SKIP_SESSION_HOOK=1 to opt out.`,
|
|
279
|
+
dashboard: `memos dashboard [--port <n>] [--no-open]
|
|
280
|
+
|
|
281
|
+
Start a local web dashboard for browsing, searching, and visualizing
|
|
282
|
+
the memory graph. Opens the browser automatically unless --no-open.
|
|
283
|
+
The server binds to 127.0.0.1 only.`,
|
|
284
|
+
sync: `memos sync <export|import|status> [options]
|
|
285
|
+
|
|
286
|
+
Encrypted cross-machine sync. Export memories to an encrypted bundle,
|
|
287
|
+
move it to another machine yourself (cloud drive, USB, scp), and import
|
|
288
|
+
it there.
|
|
289
|
+
|
|
290
|
+
memos sync export --output <file> [--passphrase <passphrase> | --passphrase-file <path>]
|
|
291
|
+
memos sync import --input <file> [--strategy skip-existing|last-write-wins]
|
|
292
|
+
memos sync status --input <file>
|
|
293
|
+
|
|
294
|
+
AES-256-GCM: every record field (id, content, type, tags, timestamps…)
|
|
295
|
+
is encrypted; bundle metadata is authenticated. The key can be a
|
|
296
|
+
passphrase (PBKDF2-derived, prompted interactively on a TTY when not
|
|
297
|
+
given), a 32-byte key file, or MEMOS_SYNC_KEY. Import preserves
|
|
298
|
+
original IDs and timestamps; content-identical records are never
|
|
299
|
+
duplicated. Local-first: import only adds, or replaces the conflicting
|
|
300
|
+
record under last-write-wins.`,
|
|
301
|
+
beta: `memos beta [enable|disable|status]
|
|
302
|
+
|
|
303
|
+
Opt in or out of the beta channel. With beta enabled, memos checks (at most
|
|
304
|
+
every 6 hours, cached) whether a newer fully-successful main commit exists —
|
|
305
|
+
CI, Prebuilds, and CodeQL all green — and prompts you to update. Default: off.`,
|
|
306
|
+
update: `memos update [--check] [--yes]
|
|
307
|
+
|
|
308
|
+
Check for the newest fully-successful main commit (CI, Prebuilds, and CodeQL
|
|
309
|
+
all green) and install it from source. Beta users are prompted automatically;
|
|
310
|
+
this command works for anyone.
|
|
311
|
+
|
|
312
|
+
memos update --check just report what's available, don't install
|
|
313
|
+
memos update --yes install without asking (for scripts)
|
|
314
|
+
|
|
315
|
+
Installing builds from source with pnpm (PATH or corepack) into
|
|
316
|
+
$MEMOS_HOME/beta/<sha> and repoints $MEMOS_HOME/bin/memos at it.`,
|
|
317
|
+
mcp: `memos mcp [--db <path>]
|
|
318
|
+
|
|
319
|
+
Start the MemOS MCP stdio server (for MCP clients to connect to).`,
|
|
320
|
+
trio: `memos trio [--up]
|
|
321
|
+
|
|
322
|
+
Show (or with --up, launch) the full AI Trio: MemOS + LLM-Guardian +
|
|
323
|
+
Universal-MCP-Toolkit.`,
|
|
324
|
+
completion: `memos completion <bash|zsh|fish>
|
|
325
|
+
|
|
326
|
+
Print a shell completion script to stdout. Install it, e.g.:
|
|
327
|
+
memos completion bash >> ~/.bashrc
|
|
328
|
+
memos completion zsh > ~/.zfunc/_memos # with ~/.zfunc on $fpath
|
|
329
|
+
memos completion fish > ~/.config/fish/completions/memos.fish`,
|
|
330
|
+
log: `memos log <verify|show|checkpoint> [options]
|
|
331
|
+
|
|
332
|
+
Tamper-evident mutation log. Every memory mutation (store, import,
|
|
333
|
+
update, forget) appends a hash-chained entry; verify recomputes the
|
|
334
|
+
chain and cross-checks each node's current content against its latest
|
|
335
|
+
log entry.
|
|
336
|
+
|
|
337
|
+
memos log verify [--expect <hash>] Verify the chain; exit 1 on tampering.
|
|
338
|
+
memos log show [--limit N] Print the N most recent entries.
|
|
339
|
+
memos log checkpoint Print the tip hash to anchor externally.
|
|
340
|
+
|
|
341
|
+
The log detects edited/deleted/reordered rows and nodes changed
|
|
342
|
+
directly in the DB — but a full-chain rewrite by someone with raw DB
|
|
343
|
+
write access is only provable against an external checkpoint: write
|
|
344
|
+
the checkpoint hash down somewhere the DB writer can't reach (paper,
|
|
345
|
+
another machine, a signed commit), then verify with --expect later.`,
|
|
346
|
+
help: `memos help
|
|
347
|
+
|
|
348
|
+
Show the full command list. For one command: memos <command> --help`,
|
|
349
|
+
};
|
|
350
|
+
/** Usage text for one command, or null for unknown commands. */
|
|
351
|
+
export function getCommandHelp(command) {
|
|
352
|
+
const body = COMMAND_HELP[command];
|
|
353
|
+
if (!body)
|
|
354
|
+
return null;
|
|
355
|
+
return `\nMemOS — ${command}\n\n${body}\n`;
|
|
356
|
+
}
|
|
357
|
+
//# sourceMappingURL=cli-help.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-help.js","sourceRoot":"","sources":["../src/cli-help.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,kFAAkF;AAClF,MAAM,CAAC,MAAM,YAAY,GAAsB;IAC7C,MAAM;IACN,OAAO;IACP,UAAU;IACV,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,OAAO;IACP,QAAQ;IACR,OAAO;IACP,MAAM;IACN,OAAO;IACP,KAAK;IACL,OAAO;IACP,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,iBAAiB;IACjB,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,SAAS;IACT,MAAM;IACN,YAAY;IACZ,SAAS;IACT,SAAS;IACT,QAAQ;IACR,WAAW;IACX,QAAQ;IACR,QAAQ;IACR,aAAa;IACb,SAAS;IACT,SAAS;IACT,OAAO;IACP,SAAS;IACT,QAAQ;IACR,SAAS;IACT,oBAAoB;IACpB,eAAe;IACf,cAAc;IACd,WAAW;IACX,MAAM;IACN,KAAK;IACL,MAAM;IACN,QAAQ;IACR,KAAK;IACL,MAAM;IACN,YAAY;IACZ,MAAM;CACP,CAAC;AAEF,4EAA4E;AAC5E,SAAS,WAAW,CAAC,CAAS,EAAE,CAAS;IACvC,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAA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EkE;IAC3E,MAAM,EAAE;;;;kDAIwC;IAChD,SAAS,EAAE;;;eAGE;IACb,MAAM,EAAE;;;0CAGgC;IACxC,MAAM,EAAE;;2CAEiC;IACzC,WAAW,EAAE;;;;;yEAK0D;IACvE,OAAO,EAAE;;;;6CAIkC;IAC3C,OAAO,EAAE;;6EAEkE;IAC3E,KAAK,EAAE;;;oBAGW;IAClB,OAAO,EAAE;;;wCAG6B;IACtC,MAAM,EAAE;;;+CAGqC;IAC7C,OAAO,EAAE;;;;uBAIY;IACrB,oBAAoB,EAAE;;;wCAGgB;IACtC,eAAe,EAAE;;;;;oEAKiD;IAClE,cAAc,EAAE;;;;;;;sCAOoB;IACpC,SAAS,EAAE;;;;oCAIuB;IAClC,IAAI,EAAE;;;;;;;;;;;;;;;;8BAgBsB;IAC5B,IAAI,EAAE;;;;+EAIuE;IAC7E,MAAM,EAAE;;;;;;;;;;iEAUuD;IAC/D,GAAG,EAAE;;kEAE2D;IAChE,IAAI,EAAE;;;uBAGe;IACrB,UAAU,EAAE;;;;;gEAKkD;IAC9D,GAAG,EAAE;;;;;;;;;;;;;;;oEAe6D;IAClE,IAAI,EAAE;;oEAE4D;CACnE,CAAC;AAEF,gEAAgE;AAChE,MAAM,UAAU,cAAc,CAAC,OAAe;IAC5C,MAAM,IAAI,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;IACnC,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IACvB,OAAO,aAAa,OAAO,OAAO,IAAI,IAAI,CAAC;AAC7C,CAAC"}
|
memos/_js/cli.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* MemOS CLI — command-line interface for the MemOS memory layer.
|
|
4
|
+
*
|
|
5
|
+
* Usage:
|
|
6
|
+
* memos store "User prefers dark mode" --type preference
|
|
7
|
+
* memos search "dark mode"
|
|
8
|
+
* memos history <id>
|
|
9
|
+
* memos retrieve <id>
|
|
10
|
+
* memos forget <id>
|
|
11
|
+
* memos revert --last | --id <id> | --about <topic> | "<revert request>" [--dry-run]
|
|
12
|
+
* memos summarize
|
|
13
|
+
* memos graph [--mermaid]
|
|
14
|
+
* memos browse
|
|
15
|
+
* memos link <src> <dst>
|
|
16
|
+
* memos count
|
|
17
|
+
* memos tag <id> <tag1> [tag2...]
|
|
18
|
+
* memos untag <id> <tag1> [tag2...]
|
|
19
|
+
* memos list --tag <tag>
|
|
20
|
+
* memos export [--format json|markdown|obsidian] [--output <dir>] [--tag <tag>]
|
|
21
|
+
* memos backup [--output <path>]
|
|
22
|
+
* memos restore <path>
|
|
23
|
+
* memos mcp
|
|
24
|
+
*
|
|
25
|
+
* @module @memos/cli
|
|
26
|
+
*/
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=cli.d.ts.map
|
memos/_js/cli.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG"}
|