
labsUI
io.github.kznlabs由 GitHub 帳號 kznlabs 發布v0.2.1更新於 Nov 7, 2026
Search, add, diff and update labsUI React components in your project.
概覽
讓編碼代理透過 stdio 在你的專案中搜尋、檢視、加入、比對與更新 labsUI React 元件。
- 可以做什麼
- 依名稱、匯出或意圖搜尋元件、區塊、hook、輔助工具與應用配方
- 檢視某個項目的確切 props、型別、範例、相依套件以及根布局掛載需求
- 把項目與其相依套件安裝到專案中,且不覆寫既有檔案
- 執行一次性初始化並回傳根布局程式碼
- 顯示目前版本到你已修改檔案的修補內容,並以三方合併方式更新項目
- 執行環境檢查,逐項回報問題並提供修正方式
- 適用情境
- 當代理正在建置或維護使用 labsUI 元件的 React 應用,且應遵循該函式庫的慣例、而非猜測 props 或手動複製程式碼時使用。
- 執行需求
- 以 stdio 在本機執行,通常透過 npx 加上 mcp 參數啟動。目標專案需要 React 19、Tailwind CSS v4 以及 tsconfig.json 中的路徑別名;CLI 需要 Node.js 22 或更新版本,或 Deno。不共用工作區的用戶端(例如 Claude Desktop)需要加上 --cwd 指向應用資料夾。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 labsUI,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
labsui
Add labsUI components to your project: clean React primitives with one smooth spring for every motion. Components are copied into your codebase, so you own and edit them.
Requires React 19, Tailwind CSS v4 and a path alias
("paths": { "@/*": ["./src/*"] } in tsconfig.json). The CLI runs on
Node.js 22 or newer, or Deno. It has no dependencies and works offline.
Usage
Any runner works: bunx @kznlabs/labsui add button, pnpm dlx @kznlabs/labsui …,
yarn dlx @kznlabs/labsui …, or from JSR with
deno run -A jsr:@kznlabs/labsui add button. npm dependencies install with
whatever package manager your lockfile shows.
The component registry ships inside the package: no network needed beyond
installing npm dependencies, and each labsui version installs the same
component code. npx @kznlabs/labsui@latest add … gets the newest components.
Global install
To type labsui instead of npx @kznlabs/labsui in every project:
A global install pins its components to that version, the same way the
registry ships inside each release. Update it when you want newer ones
(npm install -g @kznlabs/labsui@latest); npx @kznlabs/labsui@latest
always gets them.
Commands
init
- Writes
styles/labsui.css(tokens, accent presets, animations) and imports it right after@import "tailwindcss"in your stylesheet. - Adds
lib/utils,lib/themeandcomponents/motion-provider, and installsmotion,clsxandtailwind-merge. - Saves
labsui.jsonwith the registry URL, your alias and its folder. - Prints the lines your root layout needs (theme script,
MotionProvider).
Run it again any time: existing files are kept.
add
Resolves dependencies through the registry (data-table brings table,
checkbox, pagination, …), writes each file under your alias folder and
installs the npm packages it imports. Existing files are kept unless you pass
--overwrite; a kept dependency whose code differs from this version is
named, with the labsui update that brings it level, since the new item may
need it. If your alias isn't @/, imports are rewritten to match.
Components that live once in the root layout (toast, confirm) print the
line to add there. A mistyped name gets a suggestion: buton suggests button.
list and search
list shows everything: components, blocks, hooks (use-disclosure,
use-hotkey, …) and helpers (utils, theme, …). Hooks and helpers come
along with the components that import them; add one by name to use it on its
own.
search ranks by name first, then by what an item exports, then by its
description, and every word must match:
It also finds recipes: a prompt for a whole app (blog, docs, shop, comparison,
portfolio) that ran on a fresh app before it shipped, with the components it
used. labsui view shop prints one.
view
Everything you need before writing code with an item, without leaving the terminal:
- Exact props and types of each export, read from the component source.
- A usage line and the full examples from the docs.
- What it brings along and which npm packages it installs.
- What to mount in the root layout, if anything.
Imports in the examples use your alias. --source adds the files themselves.
For a recipe, view prints its prompt, its components and the patterns the
result needs.
update and diff
Components are yours to edit, so an update must not silently undo your
changes. labsui.json records which labsui version wrote each item, and
labsui update (or labsui update dialog) uses that version as the base:
- Files you never edited are replaced.
- Edited files are merged three ways: your changes and this version's changes both land.
- Where both changed the same lines, the file gets
<<<<<<< yours/>>>>>>> labsuimarkers andupdatelists it.labsui doctorfails until they are resolved. - New dependencies of updated items are added.
The base comes from JSR, which keeps every release's files. Offline, with a
hosted registry, or for items installed before versions were recorded,
edited files are left as they are. labsui diff lists installed items that
differ from this version and, from the same base, whose change each file
is: only labsUI's (update replaces it), only yours (update keeps it) or
both (update merges). It also marks files that differ only in blank lines
or indentation. labsui diff dialog prints the patch from this version's
file to yours, or says dialog isn't installed.
doctor
Checks the setup and prints a fix for each problem: React 19 and Tailwind v4,
the path alias and labsui.json, the stylesheet import, MotionProvider and
the theme script, <Toaster /> and <Confirmer /> mounted when installed,
missing npm packages, and files your installed components import but the
project lacks. It also lists installed items that differ from this version,
your edits or an older install. Exits with 1 when something is
broken, so it can run in CI.
It reads your code, not a framework's conventions: it works the same in any React app.
Coding agents
MCP server
labsui mcp serves the same commands to any agent that speaks the Model
Context Protocol, over stdio. Register it with your agent:
It works in the folder your agent shares as its workspace (MCP roots), or
the one it starts the server in. If your agent starts servers elsewhere and
shares no workspace, add "--cwd", "/path/to/app" after "mcp"; --cwd
always wins. Claude Desktop is one of those: it shares no workspace, so give
it --cwd. On Windows, Desktop starts npx through cmd:
Recipes are MCP prompts too (prompts/list), so a client that shows prompts
offers them by name.
On connect, the server also sends the labsUI coding rules (imports, tokens, motion, mounting), so the agent writes code the way the library expects. It runs in the folder the agent starts it in and writes only inside that project.
Without MCP
labsui rulesprints the same coding rules as Markdown. Append them to the file your agent reads:labsui rules >> AGENTS.md.--jsonon any command prints one JSON document on stdout; npm output goes to stderr. Errors are{ "error": "…" }with exit code 1.
Options
License
MIT. Every component is original, hand-made labsUI code.
來源:packages/cli/README.md,提交 e9ce1c5
工具
0版本歷史
6- v0.2.1最新Nov 7, 2026
- v0.2.0Nov 5, 2026
- v0.1.14Nov 4, 2026
- v0.1.13Nov 3, 2026
- v0.1.11Oct 30, 2026
- v0.1.6Oct 30, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分