Sort by - committed date
-
How-to/Integrate with AI Assistants#Integration Scraps includes comprehensive Model Context Protocol server functionality, enabling AI assistants like Claude Code to directly interact with your Scraps knowledge base. Quick Start with Claude Code The fastest way to get started is with Claude Code. Add Scraps as a Model Context Protocol server with a single command: 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. Available Tools search_scraps: Search through your Scraps content with natural language queries list_tags: List all available tags in your Scraps repository lookup_scrap_links: Find outbound wiki links from a specific scrap lookup_scrap_backlinks: Find scraps that link to a specific scrap lookup_tag_backlinks: Find all scraps that reference a specific tag
-
How-to/Setup LSP#Integration Currently, the most recommended LSP for editing Scraps is markdown-oxide. markdown-oxide supports the following editing environments: Neovim VSCode Zed Helix To match the current features provided by Scraps, place the following configuration file .moxide.toml under the scraps/ directory and open the scraps/ directory directly for a comfortable editing experience. heading_completions = false title_headings = false tags_in_codeblocks = false references_in_codeblocks = false We are considering a feature to generate the LSP configuration file during the init command.
-
How-to/Deploy to GitHub Pages#Deployment Custom actions are available to deploy Scraps to Github Pages. scraps-deploy-action YAML file Prepare a yaml file under .github/workflows/ like this name: Deploy scraps github pages on: push: branches: - main paths: - 'scraps/**' jobs: build: runs-on: ubuntu-latest steps: - name: checkout uses: actions/checkout@v5 with: fetch-depth: 0 # For scraps git commited date - name: build_and_deploy uses: boykush/scraps-deploy-action@v2 env: # Target branch PAGES_BRANCH: gh-pages TOKEN: ${{ secrets.GITHUB_TOKEN }} GitHub settings Set up GitHub Pages for the repository. Build and deployment parameter as follows. Source: Deploy from a branch Branch: gh-pages
-
Tutorial/Configure ProjectTo get started with your Scraps site, you need to edit at least two required fields in your Config.toml file. Step 1: Edit base_url Replace the placeholder URL with your actual site URL: base_url = "https://yourusername.github.io/your-repository/" Step 2: Set your site title Add your desired site title: title = "My Knowledge Base" Optional Configuration Only the base_url and title variables are required. Everything else is optional. See Configuration for all available configuration variables and their default values.
-
Tutorial/Getting StartedSetup Install Scraps Follow the Installation guide to install Scraps on your system Initialize Project Create a new Scraps project using Init: ❯ scraps init my-knowledge-base ❯ cd my-knowledge-base Configure Project Follow Configure Project to set up your Config.toml Content Creation Write Markdown Files Create Markdown files in the /scraps directory Use CommonMark and GitHub-flavored Markdown Add Internal Links Connect documents using Normal Link syntax: [[Page Name]] for simple links [[Page Name|Custom Text]] for custom link text Enhance Content Add Mermaid diagrams for visual representations Use Autolink functionality for external links Organize with context folders when needed Build and Preview Generate Site Use Build to generate static site files: ❯ scraps build Preview Locally Use Serve for local preview and debugging: ❯ scraps serve Deploy Deploy to platforms like Deploy to GitHub Pages when ready AI Integration MCP Server: Enable AI assistant integration using Integrate with AI Assistants for intelligent search and content assistance
-
Tutorial/InstallationYou can find the latest version on GitHub Releases. Requirements The git command is required for features. Cargo ❯ cargo install scraps macOS ❯ brew install boykush/tap/scraps
-
Explanation/Template System#Templates Generate scrap files from predefined Markdown templates for efficient content creation. Basic Usage Create template files in /templates directory Run generate scrap on command-line Template Syntax Templates use Tera template engine with TOML metadata: +++ title = "{{ now() | date(timezone=timezone) }}" +++ # Content goes here Available Variables timezone - Access Config.toml timezone setting All Tera built-in functions Examples See Use Templates for ready-to-use templates. For CLI commands, see Template.
-
Explanation/Search Architecture#Static Site Search index format Scraps can build a search index using the Fuse JSON schema as shown below. [ { "title": "Search", "url": "http://127.0.0.1:1112/scraps/search.html" }, { "title": "Overview", "url": "http://127.0.0.1:1112/scraps/overview.html" }, ... ] Search libraries Scraps content perform searches with fuse.js using an index. We are considering WASM solutions like tinysearch for future performance improvements in our deployment environment. Configuration If you are not using the search function, please modify your Config.toml as follows. See the Configuration page for details. # Build a search index with the Fuse JSON and display search UI (optional, default=true, choices=true or false) build_search_index = false
-
Reference/MCP Serve#CLI ❯ scraps mcp serve This command starts an MCP (Model Context Protocol) server that enables AI assistants like Claude Code to directly interact with your Scraps knowledge base. Examples # Basic MCP server ❯ scraps mcp serve # Serve from specific directory ❯ scraps mcp serve --path /path/to/project The MCP server provides tools for AI assistants to search through your content and list available tags, enabling intelligent assistance with your documentation. For more details, see Integrate with AI Assistants.
-
Reference/Tag Link#Wiki-Links #Markdown If there is no scrap with the specified title, such as #Markdown, it becomes a tag. Tags are displayed on the index page. Each tag links to a page that lists all scraps using that tag.