TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/lerim-dev/lerim-cli/llms.txt
Use this file to discover all available pages before exploring further.
lerim init command runs an interactive setup wizard that detects installed coding agents, prompts you to select which ones to use, and writes the configuration to ~/.lerim/config.toml.
This is a host-only command - it runs locally and does not require a Lerim server.
Syntax
What it does
-
Detects coding agents by checking for their default installation paths:
- Claude Code:
~/.claude/projects - Codex CLI:
~/.codex/sessions - Cursor:
~/Library/Application Support/Cursor/User/globalStorage(macOS) - OpenCode:
~/.local/share/opencode
- Claude Code:
-
Prompts for confirmation - For each detected agent, asks if you want to include it. Defaults to
Yfor detected agents,Nfor missing ones. -
Writes config - Saves selected agents to
~/.lerim/config.tomlwith their session store paths. - Checks Docker - Verifies if Docker is installed. Shows instructions if missing.
- Shows next steps - Displays commands to register projects and start Lerim.
Interactive flow
Configuration file
The wizard creates~/.lerim/config.toml with this structure:
- Add agents that weren’t auto-detected
- Update session store paths
- Add custom configuration overrides
Custom agent paths
If your agent stores sessions in a non-standard location, you have two options: Option 1: Edit~/.lerim/config.toml after running init:
lerim connect with the --path flag:
Docker requirement
The wizard checks for Docker availability:- Docker found - You can use
lerim up(recommended) - Docker not found - You can still run Lerim with
lerim serveorlerim daemon(no container required)
Re-running init
Runninglerim init again will:
- Re-detect agents
- Prompt for confirmation again
- Overwrite existing
~/.lerim/config.tomlagent configuration
Examples
Standard setup
Setup without Docker
Setup for CI/testing
What happens next
After runninginit, you should:
-
Register projects - Tell Lerim which repositories to track:
-
Start Lerim - Launch the service:
-
Connect platforms - Link your coding agents:
-
Initial sync - Extract memories from existing sessions:
Exit codes
| Code | Meaning |
|---|---|
0 | Setup completed successfully |
2 | User cancelled or invalid input |
Related commands
lerim project add- Register projects after initlerim connect- Connect agent platformslerim up- Start Lerim servicelerim serve- Run without Docker
Troubleshooting
Agent not detected
If your agent isn’t auto-detected:- Check the default path exists
- Say
yanyway during init - Edit
~/.lerim/config.tomlto fix the path - Or use
lerim connect <platform> --path /custom/path
Config file not created
If~/.lerim/config.toml isn’t created:
- Check you have write permissions to
~/.lerim/ - The directory is created automatically if missing
- Try running with
LERIM_CONFIG=/tmp/config.toml lerim initto test