# designlang: 17 Design Token Files From One CLI Command

> A new npx CLI scrapes your live site's DOM and outputs DTCG tokens, a Tailwind config, and a shadcn theme in one run. Here's what the scraping approach catches, and misses.

Source: https://waalee.ai/blog/designlang-design-extract-cli-dom-scraping-cap-gap
Published: 2026-12-01 · 4 min read · By The WAALEE Team
Topics: design tokens CLI, design-extract npm package, designlang review, DOM scraping design tokens, W3C design tokens from website, AI-ready design tokens

A new npm package called designlang, open-sourced as [design-extract](https://github.com/manavarya09/design-extract) on GitHub, landed this month with a big promise: run one command against a live URL and get back 17-plus design artifacts, from W3C token JSON to a shadcn theme to a prompt pack for Cursor. It's a genuinely ambitious tool, and it's open source, which is rare in this space. But how it gets those tokens matters just as much as how many formats it spits out, and that's worth looking at closely before you point it at your own site.

## What it actually does

Run `npx designlang <url>` and the tool opens your site in headless Chromium through Playwright, walks the rendered DOM, and reads computed styles off up to 5,000 elements. From that single pass it generates DTCG design tokens, a Tailwind config, a shadcn/ui globals.css, Figma Variables JSON, motion tokens with spring detection, typed React stubs, and paste-ready prompt packs for v0, Lovable, and Cursor. There's also an MCP server, a Claude Code plugin with slash commands like /extract and /grade, and a GitHub Action for drift checks.

- One CLI run produces output in more than a dozen formats at once, with no manual conversion between them.
- A Figma plugin can take the same extracted data and build Variables, going code-to-design instead of the usual design-to-code direction.
- The project ships agent rule files for Cursor and Claude Code, so an editor's assistant inherits the extracted tokens automatically.

## The catch is in how it reads the site

Every one of those 17 files comes from one source: the DOM, as rendered the moment the headless browser loads the page. That's a real constraint. The default run only sees whatever state the page is in on load, and elements past the first 5,000 in document order, so a large app can simply run out before it reaches a buried footer or a modal. Responsive breakpoints, hover and focus states, dark mode, and interaction-driven styling are all opt-in flags, not the default, which means a first-pass extraction can look complete and still be missing half the system's real behavior.

- --depth, --responsive, --interactions, and --deep-interact all have to be added by hand to capture more than the resting, light-mode, desktop view.
- Pages behind a login need cookies or headers passed in manually before the crawler can even see them.
- Smart classification of tokens needs an external API key for Atlas Cloud, OpenAI, or Anthropic, so the 'free' extraction and the 'smart' extraction aren't the same run.

## Code and Figma are outputs here, not sources

It's worth being precise about direction, since the naming can blur it. design-extract treats your live, rendered site as the only real input. Figma is something it writes to, through a plugin that takes a URL and builds Variables, not something it reads from. Code is also an output target: apply writes tokens into a project, and lint and drift compare your existing token files back against the live site to catch mismatches. If your actual source of truth lives in a Figma file nobody's bothered to publish as a URL, or in a staging environment the crawler can't reach, none of the 17 output formats will know about it.

## What this means before you hand the output to an agent

None of this makes design-extract a bad tool. The breadth of its output is genuinely useful once a live URL is the right source, and the open-source MCP server means an agent can call it directly instead of you running the CLI and copying results around by hand. But 'one command, 17 files' quietly depends on the crawl being thorough enough to catch your real brand, not just whatever the DOM looked like on a clean, logged-out, desktop load of the homepage.

Three ways to get tokens out of a live site and into an agent's hands:

- [designlang / design-extract](https://github.com/manavarya09/design-extract): Open-source CLI that scrapes a live URL's DOM in headless Chromium and ships 17+ output formats at once. Thorough, but the default run only sees a clean, resting, desktop load, capped at 5,000 elements.
- [Figma's AI design token generator](https://www.figma.com/solutions/ai-design-token-generator/): Figma's own push to position Variables and token export as the AI-ready layer. Strong if your source of truth already lives in a maintained Figma file; no help if it doesn't.
- [WAALEE](https://waalee.ai/): Reads your actual live, rendered website and extracts real colors, type, and spacing as W3C design tokens, built specifically to hand to Claude, Lovable, v0, Cursor, and Bolt.

The honest takeaway isn't 'pick one.' It's that extraction quality depends entirely on what a tool actually looks at, for how long, and in what state. A 17-file export from a single clean page load isn't the same as a system that's been checked across breakpoints, interaction states, and dark mode. Check which one you're actually getting before you hand the output to an agent and call it your brand.
