- Host-only commands run locally and never require a server (
init,project,up,down,logs,connect,memory) - Service commands are HTTP clients that require a running Lerim server started via
lerim uporlerim serve(ask,sync,maintain,status)
Installation
Quick start
Global flags
These flags work with most commands:Emit structured JSON instead of human-readable text. Works with
status, memory list, project list, and more.Show Lerim version and exit.
The
--json flag can appear before or after the subcommand. Both lerim --json status and lerim status --json work.Exit codes
Lerim commands return standard exit codes:| Code | Meaning | Example |
|---|---|---|
0 | Success | Command completed without errors |
1 | Runtime failure | Server not reachable, file not found, API error |
2 | Usage error | Invalid arguments, missing required parameters |
3 | Partial success | Some operations succeeded, others failed |
4 | Lock busy | Another process holds the sync/maintain lock |
Command categories
Setup and project management
lerim init- Interactive setup wizardlerim project add- Register a project directorylerim project list- List registered projectslerim project remove- Unregister a project
Service lifecycle
lerim up- Start Docker containerlerim down- Stop Docker containerlerim logs- View container logslerim serve- Run HTTP server + daemon (Docker entrypoint)
Memory operations
lerim sync- Index sessions and extract memories (hot path)lerim maintain- Refine existing memories (cold path)lerim daemon- Run continuous sync + maintain looplerim ask- Query memories with natural language
Platform connections
lerim connect- Manage agent platform connectionslerim connect auto- Auto-detect and connect all platformslerim connect list- Show connected platforms
Direct memory access
lerim memory search- Full-text search across memorieslerim memory list- List recent memory itemslerim memory add- Manually create a memorylerim memory reset- Destructive wipe of memory data
Runtime status
lerim status- Show runtime statelerim dashboard- Show dashboard URL
Common patterns
First-time setup
Daily workflow
Troubleshooting
Fresh start
Running without Docker
If you prefer not to use Docker, run Lerim directly:Configuration
Lerim uses TOML-layered configuration (lowest to highest priority):src/lerim/config/default.toml- Shipped defaults~/.lerim/config.toml- User global config<repo>/.lerim/config.toml- Project overridesLERIM_CONFIGenv var - Explicit override path
OPENROUTER_API_KEY(required for default models)OPENAI_API_KEY(optional)ANTHROPIC_API_KEY(optional)ZAI_API_KEY(optional)
Next steps
Initialize Lerim
Run the interactive setup wizard
Manage projects
Register and track your repositories
Connect platforms
Link your coding agents
Sync sessions
Extract memories from agent sessions