Claude Library
==============

 *v0.3.1* 

A local searchable mirror of everything you have worked through with Claude.

 ```
/plugin marketplace add mischasigtermans/by-mischa
/plugin install library@by-mischa
```

 [Install Claude Library](https://github.com/mischasigtermans/claude-library) [View on GitHub](https://github.com/mischasigtermans/claude-library) 

Your chats live on Anthropic's servers. Your Claude Code sessions live on your disk and get pruned after 30 days. Neither one can see the other, so the plan you worked out in Desktop on Tuesday reaches your terminal on Thursday through copy and paste, or not at all.

Library closes that gap. It pulls your conversations through the macOS Keychain, reads your local session transcripts off disk, and puts both in one SQLite database at `~/.claude/library/library.db`. Any Claude Code session can then search them.

The useful part isn't lookup, it's recall in the middle of work. *'Didn't we already decide this?'* comes back with the decision, the date, and the session it happened in. On my machine that index now holds thousands of conversations, which is also why [I could go back and read every correction I've ever given an agent](/thought/how-i-run-claude-code-with-solo-and-library).

It is **not** [Parley](/project/parley). Parley routes live messages between running peer agents. Library is read-only access to frozen transcripts. Different jobs.

A few caveats worth knowing up front. macOS only: the cookie store on Linux and Windows needs different plumbing. Node 22.5 or newer, for the built-in `node:sqlite` module. Chats need Claude Desktop signed in; Claude Code sessions need neither. The cache touches your real session, so treat it as sensitive.

This plugin started life as Claude Hansard. Same idea, new name, and a second source.

What it does
------------

- Two sources, one indexChats from claude.ai, Desktop and mobile, pulled with your Desktop session cookie. Claude Code sessions read off disk from `~/.claude/projects`. Both land in the same SQLite database, so one search covers the thinking you did in chat and the work you did in the terminal.
- Full-text search across everythingFTS5 over message bodies, project knowledge-base docs, memory snapshots and extracted code artifacts. Narrow by source with `source=chat` or `source=code`, or by backend with `kind=`.
- Keeps the 1% that mattersRoughly 99% of a Claude Code transcript is tool results: file contents, command output, diffs. Library stores your prompts, the assistant prose and the names of tools that changed something. Never file contents. The repo already has those.
- Sessions survive their expiryClaude Code prunes local sessions after 30 days. Ingesting them is also how you keep them, and it runs on its own at the start and end of every session.
- Read-only against the live APIBranch-aware sync captures regenerated branches through the conversation tree, memory snapshots are versioned on change, and nothing is ever written back to claude.ai.

[Install Claude Library](https://github.com/mischasigtermans/claude-library).
