Scraps is a portable CLI knowledge hub for managing interconnected Markdown documentation with Wiki-link notation.
Learn more: What is Scraps?
Documentation
This documentation follows the Diátaxis framework:
- Tutorials - Learn Scraps: Getting Started
- How-to Guides - Solve problems: Deploy to GitHub Pages, Setup LSP, Use Templates
- Reference - Look up details: Build, Configuration, Normal Link
- Explanation - Understand concepts: What is Scraps?, Search Architecture
Browse by topic: #CLI #Wiki-Links #Markdown
Sort by - committed date
-
How-to/Install Claude Code Plugin#Integration This guide shows you how to enable the Scraps MCP (Model Context Protocol) server plugin in Claude Code. Installation Step 1: Add the Plugin Marketplace First, add the Scraps plugin marketplace: claude plugin marketplace add boykush/scraps This registers the Scraps plugin catalog with Claude Code. Step 2: Enable the Plugin Add the following to your project’s .claude/settings.json: { "enabledPlugins": { "mcp-server@scraps-claude-code-plugins": true } } The plugin will automatically use the current directory as your Scraps project path. Configuration Custom Project Path (Optional) To specify a different Scraps project path, set the SCRAPS_PROJECT_PATH environment variable: { "env": { "SCRAPS_PROJECT_PATH": "/path/to/your/scraps/project" }, "enabledPlugins": { "mcp-server@scraps-claude-code-plugins": true } }
-
How-to/Integrate with AI Assistants#Integration Scraps includes comprehensive Model Context Protocol (MCP) server functionality, enabling AI assistants to directly interact with your Scraps knowledge base. What is MCP? The Model Context Protocol (MCP) is an open standard that enables AI assistants to securely access external data sources and tools. Scraps implements an MCP server that exposes your documentation as a searchable, linkable knowledge base. Quick Start Claude Code (Recommended) For Claude Code users, we provide an official plugin for seamless integration. See Install Claude Code Plugin for installation instructions. Manual MCP Server Setup For other MCP-compatible clients or advanced configurations, you can add Scraps as an MCP server directly: claude mcp add scraps -- scraps mcp serve --path ~/path/to/your/scraps/project/ Replace ~/path/to/your/scraps/project/ with the actual path to your Scraps project directory. For command details, see MCP Serve. Available Tools For detailed MCP tool documentation, see MCP Tools.
-
Reference/MCP Tools#Integration This reference documents the MCP (Model Context Protocol) tools provided by Scraps for AI assistant integration. search_scraps Search through your Scraps content with natural language queries using fuzzy matching. Parameters: query (string, required): Search query to match against scrap titles and contexts num (integer, optional): Maximum number of results to return (default: 100) Returns: results: Array of matching scraps with their title, context, and full Markdown content count: Total number of matches found list_tags List all available tags in your Scraps repository with their backlink counts, sorted by popularity. Parameters: None Returns: Array of tags with the following fields: title: Tag name backlinks_count: Number of scraps referencing this tag lookup_scrap_links Find outbound wiki links from a specific scrap. Returns all scraps that the specified scrap links to. Parameters: title (string, required): Title of the scrap to get links for ctx (string, optional): Context if the scrap has one Returns: Array of linked scraps with their full content. lookup_scrap_backlinks Find inbound wiki links (backlinks) to a specific scrap. Returns all scraps that link to the specified scrap. Parameters: title (string, required): Title of the scrap to get backlinks for ctx (string, optional): Context if the scrap has one Returns: Array of scraps that link to the specified scrap, with their full content. lookup_tag_backlinks Find all scraps that reference a specific tag. Parameters: tag (string, required): Tag name to get backlinks for Returns: Array of scraps that reference the specified tag, with their full content. Notes All search and lookup operations are performed against the current state of your Scraps repository Fuzzy matching is used for search queries to improve discoverability Results include the full Markdown content of matching scraps The MCP server must be running for these tools to be available to your AI assistant For setup instructions, see Integrate with AI Assistants.
-
Reference/Template#CLI #Templates ❯ scraps template This command generates scrap files from Markdown templates located in the /templates directory. Commands List Templates ❯ scraps template list Lists all available templates in the /templates directory. Example output: daily_note book meeting project Generate Scrap from Template ❯ scraps template generate <TEMPLATE_NAME> [OPTIONS] Generates a scrap file from the specified template. Examples # List available templates ❯ scraps template list # Generate from template with metadata-specified title ❯ scraps template generate daily_note # Generate with command-line title ❯ scraps template generate meeting -t "Weekly Standup" # Generate with environment variables ❯ TITLE="My Book Review" scraps template generate book References Template features and syntax: Template System Template samples: Use Templates
-
Reference/Color Scheme
-
Reference/Build#CLI ❯ scraps build This command processes Markdown files from the /scraps directory and generates a static website. Source Structure ❯ tree scraps scraps ├── Getting Started.md └── Documentation.md Generated Files The command generates the following files in the public directory: ❯ tree public public ├── index.html # Main page with scrap list ├── getting-started.html ├── documentation.html ├── main.css # Styling for the site └── search.json # Search index (if enabled) Each Markdown file is converted to a slugified HTML file. Additional files like index.html and main.css are generated to create a complete static website. Examples # Basic build ❯ scraps build # Build with verbose output ❯ scraps build --verbose # Build from specific directory ❯ scraps build --path /path/to/project After building, use Serve to preview your site locally.
-
Explanation/README Processing#Markdown In Scraps, the scraps/README.md file is automatically converted to HTML and included in the static site’s top page ( public/index.html ). For Markdown syntax, please refer to CommonMark. Limitations When using autolink syntax in scraps/README.md, the OGP card described in Autolink will not be displayed. URLs will be displayed as normal links. In: <https://example.com> Out: https://example.com
-
Reference/Mermaid#Markdown By specifying mermaid as the language for a code block, you can use Mermaid diagrams. Example In: ```mermaid graph LR A --- B B-->C[fa:fa-ban forbidden] B-->D(fa:fa-spinner); ``` Out: graph LR A --- B B-->C[fa:fa-ban forbidden] B-->D(fa:fa-spinner);
-
Reference/CommonMark#Markdown Scraps supports Markdown syntax according to the CommonMark specification. Please refer to the documentation of the pulldown-cmark library used internally for more details. CommonMark specification - pulldown-cmark guide Example In: # Heading 1 ## Heading 2 ### Heading 3 #### Heading 4 Out: Heading 1 Heading 2 Heading 3 Heading 4
-
Reference/GitHub-flavored Markdown#Markdown As an extension, GitHub-flavored Markdown is also supported. This includes features such as strikethrough, tables, and task lists. Example Strikethrough In: ~~This text is strikethrough.~~ Out: This text is strikethrough. Task Lists In: - [x] Task 1 - [ ] Task 2 - [ ] Task 3 Out: Task 1 Task 2 Task 3