npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

terminal-shot

v0.1.0

Published

Turn terminal output into beautiful shareable images for READMEs, docs, Discord, and social posts.

Readme

terminal-shot 📸

Beautiful terminal screenshots from text, commands, and ANSI output.

npm GitHub Node License

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.

terminal-shot demo

✨ Features

  • Render pasted text, piped ANSI output, files, commands, or a built-in demo.
  • Export png, svg, or html.
  • Preserve ANSI colors and terminal formatting.
  • Built-in themes: dark, catppuccin, tokyo-night, dracula, nord, github-dark, github-light, glass, mono, and matrix.
  • Window chrome, title, subtitle, prompt, watermark, sizing, padding, radius, transparency, and typography controls.
  • Interactive wizard when you run terminal-shot with no arguments.
  • Works locally and in CI/headless environments.

📦 Installation

npm install -g terminal-shot

PNG export uses Playwright Chromium. Install the browser once:

npx playwright install chromium

🚀 Quick Start

Run the guided wizard:

terminal-shot

Render the built-in demo:

terminal-shot demo -o demo.png

Pipe 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.png

Render a command directly:

terminal-shot run "git log --oneline -5" --title "Recent commits" -o commits.png

Render a file:

terminal-shot file output.txt --format svg -o output.svg

🎨 Themes

List available themes:

terminal-shot themes

Use 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 init

Example 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.png

Smoke 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