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

@hectorpalmatellez/toki

v1.9.0

Published

Design token pipeline CLI — W3C DTCG in, framework-specific code out

Readme

Toki

Design token pipeline CLI — W3C DTCG in, framework-specific code out.

Toki ingests W3C Design Tokens Community Group (DTCG) format JSON and generates idiomatic, framework-specific code artifacts for ten target platforms: CSS, JavaScript, React Native, Angular (latest + v11), Svelte, React/Next.js, StencilJS, Vue, and Tailwind CSS v4.

Features

  • W3C DTCG input — conforms to the Design Tokens Community Group format
  • Reference resolution — expands {group.token} aliases, detects circular dependencies, applies $type inheritance
  • Ten output formats — CSS, JS, React Native, Angular (latest + v11), Svelte, React/Next.js, StencilJS, Vue, Tailwind CSS v4
  • Platform value transforms — hex normalization, px/rem → raw dp/sp, RN shadow objects, canonical font weights
  • Configuration filetoki.config.ts (or .js) with input, output, formats, themes, naming, and transforms
  • Multi-theme output — separate output files per theme (e.g., tokens.light.css, tokens.dark.css)
  • Naming transformscamelCase, kebab-case, CONSTANT_CASE, SCREAMING_SNAKE_CASE
  • Custom transform plugins — register functions in config that modify token values before generation
  • Watch modetoki watch rebuilds on file change with 200ms debounce
  • Composite type expansion — typography, border, and transition tokens expand into individual CSS longhand custom properties across all CSS-based generators
  • Diff toolingtoki diff reports added, removed, and changed tokens (terminal, JSON, or Markdown output)
  • Token lintingtoki validate checks structural validity, broken references, circular dependencies, naming violations, and more
  • Ecosystem imports — convert Style Dictionary or Figma Tokens Studio formats to W3C DTCG
  • MCP servertoki mcp exposes the full pipeline to AI tools (Claude, Cursor, Windsurf) via 7 tools, 3 resources, 1 dynamic resource, and 3 prompts over Model Context Protocol
  • Web editortoki ui starts a local web app for non-technical users to create base tokens with friendly forms (color pickers, unit dropdowns, typography styles) and generate code for any supported framework
  • Token extraction — scan CSS/SCSS files to extract design token candidates and generate W3C DTCG output
  • Output schemastoki schema publishes a JSON Schema per platform output format for IDE autocomplete on generated files
  • Editor completionstoki completions generates editor-agnostic, VS Code snippet, and LSP completion specs from resolved tokens
  • Deterministic output — same input produces byte-identical artifacts
  • Zero runtime dependencies in generated files

Quick start

Global Installation

npm i -g @hectorpalmatellez/toki

Local Development

pnpm install
toki build --input tokens.json --output ./dist --format css,js

Output:

dist/
├── css/
│   ├── tokens.css
│   └── README.md
├── js/
│   ├── tokens.js
│   ├── tokens.d.ts
│   └── README.md
├── react-native/
├── angular/
├── angular-11/
├── svelte/
├── react/
├── stencil/
├── vue/
└── tailwind/

Run toki with no arguments for an interactive menu. Run toki init to scaffold a starter project.

Web editor (toki ui)

Start a local web app that lets anyone — no CLI or JSON experience needed — create base tokens and generate them for any supported framework:

toki ui
  • Opens http://127.0.0.1:4173 in your browser automatically (use --no-open to skip).
  • Friendly forms per token type: color pickers, unit dropdowns (px/rem/em/%), typography styles, shadows, borders, and transitions. References like {color.primary} are supported.
  • Edits tokens.json in the current directory; every save validates and rebuilds automatically.
  • Picks up formats and the output directory from toki.config.ts when present; your UI choices are remembered in .toki/ui.json.
  • Flags: --port <n>, --host <ip>, --no-open, --verbose.

CLI flags

| Flag | Description | Default | | --------------------------- | ------------------------------------------------------------------- | --------------- | | -i, --input <path> | Path to input token file (W3C DTCG JSON) | — | | -o, --output <path> | Output directory for generated artifacts | — | | -f, --format <formats...> | Output formats (comma- or space-separated; all for all platforms) | css, js | | -c, --config <path> | Path to toki config file | auto-discovered | | -t, --theme <name> | Build a single theme from multi-theme config | all themes | | --clean / --no-clean | Clean subdirectories before writing | true | | --no-cache | Disable the incremental build cache | enabled | | --verbose | Print resolution trace, values, and timing | false |

Documentation

| Guide | Description | | ------------------------------------ | ------------------------------------------------------------------------------------------- | | Usage Guide | Detailed CLI commands, config file, multi-theme, naming, plugins, verbose mode, error codes | | MCP Guide | AI agent integration — toki mcp setup, tools, examples | | Output Guide | Input format (W3C DTCG), output conventions, code examples for all 10 platforms | | Architecture | Pipeline design, source tree, key design decisions | | Changelog | Release history following Keep a Changelog | | Roadmap | Completed tasks and planned work |

Stack

| Layer | Technology | | --------------- | ------------------------------------------------- | | Runtime | Node.js 24 LTS | | Language | TypeScript 7.0+ (native Go compiler, strict mode) | | CLI | Commander.js | | Bundler | tsup | | Testing | Vitest (632 tests, 90%+ coverage) | | Linting | oxlint | | Formatting | Prettier | | Package manager | pnpm 10.32.1 |

License

MIT © Héctor Palma Téllez