Terrier
Local-first memory for your coding agents.
One SQLite file. Zero dependencies. No cloud, no account, no telemetry.
Every Claude Code session you run leaves a transcript on disk — prompts, decisions, dead ends, fixes. Terrier digs through all of them (plus your markdown notes), indexes everything into a single FTS5 database, and lets you ask questions about your own past work:
$ terrier search "memory leak gateway"
┌ 2026-06-14 09:32 · api-gateway · 3f9a2c1d · assistant
│ fix the memory leak in the gateway
└ the [leak] came from the connection pool never releasing … capped it at 50 and added an idle reaper …
- "Have I tried fixing this before? What was attempted?"
- "Why did I bump that timeout to 30s? Git history says nothing."
- "What did I actually get done this week?" →
terrier recap
Install
pip install terrier-kb
Python ≥ 3.10, standard library only. Works on Windows, macOS, Linux.
Usage
terrier ingest # index all Claude Code transcripts (incremental)
terrier ingest --notes ~/notes # also index a markdown folder (remembered)
terrier search "breakout stop loss" -n 5
terrier search "docker" -p myrepo -d 30 # filter by project, last 30 days
terrier recap -d 7 # digest of the last week, per project
terrier graph --open # interactive HTML knowledge graph
terrier status # what's in the burrow
Auto-ingest
terrier hook install
Adds a SessionEnd hook to ~/.claude/settings.json: every finished session is re-indexed automatically. Your memory stays current without thinking about it. terrier hook remove undoes it.
Knowledge graph
terrier graph renders your entire base as a self-contained HTML file — projects, sessions, notes, and the shared vocabulary that links them, laid out with a force simulation on a plain <canvas>. No CDN, no build step; the file works offline and can be committed, mailed, or dropped in a wiki.
How it works
~/.claude/projects/**/*.jsonl ─┐
├─► ~/.terrier/terrier.db (SQLite + FTS5)
your markdown folders ─────────┘ │
├─ terrier search (BM25, cited snippets)
├─ terrier recap (per-project digest)
└─ terrier graph (HTML force graph)
Ingestion is incremental — a file is re-read only when its mtime or size changes. Tool spam, progress events, and injected system reminders are filtered out; only human prompts and assistant prose are indexed. Bodies are capped at 20 kB so a stray file dump can't bloat the index.
Why not just grep?
You can! Terrier is roughly grep with a memory: ranked results (BM25), snippets with highlights, project/date filters, a weekly digest, a graph view, and an auto-updating index — while staying a single file you can delete at any time (~/.terrier/).
Inspired by Stash, which does this as a full multi-agent cloud product. Terrier is the opposite corner of the design space: everything runs on your machine, and rm -rf ~/.terrier is a full account deletion.
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file terrier_kb-0.1.2.tar.gz.
File metadata
- Download URL: terrier_kb-0.1.2.tar.gz
- Upload date:
- Size: 18.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a3bad1077d2a4510280ec7101014e8cbc4ead0377375761ec9bf496f76306ee
|
|
| MD5 |
0f959b8282d678a7e4271aeb82593456
|
|
| BLAKE2b-256 |
101a773fc69b423a4ab4ecd07c2b79f0655bcde11f4bd97eefcb5f54849e975f
|
Provenance
The following attestation bundles were made for terrier_kb-0.1.2.tar.gz:
Publisher:
pypi.yml on Makeph/terrier
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
terrier_kb-0.1.2.tar.gz -
Subject digest:
6a3bad1077d2a4510280ec7101014e8cbc4ead0377375761ec9bf496f76306ee - Sigstore transparency entry: 2275271764
- Sigstore integration time:
-
Permalink:
Makeph/terrier@c7d08349270153ebba537925afe79678e5b3dad4 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/Makeph
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@c7d08349270153ebba537925afe79678e5b3dad4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file terrier_kb-0.1.2-py3-none-any.whl.
File metadata
- Download URL: terrier_kb-0.1.2-py3-none-any.whl
- Upload date:
- Size: 17.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5378f7bf875bc2c404a7745013a8481768622ca6cbbd5a52294515d174c535d
|
|
| MD5 |
ce04467ff254f1335b311961eee42588
|
|
| BLAKE2b-256 |
1c3996550377da9b602955a638231b885c40be20db859fee64ca55bc3cced76c
|
Provenance
The following attestation bundles were made for terrier_kb-0.1.2-py3-none-any.whl:
Publisher:
pypi.yml on Makeph/terrier
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
terrier_kb-0.1.2-py3-none-any.whl -
Subject digest:
d5378f7bf875bc2c404a7745013a8481768622ca6cbbd5a52294515d174c535d - Sigstore transparency entry: 2275271894
- Sigstore integration time:
-
Permalink:
Makeph/terrier@c7d08349270153ebba537925afe79678e5b3dad4 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/Makeph
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@c7d08349270153ebba537925afe79678e5b3dad4 -
Trigger Event:
push
-
Statement type: