Sandbox
@boykush/scraps

Wiki-link doc compiler for Claude Code and Codex

Scraps reads wiki links, tags, embeds, headings, and path context from markdown, then compiles the same source into a static HTML site and JSON output. That lets you use one documentation base for readers, scripts, and agents.

47 stars5 forksRustUpdated 7d ago
Who it's for

Builders who want one markdown source to work as both a readable site and an agent-queryable knowledge base.

What it delivers

You can keep documentation in wiki markdown and have agents search, validate, and build it without reformatting the source.

What it does

Wiki-link compilation

Parses `[[wiki-link]]`, `#[[tag]]`, `![[embed]]`, `[[Page#heading]]`, and `ctx_path` as typed primitives.

Static site output

Builds the source into a static HTML site for human readers.

JSON query output

Exports JSON so shell scripts and agents can search and inspect the same content.

Agent skills

Provides `llm-wiki` skills for Ingest, Query, and Lint flows in Claude Code and Codex.

MCP server

Includes an MCP server for MCP-compatible clients, with shared serving via `scraps mcp serve --http`.

README


scraps logo
Scraps

The Wiki-link doc compiler for the LLM era.

Documentation Crates.io License CI

Scraps treats documentation like a programming language. Wiki-linked markdown becomes a typed source, compiling into a static site for readers and into JSON any agent can shell into — turning Karpathy's LLM Wiki pattern into a typed, queryable artifact. CLI primary with companion AI skills, fitting any editor and any LLM agent.

Quick start

# Install
brew install boykush/tap/scraps    # or: cargo install scraps

# Compile a wiki
mkdir my-wiki && cd my-wiki
scraps init
scraps build

# Query the same source from a shell or AI agent
scraps search "release checklist" --json
scraps links "Configuration" --json
scraps lint

See the Getting Started tutorial for the full flow.

How it works

graph LR
  Source[Markdown sources] --> IR[Scraps IR — typed graph]
  IR --> HTML[Static HTML]
  IR --> JSON[CLI JSON]

Scraps reads [[wiki-link]], #[[tag]], ![[embed]], [[Page#heading]], and ctx_path as typed primitives. The same source compiles to an HTML site for human readers and to JSON for scripts and AI agents.

AI integration

CLI + JSON is the primary path — any shell-capable agent can query Scraps without an MCP client implementation. Bundled plugins provide agent-facing workflows:

  • llm-wiki — Karpathy-style Ingest / Query / Lint skills for Claude Code and Codex, plus Claude Code agents for purpose-driven lint and the default Scraps LLM Wiki schema
  • mcp-server — MCP server for MCP-compatible clients, shared across repositories via scraps mcp serve --http

See the AI integration guide for the trade-offs.

Documentation

Screenshots

static site dark mode

Search, pagination, and Wiki-link navigation, themed with Nord.

Light mode static site light mode

Contributing

Bugs, feature requests, and PRs are welcome. See CONTRIBUTING.md, the issue templates, and the Code of Conduct.

License

MIT

Files in the repo

Repository payload27 top-level entries
  • .agents
  • .claude
  • .claude-plugin
  • .codex
  • .github
  • .mise-tasks
  • assets
  • design
  • docs
  • livt
  • modules
  • plugins
  • src
  • tests
  • tokens
  • .gitignore
  • action.yml
  • Cargo.lock
  • Cargo.toml
  • CLAUDE.md
  • CODE_OF_CONDUCT.md
  • CONTRIBUTING.md
  • deny.toml
  • hk.pkl
  • LICENSE.md
  • mise.toml
  • README.md

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More tools

JuliusBrussee/
caveman

🪨 why use many token when few token do trick — Claude Code skill that cuts 65% of tokens by talking like caveman

105k
1 add
MemPalace/
mempalace

The best-benchmarked open-source AI memory system. And it's free.

59k
stablyai/
orca

Orca is the ADE for working with a fleet of parallel agents. Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

66k

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

132k

Never stop coding. Free MIT AI gateway: one endpoint, 352 providers (150+ free), 1200+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 550+ contributors

64k
headroomlabs-ai/
headroom

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

71k