Skip to main content

clew

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. A saved file refreshes its repository's index within about a second (a file-change event, not a poll); 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.0.0

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.0.0
File Size Uploaded Provenance Actions
clew_trace-2.0.0.tar.gz 3.5 MB With provenance Details for clew_trace-2.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 5.8 MB

Release files / clew_trace-2.0.0.tar.gz

Download URL clew_trace-2.0.0.tar.gz
Size 3.5 MB
Tags Source
SHA-256 checksum
How to use checksums
8f0bc67ef74a69eedec4722ec64d2f3bbeed887278edea1d75f7d17b0ca7ada3
BLAKE2b-256 checksum
How to use checksums
2486cca9c30130ae09129adf9cce7b8f099e79d1f85fa9e265246b736eaee5f5
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 Nov 23, 2026.

Transparency log

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

Download URL clew_trace-2.0.0-py3-none-any.whl
Size 2.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
dbc75ddc0df7baffefdf4a2fc97b49b2645e675ff77c12b1c0f9b82ea2135070
BLAKE2b-256 checksum
How to use checksums
9c91f483f859d0b179a5e920e4de12c72c9dcadd7bd945a0f2ed4e10792b8ea3
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 Nov 23, 2026.

Transparency log

Security for clew-trace 2.0.0

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.0.0.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 Nov 23, 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.0.0 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