Skip to content

lerim sync

Index new sessions and extract memories (hot path).

Overview

Hot-path: discover new agent sessions from connected platforms, enqueue them, and run DSPy extraction to create memory primitives. Requires a running server (lerim up or lerim serve).

Note

sync is the hot path (queue + DSPy extraction + lead decision/write). Cold maintenance work is handled by lerim maintain.

Syntax

lerim sync [options]

Parameters

--window string default: "7d"

Relative time window: 30s, 2m, 1h, 7d, or all.

--since ISO-8601

Absolute start bound (overrides --window).

--until ISO-8601 default: now

Absolute end bound (only with --since).

--agent string default: all

Comma-separated platform filter (e.g. claude,codex).

--max-sessions integer default: 50

Max sessions to extract per run.

--run-id string

Target a single session by run ID (bypasses index scan).

--no-extract boolean default: off

Index/enqueue only, skip extraction.

--force boolean default: off

Re-extract already-processed sessions.

--dry-run boolean default: off

Preview mode, no writes.

--ignore-lock boolean default: off

Skip the writer lock check. Use with caution -- only when you know no other sync/maintain is running.

Examples

Default sync

lerim sync                          # sync using configured window (default: 7d)

Extended window

lerim sync --window 30d             # sync last 30 days
lerim sync --window all             # sync everything

Filter by agent

lerim sync --agent claude,codex     # only sync these platforms

Re-extract a specific session

lerim sync --run-id abc123 --force  # re-extract a specific session

Absolute time bounds

lerim sync --since 2026-02-01T00:00:00Z --until 2026-02-08T00:00:00Z

Index only (no extraction)

lerim sync --no-extract             # index and enqueue only, skip extraction

Preview mode

lerim sync --dry-run                # preview what would happen, no writes

Time window formats

Duration format: <number><unit> where unit is:

Unit Meaning
s Seconds
m Minutes
h Hours
d Days

Special value all scans all sessions ever recorded.