
labsUI
io.github.kznlabsPublished by GitHub account kznlabsv0.2.1Updated Nov 7, 2026
Search, add, diff and update labsUI React components in your project.
Overview
Lets a coding agent search, inspect, add, diff and update labsUI React components directly in your project over stdio.
- What you can do
- Search components, blocks, hooks, helpers and app recipes by name, export or intent
- View exact props, types, examples, dependencies and root-layout mounting needs for an item
- Install items and their dependencies into the project without overwriting existing files
- Run one-time setup and return the root layout code
- Show patches from the current version to your edited files, and update items with three-way merges
- Run setup checks that report each problem with a fix
- When to use it
- Use it when an agent is building or maintaining a React app that uses labsUI components and should follow the library's conventions instead of guessing props or copying code by hand.
- Requirements
- Runs locally over stdio, typically via npx with the mcp argument. The target project needs React 19, Tailwind CSS v4 and a path alias in tsconfig.json; the CLI needs Node.js 22 or newer or Deno. Agents that share no workspace, such as Claude Desktop, need the --cwd option pointing at the app folder.
Installation
In SourceWeft
- Open labsUI in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
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.
Source: packages/cli/README.md at commit e9ce1c5
Tools
0Version history
6- v0.2.1LatestNov 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
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts