CtrlK
BlogDocsLog inGet started
Tessl Logo

mcollina/snipgrapher

Configures and uses snipgrapher to generate polished code snippet images, including syntax-highlighted PNGs, SVGs, and WebP exports with custom themes, profiles, and styling options. Use when the user wants to create code screenshots, turn code into shareable images, generate pretty code snippets for docs or social posts, produce syntax-highlighted images from source files, or explicitly mentions snipgrapher. Supports single-file renders, batch jobs, watch mode, and reusable named profiles via the snipgrapher CLI or npx.

97

Quality

97%

Does it follow best practices?

Impact

Pending

No eval scenarios have been run

SecuritybySnyk

Advisory

Suggest reviewing before use

Overview
Quality
Evals
Security
Files

setup-and-configuration.mdrules/

name:
setup-and-configuration
description:
Install and configure snipgrapher with stable defaults and profiles
metadata:
{"tags":"snipgrapher, setup, config, profiles, cli"}

Goal

Set up snipgrapher so snippet rendering is deterministic and easy to repeat.

1) Pick an executable strategy

Use one of these:

  1. Binary available in PATH: snipgrapher
  2. npm package without global install:
npx --yes snipgrapher doctor

2) Initialize configuration

Create a baseline config in the current project:

snipgrapher init

Supported config filenames (first match wins):

  • snipgrapher.config.json
  • snipgrapher.config.yaml
  • snipgrapher.config.yml
  • snipgrapher.config.toml

3) Define reusable defaults and profiles

Use a config structure like:

{
  "theme": "nord",
  "fontFamily": "Fira Code",
  "fontSize": 14,
  "padding": 32,
  "lineNumbers": true,
  "windowControls": true,
  "shadow": true,
  "backgroundStyle": "gradient",
  "format": "svg",
  "defaultProfile": "default",
  "profiles": {
    "default": {},
    "social": {
      "padding": 48,
      "fontSize": 16,
      "watermark": "@your-handle"
    }
  }
}

4) Validate environment and config

Run:

snipgrapher doctor
snipgrapher themes list

Fix validation errors before rendering.

5) Understand precedence for overrides

Rendering values resolve as:

CLI flags > environment variables > config file > defaults

Useful env vars include:

  • SNIPGRAPHER_PROFILE
  • SNIPGRAPHER_THEME
  • SNIPGRAPHER_FORMAT
  • SNIPGRAPHER_FONT_SIZE
  • SNIPGRAPHER_PADDING
  • SNIPGRAPHER_LINE_NUMBERS

Use env vars for CI-wide defaults, and CLI flags for one-off overrides.

rules

rendering-workflows.md

setup-and-configuration.md

SKILL.md

tile.json