Overview
Subcommands for managing the memory store directly. Memories are stored as markdown files in.lerim/memory/.
Subcommands
search- Search memories by keywordlist- List recent memory itemsadd- Create a new memory manuallyreset- Destructive wipe of memory data
search
Full-text keyword search across memory titles, bodies, and tags. Matches are case-insensitive.Syntax
Parameters
Search string to match against memory title, body, and tags.
Maximum results to return.
Filter results to a specific project. Note: Not yet implemented.
Output structured JSON instead of human-readable text.
Examples
list
Display a list of stored memories (decisions and learnings), ordered by recency.Syntax
Parameters
Maximum items to display.
Filter to a specific project. Note: Not yet implemented.
Output structured JSON with file paths.
Examples
add
Manually create a single memory record from CLI flags. Writes a markdown file to.lerim/memory/{decisions,learnings}/.
Syntax
Parameters
Short descriptive title for the memory.
Full body content of the memory.
Primitive type:
decision (a choice made) or learning (an insight gained).Choices: decision, learningSemantic kind label.Common values:
insight, procedure, friction, pitfall, preferenceConfidence score from 0.0 to 1.0.
Comma-separated tags for categorization (e.g.
python,testing,ci).Examples
reset
Irreversibly deletememory/, workspace/, and index/ under the selected scope, then recreate canonical empty folders.
Syntax
Parameters
Required safety flag to confirm destructive reset. Without this, the command refuses to run.
What to reset:
project- Reset<repo>/.lerim/onlyglobal- Reset~/.lerim/only (includes sessions DB)both- Reset both project and global roots (default)
Scope behavior
- project: Resets
<repo>/.lerim/only (memories, workspace, index) - global: Resets
~/.lerim/only (includes sessions DB inindex/) - both: Resets both locations
The sessions DB lives in global
index/, so --scope project alone does NOT reset the session queue. Use global or both for a full wipe.Examples
What gets deleted
memory/- All decisions, learnings, summaries, and archived itemsworkspace/- All sync and maintain run artifactsindex/- Session database and indexing data
What gets recreated
Canonical folder structure:Exit codes
- 0: Success
- 1: Error - operation failed
- 2: Usage error - invalid arguments or missing
--yesflag
Related commands
lerim ask
Ask questions using memory
lerim sync
Extract new memories from sessions