This repo is the ui8kit npm package: a shadcn-style CLI that installs registry JSON into app source trees.
Before changing consumer add / paths / utils behavior, read .project/ — especially:
- .project/status.md — what is published
- .project/known-issues.md — P0 bugs (utils exclude, paths+target)
- .project/architecture.md — data flow
- .project/refactor-backlog.md — deferred brainstorm (do not drive-by unless asked)
- .project/anti-overengineering.md — primitives wall vs shadcn-plain rest
- TypeScript ESM, Node
>=20 - Runtime deps:
commander,prompts,zodonly - Build:
tsup→dist/; tests: Vitest 4 - Package name:
ui8kit(binui8kit)
| Action | Command |
|---|---|
| Install | npm install |
| Typecheck | npm run type-check |
| Test | npm test |
| Build | npm run build |
| Pack dry-run | npm run pack:check |
Run typecheck + test + build before declaring CLI changes done.
| Path | What |
|---|---|
src/commands/ |
init, add, list, diff, scan, build, … |
src/registry/ |
fetch, schemas, build schema |
src/utils/paths.ts |
install path resolution (target vs paths) |
src/utils/runtime-files.ts |
--runtime file filter (primitives) |
src/utils/transform.ts |
@/ import rewrite only (not relative ../../utils) |
docs/ |
English user docs |
.project/ |
Maintainer / agent SoT for status & refactor |
| Repo / path | Role |
|---|---|
@ui8kit/registry (e:\_@Bun\@ui8kit-registry) |
Published digest /r — CDN source of truth for bricks + utils |
ui8kit-codegen |
Primitive SoT (generated/ui, generated/utils) |
@TestApp |
Consumer smoke (Vite/Svelte/Bun) |
CDN:
https://unpkg.com/@ui8kit/registry@2.0.0/r/index.json
https://unpkg.com/@ui8kit/registry@2.0.0/r/utils/utils.json
https://unpkg.com/@ui8kit/registry@2.0.0/r/components/ui/<name>.json
Until the utils/add bug is fixed (ADD_EXCLUDED_COMPONENT_TYPES in src/commands/add.ts):
initwithout--skip-coreso utils install viainstallCoreFiles- Pin
registryUrltohttps://unpkg.com/@ui8kit/registry@2.0.0/r+strictCdn/runtime - Keep
utilsat{dir}/utils(bricks use../../utils) add <bricks> --runtime <stack> --forcebun add clsx tailwind-merge(or npm) if not pulled- Verify
src/utils/cn.tsexists before wiring UI imports
If --skip-core was used or utils missing: fetch r/utils/utils.json and write each files[].content to {dir}/{files[].target} (see README “Manual utils fallback”).
Do not set paths.utils to kit/utils without import rewrite. Optional kit layout: move components/ui → kit after add; leave utils where they are. In 2.0.1, paths.ui is ignored when registry target is set.
Full recipe: README.md — New app.
- Primitives wall: multi-runtime file filter is for
registry:ui(+ shared assets). Do not invent the same heuristics for future blocks/widgets — publish those single-stack. - Contract additive: prefer patch fixes (
2.0.2) over breakingcontractVersionunless brainstorm says otherwise. - No restore of heavy deps (TypeScript-as-runtime, chalk/ora/fs-extra/glob, AST utility-map) without an explicit decision.
- Secrets: none in this repo; never commit tokens.
- Refactor pause: as of 2026-08-11, consumer P0 fixes are documented but deferred to the next brainstorm unless the user explicitly asks to implement them.
npm test+npm run type-check+npm run buildgreen- Docs/README/CHANGELOG updated if behavior changed
- If touching
add/ paths / utils: note impact in.project/known-issues.mdor mark issue fixed - Prefer a small fixture or TestApp check: utils on disk + one brick for chosen
--runtime