Skip to content
项目

关于

The Wiki-link doc compiler for the LLM era.

编程语言与运行时

这些数字如何统计

46 星标6 复刻 +1 24小时

实测星标增长

24小时
+1
7天
+1
15天
+1
1个月
+1

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文


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. The IR is kept under .scraps/ next to .scraps.toml, so every command reads the wiki through it and an unchanged source is never parsed twice.

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
  • pkm — Personal knowledge management skills for Claude Code: learn a source and record only what you understood, or digest an article into a short linked page
  • mcp-server — MCP server for MCP-compatible clients, shared across repositories via scraps mcp serve --http

Each plugin is also an apm package. Every version is tagged <plugin>--v<version> when it lands on main, independently of Scraps' own v* releases, so an apm.yml can pin one:

dependencies:
  apm:
    - boykush/scraps/plugins/pkm#pkm--v<version>

See the AI integration guide for the trade-offs.

Documentation

Screenshots

static site dark mode

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

neighbourhood graph on a scrap page

Each scrap page draws its neighbourhood: backlinks on the left, links on the right, arrows pointing at the referenced scrap.

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

探索相关项目

加载中…