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

rayshot

v1.0.1

Published

Generate beautiful code screenshots from ray.so via CLI

Readme

rayshot

Generate beautiful code screenshots from ray.so via the command line.

Example

Installation

# Clone and install
git clone https://github.com/kristianfreeman/rayshot.git
cd rayshot
npm install

# Link globally (optional)
npm link

Usage

# Basic usage - pass code directly
rayshot "const x = 1;" -o screenshot.png

# From a file
rayshot ./snippet.ts --output screenshot.png

# With options
rayshot "console.log('hello')" --theme vercel --language javascript --name app.js

# Pipe from stdin
cat myfile.py | rayshot - --language python -o output.png

# Light mode
rayshot "const x = 1;" --light --theme candy

Options

| Option | Alias | Description | Default | |--------|-------|-------------|---------| | --theme | -t | Theme name | cloudflare | | --language | -l | Syntax highlighting language | typescript | | --output | -o | Output file path | ./rayshot.png | | --name | -n | Filename shown in header | none | | --padding | -p | Padding in pixels | 32 | | --dark | -d | Dark mode | true | | --light | | Light mode | | | --list-themes | | List all available themes | | | --list-languages | | List all available languages | | | --help | -h | Show help | |

Themes

Partner Themes

  • cloudflare - Cloudflare (orange/dark)
  • vercel - Vercel (black/white)
  • supabase - Supabase (green/dark)
  • tailwind - Tailwind CSS (blue)
  • openai - OpenAI (black/green)
  • stripe - Stripe (blue/purple)
  • prisma - Prisma (teal)
  • clerk - Clerk (purple)
  • mintlify - Mintlify (green)
  • elevenlabs - ElevenLabs (purple)
  • resend - Resend (black/white gradient)
  • triggerdev - Trigger.dev (purple)
  • nuxt - Nuxt (green)
  • browserbase - Browserbase (orange)
  • gemini - Google Gemini (blue)

Community Themes

  • noir, mono, breeze, candy, crimson, falcon, meadow, midnight, raindrop, sunset, bitmap, ice, sand, forest

Run rayshot --list-themes for the full list.

Languages

Supports all major languages including:

typescript, javascript, python, swift, go, rust, java, kotlin, cpp, c, csharp, ruby, php, shell, sql, json, yaml, html, css, markdown, and more.

Run rayshot --list-languages for the full list.

Examples

Tweet-ready Cloudflare code snippet

rayshot 'const handler = async (req: Request) => {
  return new Response("Hello from Workers!");
};' --theme cloudflare --name worker.ts -o tweet.png

Dark Vercel-themed React component

rayshot ./Component.tsx --theme vercel --dark -o component.png

Python with Supabase theme

rayshot "def hello():
    print('Hello, World!')" --theme supabase --language python -o hello.png

How it works

rayshot uses Playwright to:

  1. Open ray.so with your code and settings encoded in the URL
  2. Wait for the code frame to render
  3. Click the "Export" button
  4. Save the downloaded PNG

Requirements

  • Node.js 18+
  • Chromium (automatically installed by Playwright)

License

MIT

Credits

  • ray.so by Raycast - The beautiful code screenshot tool
  • Built for making tweet-worthy code snippets