About this project
lore is a local command line tool and web explorer for everything Claude Code writes on a machine. Claude Code keeps session transcripts, memory and prompt history under a data directory, sharded per project, and its default retention deletes transcripts after roughly 30 days. lore keeps an additive mirror of that raw data, indexes it, and gives a query surface over its own session history.
Install and platforms: the project requires Bun and nothing else, with no rsync or toolchain dependency. Its continuous integration runs the test suite and installs the binary on macOS, Linux and Windows. All verbs work on all three platforms, including the explorer. The exception is the lore server supervisor, which keeps the explorer running in the background via a launchd user agent, so it is macOS only and otherwise points users to lore serve. The install script builds a frozen binary, refuses a dirty working tree, and every invocation reports its version and commit on stderr. A harness-corpus script snapshots the daemon's shapes into test fixtures after a Claude Code update.
Data model and indexing: a well is one directory's store under the Claude projects path, named from its absolute path with non-alphanumeric characters flattened, so the naming is lossy. Each session is a JSONL event log rather than a chat log, mostly tool traffic, thinking envelopes and harness events, alongside sibling subagent transcripts and workflow scripts. The index command scans wells, parses the JSONL and builds a SQLite FTS5 index with spawns and workflows lanes, incrementally by modification time and size. The index is a derived, rebuildable artifact that version-bumps instead of migrating and refuses to open a database written by a newer lore.
Commands: archive mirrors the Claude data directory into a lore archive without propagating upstream deletions; wells lists stores with de-slugged real paths and flags; sessions and session walk a well's chronological arc or dump one session by lane; search queries FTS5 across lanes and can include the prompt history spine; spawns reports verified versus requested per-subagent model with drift flags and boot cost; workflows summarises orchestration runs; polls flags sessions that re-read a background task output file each turn, priced; tools counts tool, skill and command invocations; usage profiles billed token classes plus thinking by well, session, model, day, week or month with a dated list-price equivalent; trace renders one session as transactions, steps, tool calls and annotations; agents joins the live roster to the index; stats reports corpus totals, lanes and warnings. Every command supports help output, and many accept a well filter that matches substrings plus a flag for exact whole-value matching.
Explorer: lore serve renders the index as server-rendered HTML pages for recent sessions and wells, token usage, individual wells and sessions, search results and session trailers written into commit messages. Every page can also answer JSON, read verbs are mounted under a command path with an OpenAPI spec, and the api verb exposes the same handlers as commands. The default port is 4949 and host options control binding, including a Tailscale address when one exists.
Judgment layer: above the deterministic, model-free CLI sits an optional wiki workflow. wiki init creates a git repository of markdown from a built-in template and skills add installs per-command skills so Claude Code sessions discover the CLI. Ingesting raw material into the wiki, graduating wiki pages into git-committed docs, and linting for stale canon are protocols an interactive Claude session performs by driving the CLI; they are documented in the design notes rather than shipped as commands, so the tool itself needs no API key. A docs verb indexes markdown committed in repositories, read from git objects rather than working trees.
Data handling: it reads the Claude data directory and, for docs, git object stores under a code root; it writes the lore home directory, an optional wiki repo and, only for the macOS supervisor, one launchd plist. There is no network activity beyond an explicit git fetch when requested for docs indexing and the port the explorer listens on; nothing is uploaded and there are no model calls, telemetry or accounts. Configuration is through validated environment variables such as the Claude dir, lore home, code dir, wiki dir and docs exclude and assisted lists.
A separate dependency-free Python script reads transcript JSONL directly and reports denied tool calls split by reason and by what the session did next, with a runbook describing how to review them.
Status: an early personal tool published as-is, local only, under the MIT license, with no plan to become a product.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.