Init
Initialize config and tokens.json starting with an Open Source design system.
npx tz initSupported design systems:
- Adobe Spectrum
- Apple Human Interface Guidelines
- GitHub Primer
- IBM Carbon
- Figma Simple Design System
- Salesforce Lightning
- Shopify Polaris
- Radix
Have another one to add? Suggest it!
Build
Generate code from tokens.json based on plugins. Requires a config file.
npx tz buildBuild Flags
| Name | Description |
|---|---|
--watch | -w | Rebuild whenever any token changes are detected. |
--no-lint | Ignore any lint errors while building. |
Check
Validate all DTCG tokens for syntax errors, and run any linters you’ve enabled. Can optionally specify a [path] tokens are located at (by default, will look for the tokens defined in your config file).
npx tz check [filename]Format
Format tokens into the current DTCG standard. Note that a separate output is required. If you wish to overwrite your files dangerously, just specify the same file after -o.
tz format <input.json> -o normalized.json| Name | Description |
|---|---|
--out | -o | Tokens file to output. |
Import
Export Figma Variables and Styles to a resolver JSON. Requires a Figma account and auth token.
tz import https://figma.com/[file] -o my-ds.resolver.jsonGlobal Flags
Flags available for any command
| Name | Description |
|---|---|
--config | -c | Path to config (default: terrazzo.config.ts). |
--silent | Suppress warnings. |
--help | Show help message and exit. |
--version | Show version and exit. |