| [ Web Proxy ] |
| Viewing: https://primitree.com | [Back] [Original] |
v1.0.0-next.1DocsPlaygroundlightdarkMenuDocsPlaygroundSearchPrimitree checks each change to a token source against the layer and ownership rules in your config, shows the components the change reaches, and builds files when the graph passes.
$ npm install -D primitree@nextcopy$ primitree check
graph resolved 15 tokens 3 layers
policy passed 0 findings
$ primitree build
wrote dtcg css tailwind typescript
$ primitree check --source brand # proposal: currentProposalsemantic.color.bg.brand references primitives.color.blue.500 and feeds component.button.bg, component.focus.ring, component.nav.active.bg. The check passes with zero findings.
Each verdict, consumer list, and count comes from @primitree/core at this site's build time, through the same functions the CLI calls.
Before
A rename lands in tokens.json. Someone scans the PR, approves, and finds out in production which components it reached.
what it reaches: unknown
tokens.json pull request
After
The same rename arrives as five changes with three named consumers. A reference left pointing at the old name blocks the build before merge.
what it reaches: 3 components, named
primitree diff same change
Change review
primitree diff reads two revisions of a source through the graph and pairs each change with the components that reference it. One rename shows up as five changes.
Read the diff commandDiff report brand source
Quickstart
No service and no account. A config file next to your tokens, one command locally or in CI.
Step 01 Install
$ npm install -D primitree@next
+ primitree@1.0.0-next.1Step 02 Describe your layers
// primitree.config.ts
layers: [
{ id: 'primitives', roots: ['primitives'], values: 'literal' },
{ id: 'semantic', roots: ['semantic'], values: 'reference', references: ['primitives'] },
{ id: 'component', roots: ['component'], values: 'reference', references: ['semantic'] }
]Step 03 Check and build
$ primitree check --source brand
policy passed 0 findings
$ primitree build --source brand
wrote dtcg css tailwind tsStandardDTCG Format Module 2025.10 output. Resolver contexts in tokens.resolver.json. Extensions under $extensions["com.primitree"].
OutputsDTCG CSS Tailwind TypeScript, from one resolved graph.
SourcesLocal DTCG files Figma variables export Variables REST API.
Point primitree at a tokens.json, write three layer rules, and read the first report.
| Web Proxy Viewer | New URL | Original Page |