Tavero

io.github.baccaraaa由 GitHub 账号 baccaraaa 发布v0.7.0更新于 Nov 2, 2026

Finds UI drift in React apps (buttons, cards, colors, spacing) and gives your agent each fix

概览

AI 生成的概览

在真实浏览器中扫描运行中的 React 应用,找出按钮、卡片、颜色和间距的 UI 不一致,并把每处修复的文件、行号和应使用的 token 交给编码助手。

可以做什么
  • 在编写 UI 前读取精简的设计系统摘要,以及项目设计 token 及其来源位置
  • 按严重程度列出 UI 一致性问题,并展开单条问题查看分页证据:当前值、期望的 token 或组件、文件与行号、截图路径
  • 浏览 React 组件清单、查看单个组件,并获取展示其实际渲染效果的 PNG 截图绝对路径
  • 在手机、平板和桌面宽度下执行浏览器扫描(有深色主题时额外一次),可限定路由和规则
  • 对比最近两次扫描,查看新增、已解决和未变化的问题
适用场景
适合让助手在 Vite 或 Next 上的 React 19 应用中修改界面时,复用已有组件和 token 而不是自造样式,并在修复后重扫单个路由确认问题已解决。
运行要求
以 npm 包 tavero 通过 stdio 在本机运行,需要 Node 20 或更高版本,并通过 Playwright 安装 Chromium。需要一个以开发模式运行的 React 19 应用(Vite 或 Next)及可访问的开发服务器地址;若应用需要登录,需先执行一次登录命令。未声明账号、API 密钥或环境变量。
安装前请注意
扫描会在 Chromium 中打开应用,若提供登录信息则会用其登录,因此能看到应用渲染的全部内容。它只写入项目的 .tavero 目录,其中包括 decisions.json,README 建议将其提交到版本库。完整扫描需数分钟,卡片检测为启发式。README 称其完全本地运行、不向外发送数据。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

[Tavero]

Tavero

Keep the UI your agent writes consistent.
taveroui.com · Docs · Demo

[CI] [MIT license] [Node 20 or later] [React 19]

Tavero scans your running React app, finds drift in buttons, cards, colors and spacing, and gives your coding agent each fix with the file, the line and the token to use. It runs on your machine, as a CLI, an MCP server for Claude Code, Cursor, Codex and other agents, and a local panel where you decide what is intended.

[A Tavero finding on the Acme demo: 7 text button styles, each with its crop, component, file and line, and the canonical Button chosen in the panel]

A real finding from the Acme demo in this repository (demo/acme): six pages scanned at three widths.

How it works

  1. Scan. Tavero opens your dev server in Chromium at mobile, tablet and desktop widths, with your login if the app needs one. If the project styles a dark theme, it adds one dark pass.
  2. Attribute. Every visible element is mapped to the React component and the source line that rendered it, from React's own dev-mode data. Nothing is added to your project.
  3. Find. Four rules compare what renders with your tokens and with itself: buttons, cards, colors and scales.
  4. Fix. Each finding is a task: what, where (file:line), the current value, and the token or component expected. Your agent fixes it, rescans one route in seconds, and checks that the finding is resolved.

Quick start

Node 20 or later, a Vite or Next app on React 19 that runs in dev mode.

bash
npm i -D taveronpx playwright install chromium                      # once per machinenpx tavero login --url http://localhost:5173/login   # once, if the app has a loginnpx tavero scan --url http://localhost:5173npx tavero findings
id            sev     rule     decision  title                                                         evidencef_c75ac3d6a2  high    buttons            7 text button styles                                          7f_36cb934b5e  high    scales             13 distinct padding values, 1 declared                        12f_94269275c1  medium  buttons            Two text button styles differ only in radius, paddingY, pa…   2f_057122e1f9  medium  buttons            4 place(s) write <button> directly in page or section mark…   4… 30 more, use --page 2
bash
npx tavero finding f_ff30adc07c   # evidence: file:line, current value, expected token, cropsnpx tavero context                # a ~1,500-token brief of the design system for an agentnpx tavero report                 # a self-contained HTML report

Tavero writes only to <project>/.tavero/. Every read command takes --json, and text output is capped at 20 rows so it fits an agent's context.

Use it from your agent

tavero mcp is an MCP server on stdio with nine tools. Print the config for your client and paste it where it says:

bash
npx tavero mcp --print-config claude       # Claude Code: .mcp.jsonnpx tavero mcp --print-config cursor       # .cursor/mcp.jsonnpx tavero mcp --print-config codex        # .codex/config.tomlnpx tavero mcp --print-config gemini       # .gemini/settings.jsonnpx tavero mcp --print-config antigravity  # .agents/mcp_config.jsonnpx tavero mcp --print-config vscode       # .vscode/mcp.json (GitHub Copilot)npx tavero mcp --print-config windsurf     # ~/.codeium/windsurf/mcp_config.json

Then paste docs/AGENTS.snippet.md into AGENTS.md, CLAUDE.md or GEMINI.md, so the agent reads the design context before writing UI. SKILL.md is an Agent Skill with the full workflow.

A recorded run of Claude Code on the Acme demo, with no shell, 29 seconds:

› tavero_context  Action button is Button from src/components/Button.tsx (props: variant)› tavero_findings rule=colors  f_ff30adc07c  Color #4263eb is not a project token› tavero_finding f_ff30adc07c  src/app.css:33  literal #4263eb in source  expected  --acme-primary #3b5bdb (ΔE 3.5)  edit src/app.css:33  background: #4263eb → var(--acme-primary)› tavero_scan routes=/billing rules=colors› tavero_diff  resolved  f_ff30adc07c  Color #4263eb is not a project token  resolved  f_18862a0332  Hardcoded color #4263eb in 1 place(s)  new  0
ToolUse
tavero_contextdesign-system brief; call before writing UI
tavero_findings, tavero_findingproblems, worst first; one problem with evidence, the expected value and the exact rescan call
tavero_scanscan the app; after a fix, only the touched routes and rules. Streams progress, cancellable
tavero_diffresolved, new and unchanged findings since the previous scan
tavero_components, tavero_component, tavero_show, tavero_tokensinventory, crop paths, tokens

Rules

RuleReports
buttonsdistinct text and icon button styles with the components that render them, near-duplicate pairs, <button>s written outside button components
cards (preliminary)distinct card styles, near pairs, card-like containers built inline
colorscolors outside your tokens with the nearest token and ΔE, Tailwind default colors in a project with its own palette, near-identical pairs, hardcoded literals with file and line; in a dark theme, backgrounds that stay light, dark text on a dark page and dark-only colors without a token
scalesradius, padding, gap, font size, weight and shadow values off the scale your tokens declare

Decide what is intended

bash
npx tavero ui --open   # http://127.0.0.1:4747

[The Tavero panel: a list of findings and, for the button styles finding, every variant with its crop at three widths and a choice of the canonical one]

A local panel for the person behind the agent. Go through the findings with the keyboard and decide. The agent sees each decision on its next call, without a rescan.

DecisionWhat the agent sees
Fixthe finding comes first, marked as confirmed work
Intendedhidden until the finding gains new places
Canonicalon button and card variants: the reference variant and allowed ones, optionally named ("primary", "ghost"); the others get it as expected
Notea message delivered with the finding

Decisions are stored in .tavero/decisions.json, keyed by stable finding ids. Commit it to share them with your team and its agents. npx tavero ui --export ./panel writes a static, read-only copy of the panel.

Requirements and limits

  • React 19 in dev mode, on Vite or Next (App Router, Turbopack). React 18 keeps different debug data and is not supported yet.
  • Tokens are read from CSS custom properties and Tailwind 3 or 4 themes.
  • Card detection is heuristic, so the cards rule is marked preliminary.
  • Tavero runs locally and sends nothing anywhere. There is no account and no telemetry.

Development

bash
npm cinpx playwright install chromiumnpm test             # unit and Playwright runtime tests; starts the test apps itselfnpm run typechecknpm run build

The website lives in site/ (Next.js static export). npm run site:install && npm run site:dev runs it; npm run site:audit runs its gates: Tavero on the site itself with 0 high and medium findings, Lighthouse, axe and three widths.

src/  core/      scan orchestration, aggregates, query API, decisions, diff, stable ids  project/   framework detection  static/    tokens, Tailwind theme and palette, hardcoded colors, component index  runtime/   dev server, session, crawl, in-page collector, attribution, crops  rules/     signatures and the four rules  context/   the agent-facing brief  report/    HTML report  mcp/       MCP server, tools, client configs  ui/        local panel and static export  cli/       the command linedemo/acme/   a small dashboard with deliberate drift, used by tests and the websitetest/        unit and runtime tests with mini Vite and Next appsdesign/      design tokens shared by the panel and the websitesite/        the website

See CONTRIBUTING.md before opening a pull request.

License

MIT

来源:README.md,提交 1289724

工具

9

tavero_context

Design-system brief

Compact Markdown brief of this React app's design system: stack, tokens, the canonical button/icon-button/card components with files and props, dominant radius/spacing/typography, and open problems. Call it BEFORE writing or changing UI, then reuse the components and tokens it names instead of inventing styles.

输入参数budget

tavero_findings

List findings

UI consistency problems of the latest scan, worst first: distinct button and card styles, colors outside the tokens, Tailwind defaults, hardcoded literals, off-scale radius/spacing/typography. Each row has a stable id, severity, rule, title and evidence count; evidence is not included. Filter by rule or severity; paginate with limit/page. Open one with tavero_finding. A human may have triaged findings in the Tavero panel: `decision.status` fix means confirmed work (listed first), findings marked accepted are hidden, `decision.note` is a message to you.

输入参数pagerulelimitdecisionseverityincludeAccepted

tavero_finding

One finding with evidence

One finding with paged evidence rows: current value, `expected` (the project token or canonical component to use instead, or a note that no close token exists and one should be added), component, file:line, route/viewport and a crop image path. Rows valued "literal … in source" are where the value is written (often CSS); the other rows are where it renders (the component JSX). Fix the code using `expected`, then rescan only the affected routes with tavero_scan (routes + rules) and confirm with tavero_diff.

输入参数id必填evidencePageevidenceLimit

tavero_components

List components

React components seen in the latest scan with instance counts, pages and source file:line. Search by name or file with `query`; sort by instances (default) or name; `unresolved` lists components without a source file.

输入参数pagesortlimitqueryunresolved

tavero_component

Component details

One component by id or name: source file:line, prop names, instance count, which pages and viewports render it, and crop image paths.

输入参数idOrName必填

tavero_show

Crop image paths

Absolute paths of PNG crops showing how a component actually renders, optionally for one viewport. Open them with your image/file reader to see the component.

输入参数idOrName必填viewport

tavero_tokens

Design tokens

Design tokens found in the app (CSS custom properties and Tailwind theme): name, kind, raw and resolved value, source file:line. Use these names instead of literal colors and sizes.

输入参数kindpagelimit

tavero_diff

Diff two scans

Findings that are new, resolved or unchanged (with changed stats) between the previous and the latest scan, by stable id. A finding is fixed when it is listed under resolved. After a partial rescan, `note` says how many routes were not rescanned and may still carry the finding.

输入参数tofrom

tavero_scan

Scan the running app

Crawl the app in a real browser at mobile/tablet/desktop widths (plus one dark-theme pass at desktop width when the project styles a dark theme), map every element to its React component and file:line, and recompute findings. A full scan takes minutes; after a code fix pass only the affected `routes` and the finding's `rules` (seconds) — findings on other routes are carried over. Needs the dev server url (it is started with `npm run dev` if nothing answers and kept running for later scans). Then call tavero_diff.

输入参数url必填rulesroutesviewports

版本历史

3
  1. v0.7.0最新Oct 26, 2026
  2. v0.6.0Oct 25, 2026
  3. v0.5.1Oct 24, 2026

评分

已满足适用检查项的 90%

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

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

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

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分