terminal-shot
v0.1.0
Published
Turn terminal output into beautiful shareable images for READMEs, docs, Discord, and social posts.
Maintainers
Readme
terminal-shot 📸
Beautiful terminal screenshots from text, commands, and ANSI output.
terminal-shot turns terminal output into polished PNG, SVG, or HTML images for READMEs, docs, Discord, changelogs, and social posts. It is local-first: no uploads, no telemetry, no desktop screen capture.

✨ Features
- Render pasted text, piped ANSI output, files, commands, or a built-in demo.
- Export
png,svg, orhtml. - Preserve ANSI colors and terminal formatting.
- Built-in themes:
dark,catppuccin,tokyo-night,dracula,nord,github-dark,github-light,glass,mono, andmatrix. - Window chrome, title, subtitle, prompt, watermark, sizing, padding, radius, transparency, and typography controls.
- Interactive wizard when you run
terminal-shotwith no arguments. - Works locally and in CI/headless environments.
📦 Installation
npm install -g terminal-shotPNG export uses Playwright Chromium. Install the browser once:
npx playwright install chromium🚀 Quick Start
Run the guided wizard:
terminal-shotRender the built-in demo:
terminal-shot demo -o demo.pngPipe command output:
npm test --color=always | terminal-shot --title "npm test" -o tests.png
git status --short | terminal-shot --theme dracula -o status.png
fastfetch | terminal-shot --theme glass -o system.pngRender a command directly:
terminal-shot run "git log --oneline -5" --title "Recent commits" -o commits.pngRender a file:
terminal-shot file output.txt --format svg -o output.svg🎨 Themes
List available themes:
terminal-shot themesUse a theme:
terminal-shot demo --theme tokyo-night -o tokyo-night.png
terminal-shot demo --theme github-light --format svg -o github-light.svg🛠 Options
terminal-shot demo \
--theme tokyo-night \
--title "npm test" \
--subtitle "~/repo" \
--width 900 \
--padding 32 \
--radius 18 \
--font-size 15 \
--scale 2 \
-o demo.png| Flag | Description |
| --- | --- |
| -o, --output <file> | Output path |
| --format png\|svg\|html | Output format |
| --theme <name> | Built-in theme |
| --title <text> / --subtitle <text> | Window header text |
| --no-header | Hide the title/subtitle |
| --window / --no-window | Show or hide window chrome |
| --shadow / --no-shadow | Drop shadow |
| --font <family> / --font-size <n> / --line-height <n> | Typography |
| --padding <n> / --radius <n> | Spacing |
| --width <n> / --max-height <n> / --scale <n> | Sizing and DPR |
| --background <css> / --transparent | Background |
| --prompt <text> / --cwd <text> | Faux shell prompt |
| --watermark <text> | Small watermark |
| --config <file> | Custom config path |
| --json | Print render metadata as JSON |
⚙️ Config
Create a config file:
terminal-shot initExample terminal-shot.config.json:
{
"theme": "tokyo-night",
"fontSize": 15,
"padding": 32,
"radius": 18,
"window": true,
"shadow": true,
"width": 900
}Use a custom path:
terminal-shot demo --config ./shot.config.json -o demo.png🔐 Privacy
- No telemetry.
- No cloud rendering.
- No uploads.
- No desktop screen recording.
- Command mode runs locally through your system shell.
- PNG output uses a local headless Chromium instance.
🧪 Development
git clone https://github.com/david-x3d/terminal-shot.git
cd terminal-shot
npm install
npm run build
npx playwright install chromium
node dist/index.js demo -o examples/demo.pngSmoke checks:
printf '\033[32mPASS\033[0m hello\n' | node dist/index.js --format html -o examples/stdin.html
node dist/index.js file examples/demo.txt --format svg -o examples/demo.svg
node dist/index.js demo -o examples/demo.png📄 License
MIT
