Skip to navigation

Build design tokens without the full Knapsack CLI (v4.104.0)

The new @knapsack/design-tokens-cli package runs the design-token build step on its own. design-tokens-cli build reads your tokens JSON and writes the same per-target files (CSS, JS, Android, iOS) as the knapsack CLI’s token build.

Configure it in a design-tokens-cli.config.mjs file with export default configure({ ... }), using the same srcFilePath, distDir, and targets options as the designTokens section of your Knapsack config. Flags such as --targets css,js override the config file. Requires Node.js 22.12 or later.