Skip to main content

clew

PyPI clew's own wiki — built by clew from this repository on every green main · clew-trace on PyPI

A clew is the ball of thread Ariadne gave Theseus to find his way out of the labyrinth — the archaic spelling, and the direct ancestor, of the word "clue".

A symbol graph of your repository, served to Claude over MCP. One lookup returns a function's body with its callers, its callees, the thread it runs on and the locks it takes — instead of a chain of greps the agent rebuilds every session and loses at every context compaction.

flowchart LR
  repo[your repository] --> index[(clew index)]
  index --> agent([the agent, over MCP:<br/>one call per question])
  index --> wiki([you, in the wiki:<br/>requirements · flows · map])

What you get

  • One call instead of a search chain. dossier answers "who calls this, and what does it touch" in a single reply, including relationships grep cannot see: function-pointer callbacks, thread entry points, the locks held around a call.
  • Answers that say what they do not know. An unresolved call, a layer that failed to build, or a file clew cannot parse is reported as unresolved — never quietly as "none".
  • An index that keeps itself current, and stays quiet otherwise. While a session is in use, a saved file in its own project refreshes that index within a couple of seconds (a file-change event, not a poll; a burst of writes is one refresh, run at low CPU and disk priority). Any other repository is refreshed when it is queried. After CLEW_IDLE_SECONDS (default 600) with no tool call, the server does no background work at all, and it exits when the session's process is gone. In Claude Code every session shares ONE clew server per machine: each session runs only a small relay (clew-proxy, about 20 MB), which starts the shared server when none is running. A query against a stale index refreshes it before answering, and only edited files are re-parsed. Separate git worktrees get separate indexes.
  • A wiki generated from the index. Requirements and the tests that verify them, sequence flows, a system map and a page per function, built as a static site, as Markdown for a GitHub or Azure DevOps wiki, or served live by the MCP server (the wiki).
  • What the server serves: three tools — dossier, search and index — plus the propose_declaration prompt and the wiki as MCP resources (clew://wiki/{slug}/llms.txt, clew://wiki/{slug}/flow/{name}).
  • Measured, not asserted. Each release is graded against the same agent working without clew, and published with the defects that move its numbers: acceptance results.

Quick start

curl -LsSf https://astral.sh/uv/install.sh | sh   # the plugin launches clew through uv
sudo apt install doxygen       # only for C and C++ (brew install doxygen on macOS)

Then, in Claude Code:

/plugin marketplace add tvanfossen/clew
/plugin install clew@clew

The plugin runs the clew-trace release it was published with, through uvx; the first launch installs it. To register clew without the plugin, see Install.

Ask Claude to index the repository — it calls index(action='refresh') — then ask about your code. Rust repositories also need cargo +nightly.

What the plugin runs, sends and fetches. An MCP server (clew-mcp) that builds and queries a local SQLite index under ~/.local/state/clew, and one PostToolUse hook (clew-hook) that, after a file read or search, adds a short note naming the index call that would have answered more; CLEW_HOOK_DISABLE=1 turns it off. Its first launch fetches the pinned clew-trace release from PyPI through uv; after that, clew itself sends nothing over the network. Building an index runs the repository's own tooling — doxygen on C/C++, and cargo on Rust, which can download the crate's dependencies — so treat indexing a tree like building it. See SECURITY.md.

Language support

Language Symbols Call graph Doc comments
C ✓ ✓ ✓
C++ ✓ ✓ ✓
Rust ✓ ✓ ✓
Python ✓ ✓ ✓
JavaScript ✓ ✓ ✓
TypeScript ✓ ✓ ✓
shell ✓ — ✓
CMake ✓ — ✓
YAML, JSON, Perl, Make name only — —

Each language links to what its front end populates and what it cannot. Every cell is re-measured by a test that builds a fixture in that language.

Learn more

MIT licensed.

Metadata

Release files for clew-trace 2.9.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for clew-trace 2.9.2
File Size Uploaded Provenance Actions
clew_trace-2.9.2.tar.gz 3.9 MB With provenance Details for clew_trace-2.9.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for clew-trace 2.9.2
File Interpreter ABI Platform Actions
clew_trace-2.9.2-py3-none-any.whl Python 3 none any Details for clew_trace-2.9.2-py3-none-any.whl

Total release size: 6.4 MB

Release files / clew_trace-2.9.2.tar.gz

Download URL clew_trace-2.9.2.tar.gz
Size 3.9 MB
Tags Source
SHA-256 checksum
How to use checksums
fd2ebb12c9c69f9f938511111faaf4ac2e5f2fe570435919341b3c9de9bef5fd
BLAKE2b-256 checksum
How to use checksums
fab3999daab73757f3e3c97c845925408b2b2bfcfade477f5203b1f9c8c8843e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Dec 4, 2026.

Transparency log

Release files / clew_trace-2.9.2-py3-none-any.whl

Download URL clew_trace-2.9.2-py3-none-any.whl
Size 2.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
0033082167b227207831b946e1ff1253f6929fd61ca138ed6e6a4d994a50f6dc
BLAKE2b-256 checksum
How to use checksums
31d9c98eb017e0a4d9fb4594f3a68cd4178d6febe9a8d50c82251fe929b16d69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Dec 4, 2026.

Transparency log

Security for clew-trace 2.9.2

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for clew_trace-2.9.2.tar.gz

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 Dec 4, 2026.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

2.9.2 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page