weavehubpreview
The registry of ideas woven into code.
Bring an idea into your project:
weave cite ai:rag -f src/search.ts
45 canonical ideas · GoF · enterprise · cloud · AI & agentic

Browse the catalog

New to weave?

What it is & how to use it

Modern code is woven from many sources — patterns, papers, libraries, prior work, ideas an AI suggested. weave records where each one came from as a thread.  git tracks lineage · weave tracks influence

What is weave?

A thread is a typed, weighted link from a region of your code to the canonical idea it came from — kept in .weave/ next to the code and committed with it.

git tracks lineage — what your code descended from.
weave tracks influence — what shaped it.

weavehub is the shared catalog of those ideas. Your threads stay in your repo; weavehub is the index — the way npmjs.com is to npm.

How to use it
# install once — gives you the `weave` and `weave-mcp` commands
npm install -g weavehub
weave init            # create .weave/ (layers on git), no signup, works offline
  1. 1
    Discover what's already there
    weave reads your dependencies and code and detects the catalog ideas your project already uses — a populated weave with zero manual effort.
    weave discover           # e.g. detects ai:rag, cloud:retry-backoff, agentic:mcp…
  2. 2
    Cite as you build
    Drop an inline annotation next to the code and sync it — or record one directly.
    // @weave derived-from ai:rag@2 :: hybrid retrieval + rerank
    weave scan
  3. 3
    Understand the weave
    See what influenced any line, the working-tree state, or generate a bibliography.
    weave blame src/search.ts   ·   weave status   ·   weave attribution
  4. 4
    Stay current
    When a grafted idea evolves (say ai:rag v1→v2), weave flags the code that used the old version and can hand an agent a build brief to update it.
    weave outdated   ·   weave update --all
Use it in Claude Code & other agents

weave ships an MCP server, so a coding agent records and queries threads as it builds — provenance captured at authoring time, not reconstructed later. Threads the agent records are tagged with its model id, so they're distinct from your own.

Claude Code

Add the MCP server, then the /weave command.

# 1 · register the MCP server — .mcp.json (or claude mcp add)
{ "mcpServers": { "weave": { "command": "weave-mcp" } } }

# 2 · add the slash command
cp weave.md ~/.claude/commands/

Then /weave ai:rag scaffolds the pattern and records the thread — one command brings in the code and its citation.

Cursor · Windsurf · any MCP client

Same server, standard MCP config — no lock-in.

{ "mcpServers": { "weave": { "command": "weave-mcp" } } }

Tools the agent gets:

weave_catalog_searchweave_citeweave_traceweave_outdated