Skip to main content


Terrier

Terrier

Local-first memory for your coding agents.

One SQLite file. Zero dependencies. No cloud, no account, no telemetry.

PyPI CI Python 3.10+ Zero dependencies MIT


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.

terrier graph — projects, sessions and shared vocabulary

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

terrier_kb-0.1.2.tar.gz (18.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

terrier_kb-0.1.2-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

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

Hashes for terrier_kb-0.1.2.tar.gz
Algorithm Hash digest
SHA256 6a3bad1077d2a4510280ec7101014e8cbc4ead0377375761ec9bf496f76306ee
MD5 0f959b8282d678a7e4271aeb82593456
BLAKE2b-256 101a773fc69b423a4ab4ecd07c2b79f0655bcde11f4bd97eefcb5f54849e975f

See more details on using hashes here.

Provenance

The following attestation bundles were made for terrier_kb-0.1.2.tar.gz:

Publisher: pypi.yml on Makeph/terrier

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for terrier_kb-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d5378f7bf875bc2c404a7745013a8481768622ca6cbbd5a52294515d174c535d
MD5 ce04467ff254f1335b311961eee42588
BLAKE2b-256 1c3996550377da9b602955a638231b885c40be20db859fee64ca55bc3cced76c

See more details on using hashes here.

Provenance

The following attestation bundles were made for terrier_kb-0.1.2-py3-none-any.whl:

Publisher: pypi.yml on Makeph/terrier

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page