@opscode/snappy
v1.0.1
Published
Generate beautiful code snapshot images from local files with customizable themes and backgrounds
Downloads
9
Maintainers
Readme
@opscode/snappy
Generate beautiful code snapshot images from local files with customizable themes and backgrounds.
Features
- 🎨 Multiple Themes: Choose from Nord, Dracula, GitHub Dark/Light, Monokai, and more
- 🌈 Custom Backgrounds: Use preset gradients or your own images
- 🔧 Configurable: Set default themes, backgrounds, and opacity
- 💨 Lightweight: Uses your system's Chrome/Chromium instead of bundling a browser
- 📦 Easy to Use: Simple CLI interface with sensible defaults
Installation
npm install -g @opscode/snappyRequirements:
- Node.js >= 12.0.0
- Chrome, Chromium, or Edge browser installed
Quick Start
# Basic usage
snappy capture myfile.js
# With custom theme and background
snappy capture myfile.js --theme dracula --background ocean
# With custom opacity
snappy capture myfile.js --opacity 80
# Use your own background image
snappy capture myfile.js --background ./my-wallpaper.pngCommands
capture
Generate a code snapshot from a file.
snappy capture <file> [options]Options:
-o, --output <path>- Output file path-t, --theme <name>- Theme to use (dracula, nord, github-dark, etc.)-b, --background <preset|path>- Background (preset name or image path)--opacity <0-100>- Window opacity (default: 100)
list
List available themes and backgrounds.
snappy listconfig
Manage default configuration.
# Set default theme
snappy config:theme:set dracula
# Set default background
snappy config:background:set ocean
# Set default opacity
snappy config:opacity:set 90Available Themes
norddraculagithub-darkgithub-lightmaterial-thememonokaimin-light
Available Background Presets
dawn- Orange to pink gradientdusk- Blue to purple gradientcool- Cyan to blue gradientwarm- Yellow gradientneon- Green to blue gradientocean- Teal to purple gradientforest- Green gradientcyber- Pink gradientgrape- Orange to yellow gradientmidnight- Dark gray gradient
Examples
# Capture with Nord theme and ocean background
snappy capture app.ts --theme nord --background ocean
# Use custom background image with transparency
snappy capture app.ts --background ./wallpaper.png --opacity 75
# Set defaults and use them
snappy config:theme:set dracula
snappy config:background:set dawn
snappy capture app.tsLicense
MIT
Author
opscode
