Dembrandt

io.github.dembrandt由 GitHub 账号 dembrandt 发布v0.39.2更新于 Nov 1, 2026

Design tokens from any live site: colours, type, spacing, components, drift against a baseline.

概览

AI 生成的概览

从线上网站提取设计系统(颜色、字体、间距、组件)并输出设计令牌,供助手分析、比对与导出。

可以做什么
  • 提取设计令牌、配色、字体、间距、表面、组件样式与品牌识别信息
  • 支持多页面或 sitemap 抓取,以及深色模式与移动端视口
  • 对提取结果做分析:与基线比对漂移、对比度与一致性检查、WCAG 检测
  • 导出为 W3C 设计令牌、面向 AI 代理的 DESIGN.md、报告或 Tailwind/shadcn 主题
  • 按 job id 跟踪提取任务并查询状态
适用场景
适合让助手读取某个网站的视觉体系并转成令牌、主题或设计文档,或检查某次部署的样式是否偏离已提交的基线。
运行要求
通过 npx 在本地以 stdio 运行,需要 Node.js 18+。由于借助 playwright-core 驱动 Chromium,必须先执行一次浏览器安装步骤,否则会报浏览器引擎不可用。需要能访问目标网站的网络。未声明任何凭据;如需访问登录后页面,可使用 cookie、cookie 文件、basic auth 或 header 选项。
安装前请注意
它会渲染并读取第三方网站,仅应用于条款允许自动访问的站点或自有站点;README 提醒不要复制第三方品牌与商标,并要求遵守 robots.txt 与速率限制。cookie、cookie 文件、basic auth 与 header 选项涉及会话密钥,保存的存储状态文件包含 cookie 与本地存储。传入账户密钥会把提取快照上传到厂商的云服务。反检测选项仅限获授权使用。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Dembrandt,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Dembrandt.

[npm version] [npm downloads] [license] [GitHub Marketplace] [GitHub Sponsors]

Extract any website's design system in one command. Enforce it in CI.

Logo, colors, typography, spacing, borders, shadows, motion, components. W3C design tokens in seconds.

[Dembrandt: Any website to design tokens]

Install

bash
npm install -g dembrandtdembrandt install-browser        # one-time: fetches the matching Chromiumdembrandt dembrandt.com

The browser step is required. dembrandt drives Chromium through playwright-core, which ships no browser binaries, so a fresh install has nothing to launch until you run it. Skipping it fails with browser engine not available.

Or use npx without installing: npx dembrandt dembrandt.com. The browser step applies here too: run npx dembrandt install-browser first. Browsers land in a shared Playwright cache, so either route only needs it once.

Requires Node.js 18+

Or install the MCP server straight into your editor and let the agent run it:

[Add to Cursor] [Install in VS Code]

What you get

  • Colors (semantic roles with the evidence behind each pick, curated palette, every detected colour, CSS variables, gradients)
  • Typography (fonts, sizes, weights, sources, font file URLs)
  • Spacing (margin/padding scales)
  • Borders (radius, widths, styles, colors)
  • Shadows
  • Motion (duration scale, easing curves, hover patterns per component type)
  • Components (buttons, badges, inputs, links)
  • Breakpoints
  • Icons & frameworks

Playwright renders the page, dembrandt reads computed styles from the DOM, analyzes color usage and confidence, groups similar typography, detects spacing patterns, and returns design tokens.

Flags

bash
dembrandt dembrandt.com --shadcn        # shadcn/ui theme, observed slots onlydembrandt dembrandt.com --dtcg          # W3C design tokens, for Style Dictionary or Tokens Studiodembrandt dembrandt.com --wcag          # WCAG 2.1 contrast on real DOM pairs

Default is formatted terminal output only. Every flag below; the detailed reference is docs/usage.md.

Export

FlagWhat you get
--dtcgW3C design tokens (DTCG)
--design-mdDESIGN.md for AI agents
--tailwind [path]Tailwind v4 @theme CSS
--shadcn [path]shadcn/ui theme, observed slots only
--html [path]Self-contained HTML report
--brand-guideBrand guide PDF
--json-onlyRaw JSON to stdout
--save-outputJSON to output/<domain>/
--screenshot <path>Viewport screenshot
--color-format <f>Colour notation: hex, rgb, oklch, lch, source
--raw-colorsPre-filter colours too

Analysis

FlagWhat you get
--wcagContrast grades on real DOM pairs
--compare <baseline>Drift gate; exits 1 when tokens moved
--tokens <file>Check rendered colours, radii and font sizes against a W3C Design Tokens file; repeat for several
--max-off-token <n>With --tokens: exit 1 when more than N rendered values match no token
--tokens-report <path>With --tokens: Markdown summary with the nearest token per off-token value, wiki-ready
--annotations <github|azure>CI annotations for drift and off-token values; detected from the runner by default
--approveAccept the current run as the new baseline
--aiML brand-primary prediction (experimental)

Coverage

FlagWhat you get
--crawl [n]Merge N pages, cross-page confidence
--sitemapDiscover pages from sitemap.xml
--dark-modeThe dark theme's tokens
--mobileMobile viewport
--slow3x timeouts for heavy sites
--browser <type>chromium or firefox; CDP via env
--no-sandboxFor Docker and CI

Access

FlagWhat you get
--cookie <string>Reach pages behind a session
--cookie-file <path>JSON cookies, Playwright storageState (incl. localStorage and the sessionStorage block --save-storage-state adds), or Netscape cookies.txt
--basic-auth <user:pass>HTTP Basic for the browser context
--loginOpen a visible browser to sign in; press Enter when ready, then extract (interactive terminal only)
--save-storage-state <path>With --login, save the signed-in session (cookies, localStorage, sessionStorage) to a file; reuse it later with --cookie-file, also in CI
--header <string>Any extra request header, repeat for several
--no-headed-fallbackNever open a visible browser on a failed navigation; for batch runs
--user-agent <string>Custom user agent
--locale <string>Locale for the fingerprint
--timezone <string>Timezone for the fingerprint
--accept-language <s>Accept-Language header
--screen-size <WxH>Reported screen resolution
--stealthAnti-detection; authorized use only
--key <string>Sync runs to your account

Catch design drift in CI

Extract a preview deployment, compare against a committed baseline, fail the job when tokens moved:

yaml
- uses: dembrandt/[email protected]  with:    url: https://preview.example.com    baseline: .dembrandt/baseline.json

The action is on the GitHub Marketplace and annotates the PR with the drifted tokens. On any other runner the gate is just an exit code plus JSON: dembrandt URL --compare baseline.json --json-only exits 1 on drift and prints per-token changes[]. See docs/ci.md for the Action inputs, the platform-neutral gate, and the exit code table.

Recipes

Copy a command, paste a prompt, get a result. Competitor benchmarking, WCAG audits, Figma token push, agentic design system builds. Filterable by role at dembrandt.com/recipes, with the basics in docs/recipes.md.

AI Agent Integration (MCP)

Use Dembrandt as a tool in Claude Code, Cursor, Windsurf, or any MCP-compatible client. Ask your agent to "extract the color palette from dembrandt.com" and it calls Dembrandt automatically.

[Add to Cursor] [Install in VS Code]

Per-client setup, environment variables and the full tool list: docs/mcp.md and dembrandt.com/mcp.

bash
claude mcp add --transport stdio dembrandt -- npx -y dembrandt mcp

The server is listed in the MCP Registry as io.github.dembrandt/dembrandt, so a client that reads the registry can install it by name.

Or add to your project's .mcp.json:

json
{  "mcpServers": {    "dembrandt": {      "command": "npx",      "args": ["-y", "dembrandt", "mcp"]    }  }}

Available tools include get_design_tokens, get_color_palette, get_typography, get_component_styles, get_surfaces, get_spacing, and get_brand_identity, plus pure analysis tools (compute_drift, get_findings, export_dtcg, generate_design_md, render_report) and job-control tools.

Extraction tools accept slow, mobile, darkMode, wcag, cookie, cookieFile, basicAuth and header (for authenticated pages), userAgent, and noSandbox (Docker and most CI containers). Interactive --login stays CLI-only. Set pages above 1 to crawl and merge several pages, which produces a markedly stronger token set than one page; paths names them explicitly and sitemap discovers them from sitemap.xml.

Extraction returns a job_id. Poll it with get_job_status, then hand that same id to the pure tools instead of passing the extraction back as an argument:

get_design_tokens(url: "example.com", pages: 5)  ->  job_idget_job_status(job_id)                           ->  tokensget_findings(job_id)                             ->  contrast and consistency issuesexport_dtcg(job_id)                              ->  W3C design tokens

Pair with dembrandt-skills to give your agent UX intelligence on top of extracted tokens: hierarchy, accessibility, interaction states, and a full 6-stage design pipeline orchestrator.

bash
npx skills add dembrandt/dembrandt-skills

Dembrandt App (Beta)

Load extractions, track token drift, and compare snapshots. dembrandt.com/app

  • Automatic drift tracking from CI. Generate an API key at dembrandt.com/app/api-keys, then pass --key to the CLI. Every run uploads a snapshot to your account and scores it against the previous one for that domain. Wire into GitHub Actions or any CI runner and every deploy records itself.
  • Pin a baseline. Mark any snapshot as your reference. Every subsequent extraction is automatically scored against it.
  • Visual diff. Color swatches, before/after values, delta scores per category: colors, typography, spacing, radius, shadows.
  • Snapshot timeline. Proportional timeline per domain, scrub across any date range from days to years.
  • Compare side by side. Load multiple extractions into one view: two releases, two sites, or two surfaces.
  • Copy tokens. Paste values straight into Copilot, Claude, or Cursor.
  • No login required for local use. Data stays in the browser. Sign in with GitHub to enable cloud sync.

Limitations

  • Dark mode requires --dark-mode flag (not automatically detected)
  • Hover and focus states come from real interaction on a sample of elements; states that need a pointer path or a timer are missed
  • Canvas/WebGL-rendered sites cannot be analyzed (no DOM to read)
  • JavaScript-heavy sites require hydration time (8s initial + 4s stabilization)
  • Some dynamically-loaded content may be missed
  • Default viewport is 1920x1080 (use --mobile for 390x844 mobile viewport)

Intended Use

Dembrandt reads publicly available CSS and computed styles from website DOMs for documentation, learning, and analysis of design systems you own or have permission to analyze.

Only run Dembrandt against sites whose Terms of Service permit automated access, or against your own properties. Do not use extracted material to reproduce third-party brand identities, logos, or trademarks. Respect robots.txt, rate limits, and copyright.

Dembrandt does not host, redistribute, or claim rights to any third-party brand assets.

Sponsors

The CLI is MIT-licensed and free. Sponsorship funds the enforcement layer: a committed project-level token baseline, --compare and the ingest API for CI/CD drift gates, and the App platform (snapshot history, team drift dashboard, alerts to Slack, Linear, and GitHub).

[GitHub Sponsors]

Documentation

  • docs/usage.md: every flag, multi-page extraction, browser selection, CDP, DTCG, DESIGN.md, Tailwind theme, WCAG, motion, brand guide PDF
  • docs/ci.md: GitHub Action, drift gate, exit codes
  • docs/mcp.md: MCP server install per client, environment, tools
  • docs/recipes.md: copy-paste workflows
  • docs/FLAGS.md: flag interactions, ignored combinations, multi-page propagation

Contributing

Bugs, weird sites, pull requests. All welcome.

Open an Issue or PR.

@thevangelist

MIT. Do whatever you want with it.

来源:README.md,提交 6f0255a

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.39.2最新Oct 11, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分