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

@jccdn/tokenflow

v0.1.0

Published

Zero-config CLI to pull all Figma variables and generate CSS, TypeScript, Tailwind and JSON token artifacts.

Readme

tokenflow

Zero-config CLI to pull all variables from a Figma file and generate CSS custom properties, TypeScript exports, Tailwind config, and JSON artifacts.

No manual mapping needed — variable names are normalized automatically from your Figma structure.

Install

npm install -g tokenflow

Usage

tokenflow pull     # fetch all variables from Figma → tokens.snapshot.json
tokenflow build    # generate output files from snapshot
tokenflow sync     # pull + build in one step

Setup

1. Get a Figma personal access token Figma → Settings → Security → Personal access tokens

2. Get your Figma file key From the URL: figma.com/design/FILE_KEY/filename

3. Create tokens.config.json

{
  "figmaFileKey": "your-file-key",
  "output": [
    { "format": "css",      "file": "src/tokens/variables.css" },
    { "format": "ts",       "file": "src/tokens/index.ts" },
    { "format": "tailwind", "file": "src/tokens/tailwind.ts" },
    { "format": "json",     "file": "src/tokens/tokens.json" }
  ]
}

4. Pull and build

FIGMA_TOKEN=your_token tokenflow sync

Variable name normalization

Figma variable paths are normalized automatically:

| Figma collection | Figma variable | CSS variable | TS path | |-----------------|----------------|--------------|---------| | Colors | Brand/Primary | --colors-brand-primary | tokens.colors.brand.primary | | Spacing | 4 | --spacing-4 | tokens.spacing["4"] | | Radius | Md | --radius-md | tokens.radius.md |

Multi-mode / Theming

If your Figma collection has multiple modes (e.g. Light / Dark), the CSS output handles it automatically:

:root {
  --colors-brand-primary: #1a73e8;
}

[data-theme="dark"] {
  --colors-brand-primary: #8ab4f8;
}

Switch themes at runtime:

document.documentElement.dataset.theme = "dark";

Output formats

| Format | Output | |--------|--------| | css | CSS custom properties with multi-mode support | | ts | TypeScript tokens (raw values) + cssVars (var references) | | json | Raw token values with all modes | | tailwind | Tailwind theme.extend config with CSS var references |

Config reference

| Field | Required | Default | Description | |-------|----------|---------|-------------| | figmaFileKey | yes | — | Figma file key from URL | | output | yes | — | Array of { format, file } | | snapshot | no | tokens.snapshot.json | Snapshot file path | | cssPrefix | no | "" | Prefix for CSS variable names (e.g. "app"--app-colors-brand-primary) |

Add to package.json

{
  "scripts": {
    "tokens:pull": "tokenflow pull",
    "tokens:build": "tokenflow build",
    "tokens:sync": "tokenflow sync"
  }
}

Environment

FIGMA_TOKEN=your_token   # required for pull and sync