Thread Keep
Thread Keep is a local-first version control system for the knowledge behind your code. It attaches durable notes such as intent, decisions, constraints, examples, and warnings to functions, methods, and types—without adding annotations to source files.
Git continues to version the code. Thread Keep versions the context that explains why the code is shaped that way.
Is Thread Keep for you?
Use Thread Keep when you want developers and coding agents to:
- find the reason behind an implementation without searching old chats;
- keep decisions and warnings attached to the code entity they describe;
- notice when a code change may have made saved context stale;
- review AI-drafted context before it becomes part of shared history; or
- share code context without transferring source files.
Thread Keep is not a call graph, a general code-search platform, or an autonomous agent. It does not edit source files, call an AI model, or commit context automatically.
Install
Published releases support Python 3.9 or newer on Linux glibc 2.39 or newer x64/arm64, macOS 15 or newer on Apple Silicon, and Windows x64:
python3 -m pip install thread-keep
thread-keep --help
Go is indexed by the core package. Install only the language packs your repository needs:
python3 -m pip install "thread-keep[typescript,python]"
# or install all official packs
python3 -m pip install "thread-keep[all]"
The supported optional packs are TypeScript/TSX, JavaScript/JSX, Python, Java, Kotlin, and Rust. You can see what the current repository needs with:
thread-keep indexers list
macOS Intel, Windows arm64, and Linux musl are not release targets. See the Quickstart for source builds and manual pack setup.
Save your first context note
Run these commands inside a Git repository. update requires a clean, committed
worktree so the index always describes an exact Git revision.
# 1. Create local Thread Keep storage and index the current commit.
thread-keep init
thread-keep update
# 2. Find the exact key of the function, method, or type you want to document.
thread-keep search "Run"
# 3. Add a pending note using a key returned by search.
thread-keep note add example.Run \
--kind intent \
--body "Runs the example workflow through one audited entry point (see PR #12)."
# 4. Review the pending change, then commit it explicitly.
thread-keep status
thread-keep diff
thread-keep commit -m "Document the example workflow"
# 5. Confirm that the note is searchable and present in history.
thread-keep context get example.Run
thread-keep log
Nothing is promoted automatically. note add and agent write tools create pending
drafts; only thread-keep commit creates an immutable context snapshot. The current
CLI commits the complete pending set and does not yet provide selective draft edit
or discard.
For expected output, note-writing examples, stale-context review, and common errors, follow the 15-minute Quickstart.
Verify what was saved
Use the CLI first:
thread-keep statusshows the indexed source revision, coverage, current context snapshot, and pending-note count.thread-keep diffshows every pending note or binding change that has not been committed.thread-keep search <query>andthread-keep context get <entity-key>show active committed context.thread-keep logshows immutable context history.
Thread Keep stores local data in a generated, self-ignored directory at the worktree root:
.thread-keep/
├── .gitignore # ignores this generated directory
├── index.sqlite # rebuildable local projection and working state
└── objects/
└── <context-snapshot-id>.json # immutable committed context object
On first use after upgrading from the legacy layout, Thread Keep copies
.git/thread-keep/ into .thread-keep/ through a validated SQLite backup and
leaves the legacy directory untouched. Do not alternate between an older client
that writes the legacy directory and a newer client that writes .thread-keep/.
Do not edit index.sqlite directly. If the projection is lost but the immutable
objects remain, use thread-keep rebuild <context-snapshot-id> with an ID from
thread-keep log.
What is implemented?
| Area | Current capability | Read more |
|---|---|---|
| Local context | Initialize, index, add/revise/review notes, inspect pending changes, commit, search, read, and rebuild | Quickstart |
| Languages | Built-in Go plus six optional Tree-sitter-based language packs | Multi-language indexing |
| Retrieval | Lexical evidence, entity context, bounded same-file/owner relationships, and filtered context assembly | Architecture |
| Coding agents | Local stdio MCP with eight read tools and two pending-draft tools; no commit or remote-write tool | Codex, Claude Code |
| Sharing | Explicit filesystem or HTTP(S) remotes, fast-forward pull, and explicit semantic merge | Quickstart: sharing |
| Hosted remote | GitHub-authorized object/ref server, PostgreSQL option, clustering, and storage maintenance | Team server |
| PR context planning | Opt-in durable GitHub webhook intake, isolated planning runners, Checks, automatic landing, and manual recovery | PR context planning |
| Distribution | Platform wheels, raw release binaries, checksums, and three production container images | Release operations |
Important limits are explicit: structural context is not a call graph; local MCP is the only MCP endpoint; coordinator mode is durable single-coordinator rather than HA; and live Kubernetes runner validation remains opt-in for the target cluster.
Connect a coding agent
The core wheel includes thread-keep-mcp. Initialize and update the repository
before registering it with your agent.
Both integrations enforce the same boundary: agents may read committed context and
draft pending notes, while a human reviews thread-keep diff and runs
thread-keep commit.
Share context with a team
A Thread Keep remote transfers immutable context objects and versioned context references. It never transfers source files, the local SQLite projection, pending notes, or credentials.
thread-keep remote add origin /absolute/path/to/context-remote
# or use a hosted context remote
thread-keep remote add origin https://context.example.com/v1/repositories/my-repo
thread-keep remote push origin
thread-keep remote fetch origin
thread-keep remote pull origin
pull is fast-forward only. Divergence is reported instead of being overwritten;
resolve same-source snapshot divergence explicitly with thread-keep context merge.
For hosted setup, authentication, backups, clustering, and maintenance, use the
Team server guide.
Build from source
The SQLite search projection uses CGO and FTS5, so a source build needs Go and a C compiler:
make test
make vet
make build
make build creates five runtime binaries in bin/: thread-keep,
thread-keep-mcp, thread-keep-server, thread-keep-coordinator, and
thread-keep-runner. Build the six optional language-pack binaries separately:
make build-pack
Run the complete local black-box workflow in a disposable Linux container with
make e2e. Build the three production process-boundary images with
make docker-build.
Documentation
| Start here | Purpose |
|---|---|
| Quickstart | Installation, first note, verification, sharing, and troubleshooting |
| Codex setup | MCP registration and project instructions |
| Claude Code setup | MCP registration, draft skill, and optional hooks |
| Team server | Self-hosted remote operations and team onboarding |
| PR context planning | GitHub App, coordinator, runner, landing, and recovery |
| Release operations | Supported targets and release verification |
| Architecture | Current implementation contract, module boundaries, and deferred work |
| Evaluation plan | Planned agent-effectiveness measurements; not current product telemetry |
License
MIT
Metadata
Release files for thread-keep 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| thread_keep-0.1.3-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| thread_keep-0.1.3-py3-none-manylinux_2_39_x86_64.whl | Python 3 | none | Linux glibc 2.39+ x86-64 | Details |
| thread_keep-0.1.3-py3-none-manylinux_2_39_aarch64.whl | Python 3 | none | Linux glibc 2.39+ ARM64 | Details |
| thread_keep-0.1.3-py3-none-macosx_15_0_arm64.whl | Python 3 | none | macOS 15.0+ ARM64 | Details |
Total release size: 30.2 MB
Release files / thread_keep-0.1.3-py3-none-win_amd64.whl
| Download URL | thread_keep-0.1.3-py3-none-win_amd64.whl |
|---|---|
| Size | 8.0 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
136e57a3ed865e495149ef1b45b3fcb3142a7500754332fbd3afab9dc4839445
|
|
BLAKE2b-256 checksum How to use checksums |
8b4fe966821d27a0906c0e40b8aaf66fab1401fda6feec568e4813ca452c4503
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 15, 2026.
Transparency logRelease files / thread_keep-0.1.3-py3-none-manylinux_2_39_x86_64.whl
| Download URL | thread_keep-0.1.3-py3-none-manylinux_2_39_x86_64.whl |
|---|---|
| Size | 7.8 MB |
| Tags | Linux glibc 2.39+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
e06ae36a42755edd1f9721c9a605cbee0da0e0d8ad57c3d4fb973ab2d6026929
|
|
BLAKE2b-256 checksum How to use checksums |
823964e6085e64a2bc53e5c51371f03896c3f2bd3afe8d64f1dac03aeb02d5ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 15, 2026.
Transparency logRelease files / thread_keep-0.1.3-py3-none-manylinux_2_39_aarch64.whl
| Download URL | thread_keep-0.1.3-py3-none-manylinux_2_39_aarch64.whl |
|---|---|
| Size | 7.2 MB |
| Tags | Linux glibc 2.39+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
dccb78c4684abbdc3c88cd3f0033a8d6b47e68fdd42f9b29c9dc0d5637a425bf
|
|
BLAKE2b-256 checksum How to use checksums |
42848276b02adc6e62af269852c1af70767bf2c6407490fcef4e3be040bf5ef9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 15, 2026.
Transparency logRelease files / thread_keep-0.1.3-py3-none-macosx_15_0_arm64.whl
| Download URL | thread_keep-0.1.3-py3-none-macosx_15_0_arm64.whl |
|---|---|
| Size | 7.3 MB |
| Tags | Python 3 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
6938cd9aa41205b4fcc6343b64160fede2372a7a76887f8acf0829d8c15d9bd2
|
|
BLAKE2b-256 checksum How to use checksums |
0010290b46f5505798c705aa367e460a8ba81c72b4b12ebaec46dbd46c860736
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 15, 2026.
Transparency logSecurity for thread-keep 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 4 files in this release have been uploaded with provenance metadata.
Attestation for thread_keep-0.1.3-py3-none-win_amd64.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 15, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.