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

@design-token-kit/cli

v0.3.3

Published

CLI for Design Token Kit: validate, convert, showcase.

Readme

@design-token-kit/cli

The CLI package of Design Token Kit provides the dtokens command for validating, converting, and previewing design tokens from the terminal.

Features

  • DTCG 2025.10 validation - schema validation for DTCG JSON token documents
  • Semantic checks - unresolved references, circular references, group references, type mismatches, and deprecated token usage
  • HRDT YAML support - a compact, human-readable alternative to DTCG JSON
  • Token format conversion - read and write DTCG JSON and HRDT YAML
  • CSS generation - base and theme token sets rendered as CSS custom properties
  • Static showcase - HTML showcase generation from token sources or existing CSS
  • Source abstraction - local files, stdin, URLs, and raw token content strings

Node.js 18 or newer is required.

Install

Run without installing:

npx @design-token-kit/cli validate tokens.json

Install globally:

npm install -g @design-token-kit/cli
dtokens --version

Install locally:

npm install @design-token-kit/cli

Quick Start

dtokens validate tokens.json
dtokens convert tokens.yaml --inform hrdt --outform css --out ./tokens.css
dtokens showcase tokens.json --out ./showcase.html --open

Input Formats

DTCG JSON

Use DTCG JSON token documents as the canonical source format for validation, conversion, CSS generation, and showcase generation.

HRDT YAML

Use HRDT YAML as a compact, human-readable alternative to DTCG JSON.

Base and theme sources

When multiple token sources are provided, the first source is treated as the base token set and the remaining sources are treated as theme overrides.

Stdin

Pass - or omit source arguments to read from standard input.

Output Formats

CSS custom properties

Generate CSS variables from token sources. Base tokens are emitted under :root; theme overrides are emitted under :root[data-theme="<theme>"].

HTML showcase

Generate a static HTML preview from DTCG JSON, HRDT YAML, or existing CSS custom properties.

Serialized token documents

Convert token documents between DTCG JSON and HRDT YAML.

Commands

| Command | Description | | --- | --- | | validate [files...] | Validate DTCG JSON or HRDT YAML token files. | | convert [options] [files...] | Convert a token file to DTCG JSON, HRDT YAML, or CSS. | | showcase [options] [files...] | Create HTML showcase from DTCG JSON, HRDT YAML, or CSS. |

Options

convert

| Option | Description | | --- | --- | | -i, --inform [format] | Input format: dtcg, hrdt | | -f, --outform [format] | Output format: dtcg, hrdt, css | | -o, --out [file] | Output file, defaults to stdout |

showcase

| Option | Description | | --- | --- | | -o, --out <file> | Output HTML file name or path | | --open | Open the generated HTML in browser, only with --out |

Validation

Validate one or more DTCG JSON or HRDT YAML token sources.

dtokens validate tokens.json
dtokens validate tokens.yaml
dtokens validate tokens.yaml tokens.dark.yaml

Document Conversion

Convert token documents between DTCG JSON and HRDT YAML.

dtokens convert tokens.json --outform hrdt
dtokens convert tokens.yaml --inform hrdt --outform dtcg

Use --out to write the result to a file instead of stdout.

dtokens convert tokens.json --outform hrdt --out tokens.yaml

Multiple input sources are only supported when --outform css.

CSS Conversion

Convert a base token set and optional theme overrides to CSS custom properties.

dtokens convert tokens.json
dtokens convert tokens.yaml --inform hrdt --outform css
dtokens convert tokens.json tokens.dark.json --out ./tokens.css

HTML Showcase

Generate an HTML showcase from token sources or from a single CSS source.

dtokens showcase tokens.yaml --out ./showcase.html
dtokens showcase tokens.css --out ./showcase.html
dtokens showcase - < tokens.yaml