
Font Lab
io.github.jmg698由 GitHub 账号 jmg698 发布v1.0.0更新于 Oct 24, 2026
A decision surface for typography: curate font directions on your real site, ship next/font code.
概览
Font Lab 让助手策划字体搭配、在你的真实网站上预览,并为选中的方案生成可回滚的 next/font 或 @font-face 代码。
- 可以做什么
- 分析项目技术栈,给出适用的预览与自动落地路径
- 组合精选字体方向(标题、正文、等宽)并附理由,拒绝千篇一律的 AI 默认字体
- 在真实页面上预览:Next.js 用站内实时面板,其他框架用无头截图或可离线打开的样张页
- 就地修改页面文案并显示改动清单
- 把选定方向落地为 next/font 加 Tailwind 或自托管 @font-face 代码,支持撤销,并在收尾时移除开发脚手架
- 适用场景
- 适合 AI 生成的网站落入 Inter、Geist 等默认字体、你想在自己的页面上比较真实替代方案后再定稿的情况。也可在挑选排版的同时顺手打磨页面文案。
- 运行要求
- 以 npm 包形式在本地通过 stdio 运行(npx font-lab install),仅支持桌面端。需要项目存在 CSS 接入点;截图模式需要开发服务器,工具可自行启动并绑定 127.0.0.1。未声明账号、密钥或环境变量。
安装
在 SourceWeft 中
- 打开 控制台中的 Font Lab,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Font Lab
[npm version] [npm provenance] [license: MIT]
Pick the fonts. Fix the words. Your agent does the work.
[Font Lab — flipping font directions live on a real running site]
Font Lab is a real-time typography and text editor for AI-built sites. Your agent installs it, composes curated font directions Google fonts and distinctive open-foundry faces, and renders them live on your real site. You can toggle between the fonts and pick the one you like. The agent then finishes it up— next/font + Tailwind on Next.js, self-hosted @font-face everywhere else — reversibly.
Most AI-built sites ends up with generic fonts, like Inter or Geist, because the agent just uses defaults. Font Lab brings the human choose from options the agents curates based on some intake questions. It also allows you to edit text to make it sound like you wrote it.
copy-able prompt here: https://www.jack-mcgovern.com/fontlab
Install
Inside your project — use this prompt:
Works with: Claude Code · Cursor · VS Code · Codex · Windsurf · Gemini CLI For: any framework with a CSS seam — Next.js gets the full live-panel experience; everything else ships through the same engine (see the matrix below).
Install auto-detects which agents you have and wires them all — skill, MCP server, config, each in the right format. On a stack with no seam at all, Font Lab refuses to half-apply and hands you the generated code with a clear reason instead.
Newly registered MCP tools load on the next session reload — but the agent never has to wait: every tool also runs as a one-shot CLI, npx font-lab run <tool> '<json-args>' (same tool table, same JSON out), so the loop starts the moment install finishes. That's also the fallback whenever an MCP server drops mid-session.
Frameworks — what ships where
The taste engine, shippability gate, portable preview, and screenshots work on every stack. What varies is the preview surface and how the pick lands in your code — font-lab analyze prints the exact verdict for your project:
Every auto-ship path is fenced, idempotent, and reversible (font-lab undo). Agents: read capabilities + shipNote from font_lab_analyze — a non-Next stack is a different route through the same loop, never a reason to stop.
Upgrading
Always use upgrade, not bare npm install.
Font Lab lives in two places: the npm package and the panel code stamped into your project (app/_fontlab/). A bare npm install font-lab@latest updates the package but leaves the panel on the old version — which shows a "stale version" warning. upgrade moves everything together in one command: package, panel re-stamp, MCP re-pin, and stale-endpoint shutdown.
How it works
- Ask. Font Lab asks what you're going for — what feeling, how bold a departure, a brand to evoke or avoid — so the directions are tailored to you, not a generic default.
- Compose. Your agent composes a small set of font directions (display + body + mono, each with a rationale), reaching past the overexposed AI defaults. A built-in anti-generic rubric rejects menus that are all Inter/Geist/Space Grotesk.
- Pick. You compare them on your own site — screenshots in chat (works on web or phone) or a live flip/mix/compare panel locally. You always make the pick.
- Ship. The agent writes the real code for your stack —
next/font+ Tailwind on Next.js; self-hosted@font-facewired through Tailwind's theme, v3 utilities, or your own CSS font variables elsewhere. Every change is reversible. - Finish clean. Click done ✓ (or say so) and the agent runs
font_lab_finish: the dev-panel scaffolding comes out, and you get a git-verified commit plan — your copy edits and font change with ready-to-run commands, nothing of Font Lab's mixed in. The scaffolding and state are self-ignoring in git the whole session, sogit statuswas never noisy to begin with.
The panel
The Font Lab panel sits on top of your running site — your real pages, your real content — and lets you change fonts and words in real time.
- Flip through directions with arrow keys — see each pairing on your actual content across multiple routes
- Mix roles — heading from one direction, body from another — and save the mix as its own direction
- Before/after — hold
Bto peek at your current fonts; tapspaceto snap between your two finalists - Inspect — hover any text to see its role, typeface, size, and how many elements share it
- Edit words — double-click any text, retype it, and it saves straight to your source files
- Change receipts — see exactly what changed across the page after every edit
- Undo everything — every modification ships with a reversal command
- Done ✓ — one click ends the session cleanly: your agent strips the dev tooling and hands you the exact commit plan
The panel runs headless too: the agent screenshots your site in each direction and shows you the images in chat — a chat-sized hero shot per direction, with the full-page capture behind it. Works on a phone, on the web, anywhere your agent runs.
The live panel is Next-only — but the real-site preview isn't. On every other framework, Font Lab paints your actual running pages in each direction (the same render-first census machinery the panel flips with, injected headlessly — no scaffolding, no source writes; preview fonts cache in self-ignored state, so your git status stays clean until you actually ship). If no dev server is running, the screenshot tool starts your project's own dev command itself — bound to 127.0.0.1, health-checked, stopped after the capture — which is what makes the loop work unattended in cloud/container agents (Claude Code on the web, and friends) where the human can't reach the agent's localhost. With no dev server possible at all, the fallback is the portable preview: a self-contained HTML specimen sheet (fonts embedded, opens offline) on your own palette and copy — clearly labeled as specimen cards, never passed off as your pages.
Honesty
Font Lab's core promise is preview == ship: what you see in the panel is what the codegen writes.
- Guaranteed fidelity for every font the gate admits — or an honest "may render slightly differently" badge when it can't be byte-for-byte.
- Auto-ships only where the stack has a real seam; anywhere else it hands you the generated code with a clear reason rather than guessing. Never a half-applied change — that's the contract.
- Text sourced externally triggers an explicit notice, never a silent edit.
- The human's pick overrides everything.
Contributing & testing
Testers are the point — especially "it did the wrong thing on my repo" reports. The analyzer output is the most useful thing you can include.
- Issue forms — bugs and "support my stack" requests
CONTRIBUTING.md— code contributions and how to run the testsSECURITY.md— security issues
Going deeper
cli/README.md— the full user guide: install flags, the agent loop, every keyboard shortcut, the CLI referencedocs/CONCEPT.md— the vision and the core beliefdocs/ARCHITECTURE.md— how the choosing moment works and theselection.jsoncontractdocs/SHIP-SPEC.md— how a pick becomes real, reversible codedocs/PRODUCT.md·docs/PANEL-VISION.md— product and brand context
Open source · MIT · Published with npm provenance — every release is traceable to this repo and commit. Built and dogfooded on jack-mcgovern.com.
来源:README.md,提交 53066a5
工具
0版本历史
1- v1.0.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分