Documentation / CLI

CLI reference

Every command on the memorius entry point, grouped by concern. The companion memorius-hook, memorius-plugin-gen, and memorius-normalize CLIs are documented on the Hooks page.

Global flags

Available on every invocation.

Invocation

memorius --versionPrint the running version
memorius --config PATHUse an alternate config file
memorius --debugEnable debug logging
JSON output
Several read commands accept --json for machine-readable output (status, stats, get, update, prune, learnings, learning-stats, repair). Warnings stay exit 0; only real errors exit non-zero.

Core Setup, status & health

Initialize

memorius initCreate config + storage dir and the main vault
memorius setupDownload ONNX model, init, and verify --force · --skip-model
memorius statusVault + embedding + recent diaries --json

Health & integrity

memorius doctorRun 6 health checks (config, storage, model, drift, name length, graph)
memorius repairReconcile vector store ↔ metadata table; remove orphans, optionally re-embed --vault · --reindex · --dry-run · --json
memorius statsVault + memory + graph + doctor summary --json
repair — new in v0.8.6
memorius repair fixes vector/meta drift: it removes Chroma vectors that no longer have a metadata row (orphans) and, with --reindex, re-embeds metadata rows missing a vector. memorius doctor points you here when it detects drift. See Memory Engine → repair.

Memory Store, read, update, delete

Write

memorius store <text>Embed + store content (reads stdin if no arg) --vault · --shelf · --folder · --note · --ttl DAYS
memorius update <id>Update content and/or metadata (re-embeds on change) --content · --metadata JSON · --json

Read

memorius search <q>Semantic search (reads stdin if no arg) --n · --vault · --shelf · --folder · --note · --tag · --expand-graph · --rerank · --web
memorius get <id>Fetch one memory by UUID --json
memorius listCursor-paginated listing --vault · --limit · --cursor
memorius lsBrowse the Vault→Shelf→Folder→Note tree --vault

Delete

memorius delete <id>Delete one memory (validates + confirms) --vault · --shelf · --yes · --dry-run

Transcripts Mine, extract, fact-check, context

Extract

memorius mine <file>Mine raw transcript into structured memories --vault · --text
memorius extract <file>LLM-powered structured extraction (6 categories) --vault · --shelf · --backend auto|openai|ollama|regex

Verify & inject

memorius factcheck <stmt>Verify a claim against stored memories --vault · --web
memorius context <q>Formatted context block for prompt injection --vault · --max · --web
memorius profile <session>Build a session memory profile for inheritance --vault

Web fallback

memorius web <q>Live web search (opt-in primitive) --max · --provider duckduckgo|tavily

Diaries Session notes

Diaries

memorius diary <session>Write a diary entry (interactive if args omitted) --title · --summary · --content · --vault · --exchange-count
memorius diariesList the 10 most recent entries

Knowledge graph Typed edges & visualization

Graph

memorius graph statsNodes, edges, relation counts
memorius graph viewOpen interactive graph in browser --vault · --shelf · --relation · --min-weight · --limit · --no-open
memorius graph export-htmlExport a standalone interactive HTML viz -o · --vault · --shelf · --relation · --min-weight · --limit
memorius graph jsonDump graph topology as JSON --vault · --shelf · --relation · --min-weight · --limit

Edge relations: related, references, contradicts, co_occurs, plus typed temporal_before, causal_leads_to, episodic_part_of, semantic_instance_of. Details on the Memory Engine page.

Memory engine Consolidate, prune, backup

Consolidation & decay

memorius consolidateCluster + merge similar memories --vault · --threshold 0-1 · --dry-run
memorius pruneArchive/delete stale memories by decay score --threshold · --dry-run · --delete · --json

Backup & portability

memorius export <dest>Export vault to JSON or Markdown --format json|markdown
memorius import <src>Import a JSON export --replace

Learnings Agent self-improvement capture

Structured "I learned this" memories with category, context, solution, and confidence. The MCP exposes the same as memorius_learn / memorius_recall.

Learn

memorius learn <text>Store a learning (required --category) --category · --context · --solution · --tag · --vault · --confidence
memorius apply-learning <id>Increment a learning's application counter

Recall

memorius recall <q>Search past learnings --category · --tag · --vault · --limit
memorius learningsList learnings + summary --category · --vault · --limit · --json
memorius learning-statsLearning statistics --vault · --json

Categories: bug_fix, strategy, pattern, self_improvement, tool_usage, code_snippet, workflow.

Obsidian Bidirectional vault sync

Import your Obsidian notes as memories, or export memories back as Markdown with YAML frontmatter. Hierarchy is preserved.

Obsidian

memorius obsidian listList notes in an Obsidian vault --vault (Obsidian dir)
memorius obsidian importImport notes as memorius memories --vault · --target-vault · --target-shelf · --tag · --dry-run
memorius obsidian exportExport memories as Obsidian notes --vault · --source-vault · --source-shelf · --dry-run

Servers & config MCP, REST, and inspection

Servers

memorius serveStart the MCP server over stdio --port (unused for stdio)
memorius serve-restStart the FastAPI REST server --port · --host · --daemon · --stop · --pid-file · --tls-cert · --tls-key
memorius bookcaseOpen your vault as a 3D bookcase in the browser, with a guiding librarian voice (loopback only; reuses the REST server when it's already up) --port (REST, default 8912) · --static-port (assets, default 8400) · --no-browser

Config

memorius configPrint the active config (YAML → JSON) --path (print config file path only)

See MCP Server for tool details and REST API for endpoint details.

Repository

Memorius is MIT-licensed and fully open source. Star the repo, open an issue, or dig into the source on GitHub.