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 path