Output to code

Compile your tokens into code formats, then get them into your codebase — by download or by the CLI.

W3C Design Tokens (JSON)

Follows the Design Tokens Format Module (2025.10) spec. Types are determined automatically from scopes.

Scopes determine $type — spacing → dimension, color → color
W3C Design Tokens (JSON) Follows the Design Tokens Format Module (2025.10) spec.

W3C behaviors: Shared $type is hoisted to group level. References become alias syntax "{path.to.token}". With modes, output is keyed by mode name.

CSS Custom Properties

Generates :root custom properties. Token paths become --kebab-case variable names, numeric dimensions convert from px to rem.

Basic Output

spacing.base → --spacing-base: 0.5rem

Basic Output Generates :root custom properties. Token paths become --kebab-case variable names.

Modes in CSS

Different mode types produce different CSS mechanisms — media queries, attribute selectors, or clamp() functions.

Modes in CSS Different mode types produce different CSS mechanisms.

Media Queries

colorScheme → prefers-color-scheme
contrast → prefers-contrast
motion → prefers-reduced-motion
breakpoints → min-width

Selectors & Functions

breakpoints(fluid) → clamp()
theme → [data-theme="..."]
direction → [dir="..."]
container → @container

Typography classes

Composite typography tokens can also export as ready-to-use CSS classes. Pick a strategy in the editor's Output options — the HTML is the same either way: one class per element.

Whatever the strategy, an element gets exactly one class — like heading-small-heavy — and every export opens with a generated usage comment showing the class grammar for your tokens, e.g. heading-{small|large}-{normal|heavy}. Only the shape of the CSS file changes:

Flat — one class per token

Every class is self-contained. Easiest to read, debug, and delete — at the cost of repeating shared values.

.heading-small-heavy {
  font-family: var(--heading-font-family);
  font-size: var(--heading-font-size-small);
  font-weight: var(--heading-font-weight-heavy);
}
/* …one block per combination */

Factored — attribute matching

Everything declared once; rules match parts of the class name. The smallest file, and it stays compact as the system grows.

[class*="heading"] {
  font-family: var(--heading-font-family);
}

[class*="heading"][class*="-heavy"] {
  font-weight: var(--heading-font-weight-heavy);
}

[class*="heading-small"] {
  font-size: var(--heading-font-size-small);
}

Factored — exact class lists

Shared rules list the full class names — no substring matching anywhere. The safest selectors; the lists grow with the system.

.heading-small-heavy,
.heading-large-heavy {
  font-weight: var(--heading-font-weight-heavy);
}

Choosing: start with Flat if you value readable CSS; switch to a Factored strategy when repetition bothers you. Shared rules only ever group tokens whose values are provably identical — add a token tomorrow and it joins the rules it genuinely matches. Classes export is a Plus/Pro feature, set in Output options or as classes: in the export settings sheet.

Type & Scope Mapping

Scopes determine the W3C output type. The same scopes also drive Figma variable types — see Output to Figma.

Scopes add semantic meaning — padding, fontSize, colorBackground
Type & Scope Mapping Scopes determine the output type.

Dimensions

spacing, fontSize, width, height, radius → dimension

Colors

color, fill, stroke, background → color

Typography

fontWeight → fontWeight
fontFamily → fontFamily
duration → duration

Special

lineHeight < 5 → number
lineHeight ≥ 5 → dimension

Download

Grab a zip straight from the editor.

In the editor's Output view, pick a format and hit Download — you get a zip with the generated files. Best for a one-off, or when you just want to copy something across by hand.

Sync with the CLI

Pull tokens straight into your repo — and update them anytime with one command. Free, nothing to install.

Quick start

Two steps — then it guides you the rest of the way.

  1. Create an API key on your account page.
  2. Log in — it takes it from there:
    npx systematically login
    Paste your key and it walks you through picking a project, a file, and where the code should land — then pulls it straight in. From then on, npx systematically pull updates your tokens anytime.

Commands

Run any of these as npx systematically <command>. Bare commands act on the current codebase.

login [--global]
Connect with your API key. Saved to this codebase by default (and auto-added to .gitignore); --global saves it once for your whole machine. On a codebase that isn't set up yet, login hands straight off into browse.
browse
Wander your projects and files, preview a file's generated output, and sync one into this codebase. Step back or exit at any point — nothing is written until you choose Sync.
pull [-y]
Update everything set up here. Shows the full line-by-line diff and asks before writing; -y (or a non-interactive shell, like CI) skips the prompt.
diff
Preview the exact changes the next pull would make — line by line — without writing anything.
status
Show what this codebase is connected to, and whether each destination is up to date or has changes waiting.
logout [--global]
Remove the saved key for this codebase, or --global for the machine-wide one.

Formats & plans: CSS & W3C JSON are free on every plan; JS/TS & Tailwind are part of Pro. You choose formats and their destinations when you sync — change them anytime by running browse again.

The config file

Setup lives in systematically.config.json — commit it, it holds no secrets.

{
  "version": 1,
  "tokens": {
    "project": { "id": "…", "name": "My project" },
    "file":    { "id": "…", "name": "typography-101" },
    "pull":    { "css": "src/styles" }
  }
}

It records which file you sync and where each format lands. Your API key is not in here — it lives separately in .systematically/, which the CLI adds to your .gitignore. So commit the config (your team shares the setup); the key never leaves your machine.

It only ever touches its own files. The CLI tracks every file it writes and updates or removes only those — it never overwrites or deletes files you authored. Change a format or destination and the next pull tidies up the files it previously created, nothing else.

Use in CI

No browser, no prompts — pull on every build.

Set your key as an environment variable and run pull. With no interactive terminal it skips the confirm automatically, so it never hangs a pipeline:

SYSTEMATICALLY_TOKEN=sys_… npx systematically pull

Commit systematically.config.json so CI knows what to pull; the token comes from your CI secrets, never the repo.

See also: Output to Figma — sync tokens into Figma variables.