CLI Reference
The ltm binary provides a comprehensive CLI for managing memories.
Global Options
--scope <name>: Set the active scope for the command.LTM_SCOPE: Environment variable to set the default scope.LTM_DB: Environment variable to override the SQLite database path.
Commands
list
List memories, pinned first, archived hidden.
ltm list [limit]pinned
List only pinned entries.
ltm pinned [limit]get
Retrieve the full record for a key.
ltm get <key>search
Search memories. Uses FTS5 by default, or hybrid (FTS5 + vector) when an embedding endpoint is configured — see Hybrid Retrieval.
ltm search <query> [limit]save
Insert or update a memory.
ltm save <key> <value|-> [tags]Use - to read the value from stdin.
delete
Remove a memory and its incident links.
ltm delete <key>rename
Atomic rename of a key within a scope. Cascades through links.
ltm rename <old_key> <new_key>verify
Mark a memory as "still current".
ltm verify <key>supersede
Archive an old memory and link it to a new one.
ltm supersede <old> <new> <value|-> [tags]pin / unpin
Toggle the pinned flag for a memory.
ltm pin <key>
ltm unpin <key>link / unlink
Manage directional, typed edges between memories.
ltm link <from_key> <rel> <to_key>
ltm unlink <from_key> <rel> <to_key>traverse
View the knowledge graph starting from a node.
ltm traverse <key> [depth]reembed
Backfill embeddings for hybrid retrieval. Embeds rows that don't have a vector yet, or all rows with --force. Requires a configured embedding endpoint.
ltm reembed [--force]path
Print the path to the SQLite database.
ltm pathserve
Start a local HTTP REST API server — the backend for the web clipper.
ltm serve [port]Runs on port 8080 by default, bound only to 127.0.0.1. Every route except GET /health requires a bearer token (X-LTM-Token or Authorization: Bearer) — 127.0.0.1 binding alone does not stop a malicious web page from calling the server. The token is generated once, stored 0600 at <db-dir>/serve-token (override with LTM_SERVE_TOKEN), and printed on startup; CORS is returned only for browser-extension origins.
doctor
Print a one-shot health check of the whole setup.
ltm doctorReports, as a ✓/✗/⚠ checklist: binary version, store path + memory count, embeddings config/reachability, REST server liveness + token, and the Claude Code recall hook. Reach for it first when something isn't wired up.