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

tin.so

v1.3.0

Published

Renders code images from the command line, without a browser

Readme

tin.so

The tin CLI makes images of code (code screenshots) on your machine, without a browser and without an account. Give it code files, pipe code to it, or give it a JSON spec for an image with several windows, panes and popovers. It saves a PNG or SVG, or copies the image to the clipboard, and prints a link that opens the same image in the tin.so web editor.

It has 14 editor themes such as GitHub, Dracula, Nord and Catppuccin, gradient backgrounds, line highlights, text styles and colors, tabs with file icons, and fixed aspect ratios for social media. An agent skill shows coding agents how to use it.

Installation

npx tin.so main.ts        # run it without an installation
npm install -g tin.so     # or install the tin command

Node 22.18 or later.

Usage

# One file
tin main.ts

# Two files side by side in one window, with tabs
tin main.ts plans.toml --tabs --no-title-bar -o plans.png

# Each file in its own window, with a theme
tin worker.ts main.ts --windows --theme tokyo-night

# Code from stdin, copied to the clipboard
pbpaste | tin --title main.ts --copy

# An image for a post on X
tin main.ts --aspect-ratio 16:9

# A JSON spec, for popovers, highlights and styles
tin spec.json

# An image that tin made, again with another theme
tin auth.png --theme dracula -o auth-dark.png

# Only the editor link, opened in the browser
tin link main.ts --open

Each run prints the file and an Edit: link. The image file also contains the spec and the link, so you can drop it into the editor later and change it, or give it to tin again with other options. --no-metadata turns this off.

Commands

| Command | What it does | | ---------------------- | ---------------------------------------------------------------------------------------------- | | tin [render] <input> | Renders code files, code from stdin or a spec to a PNG or SVG. render is the default command | | tin link <input> | Prints the editor link without an image. --copy copies it, --open opens it in the browser | | tin themes | Lists the themes | | tin languages | Lists the languages | | tin fonts | Lists the fonts | | tin schema | Prints the JSON Schema of the spec | | tin skill | Prints the tin skill and how to add it to a coding agent | | tin help [command] | Shows the help of tin, or of a command. tin <command> --help is the same | | tin --version | Prints the version of tin. tin -v is the same |

A file with the name of a command needs a path, such as ./themes.

Options

| Option | What it does | | --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | -o, --output <path> | The output file. A name that ends with .svg gives an SVG | | -f, --format <png\|svg> | The image format (default: from the output name, else PNG) | | -s, --scale <n> | The pixel ratio of a PNG (default: 2) | | -c, --copy | Copies the PNG to the clipboard. Writes no file unless you give -o | | -t, --theme <id> | The theme (default: github) | | -m, --mode <dark\|light> | The color mode (default: dark) | | --font <id> | The code font (default: JetBrains Mono) | | --padding <px> | The space around the windows (default: 64) | | --background <css>, --no-background | theme (default), transparent, a hex color, #from,#to for a gradient, or a CSS gradient such as "linear-gradient(135deg, #2e1065, #a78bfa)". --no-background is transparent | | --background-opacity <0-1> | The opacity of the background, from 0 (transparent) to 1 (default) | | --line-numbers | Shows line numbers | | --aspect-ratio <w:h> | 16:9 for X, 1.91:1 for LinkedIn, 1:1, 4:5, 9:16 | | --tabs | A tab with the file icon and name above each pane | | --no-title-bar | Hides the title bar with the window controls | | --no-frame | No window. The code goes directly on the background | | --controls <gray\|color> | The colors of the window controls (default: gray) | | --split <row\|column> | Panes side by side or below each other (default: row) | | --windows | Each file in its own window | | --direction <column\|row> | Windows below each other or side by side (default: column) | | --title <name>, -l, --language <id> | The file name and the language of code from stdin or --code | | --code <text> | Code as text, without stdin | | --spec, --no-spec | Reads the input as a spec, or as plain code (default: detect) | | --no-metadata | Writes no spec and no link into the image | | --json | Prints the result as JSON |

tin --help has the full list. An unknown option is an error that names the closest option.

Specs

A spec is JSON that describes the whole image: its windows, the panes of each window, and the code of each pane with its highlights, styles and popovers. On stdin, JSON is a spec only when its "$schema" is the URL of the tin spec schema. Other text, also other JSON, is code.

tin -o hover.png <<'EOF'
{
  "$schema": "https://tin.so/schema/v1.json",
  "windows": [
    {
      "panes": [
        {
          "title": "user.ts",
          "code": "const user = await getUser(id);",
          "marks": [{ "line": 1, "match": "user", "style": "underline" }],
          "annotations": [{ "line": 1, "match": "user", "code": "const user: { id: string }" }]
        }
      ]
    }
  ]
}
EOF

tin schema prints the full JSON Schema, with a description, a default and the limits of each field. The @tin.so/core README has an overview.

Environment

  • TIN_APP_URL changes the web editor of the links (default: https://tin.so/).
  • --copy uses osascript on macOS, wl-copy or xclip on Linux, and PowerShell on Windows.

License

MIT