Skip to content

Getting Started

Get Lerim running in under 2 minutes.

Prerequisites

  • Python 3.10+
  • Deno (required by the DSPy extraction pipeline)
  • An LLM API key (OpenRouter, OpenAI, or Anthropic)
brew install deno  # macOS

Install

pip install lerim

For development installs:

uv venv && source .venv/bin/activate
uv pip install -e .

Set up API keys

Lerim needs an LLM provider for extraction and chat. Set at least one:

export OPENROUTER_API_KEY="sk-or-..."   # default provider
# or
export OPENAI_API_KEY="sk-..."
# or
export ZAI_API_KEY="..."

Connect your agent platforms

Auto-detect and connect all supported platforms:

lerim connect auto

Or connect specific platforms:

lerim connect claude
lerim connect codex
lerim connect cursor
lerim connect opencode

Check what's connected:

lerim connect list

Start the learning loop

Run the daemon for continuous sync + maintain:

lerim daemon

Or run one-shot commands:

lerim sync       # extract memories from new sessions
lerim maintain   # refine existing memories

Query your memories

lerim chat "What auth pattern do we use?"
lerim memory search "database migration"
lerim memory list

Teach your agent about Lerim

Install the Lerim skill so your coding agent knows how to query past context:

npx skills add lerim-dev/lerim-cli

This works with Claude Code, Codex, Cursor, Copilot, Cline, Windsurf, OpenCode, and other agents that support skills.

At the start of a session, tell your agent:

Check lerim for any relevant memories about [topic you're working on].

Your agent will run lerim chat or lerim memory search to pull in past decisions and learnings.

Next steps