quiver-cli 0.8.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/README.md +110 -45
  2. package/bin/quiver-cli.mjs +3 -1
  3. package/dist/cli.js +546 -458
  4. package/package.json +2 -2
  5. package/template/.agents/AGENTS.md +4 -3
  6. package/template/.agents/config.json +7 -0
  7. package/template/.agents/plugins/opencode/rtk.ts +34 -0
  8. package/template/.agents/skills/agent-browser/SKILL.md +1 -0
  9. package/template/.agents/skills/apps/skybridge/SKILL.md +4 -0
  10. package/template/.agents/skills/design/impeccable/SKILL.md +36 -118
  11. package/template/.agents/skills/design/impeccable/reference/adapt.md +1 -0
  12. package/template/.agents/skills/design/impeccable/reference/adapt.native.md +58 -0
  13. package/template/.agents/skills/design/impeccable/reference/android.md +40 -0
  14. package/template/.agents/skills/design/impeccable/reference/animate.md +73 -188
  15. package/template/.agents/skills/design/impeccable/reference/audit.md +12 -9
  16. package/template/.agents/skills/design/impeccable/reference/audit.native.md +139 -0
  17. package/template/.agents/skills/design/impeccable/reference/bolder.md +19 -101
  18. package/template/.agents/skills/design/impeccable/reference/clarify.md +59 -253
  19. package/template/.agents/skills/design/impeccable/reference/colorize.md +51 -222
  20. package/template/.agents/skills/design/impeccable/reference/craft-floor.md +42 -0
  21. package/template/.agents/skills/design/impeccable/reference/craft.md +3 -121
  22. package/template/.agents/skills/design/impeccable/reference/critique.md +44 -23
  23. package/template/.agents/skills/design/impeccable/reference/degraded/asset-producer.md +90 -0
  24. package/template/.agents/skills/design/impeccable/reference/degraded/documenter.md +24 -0
  25. package/template/.agents/skills/design/impeccable/reference/degraded/finish-reviewer.md +37 -0
  26. package/template/.agents/skills/design/impeccable/reference/degraded/manual-edit-applier.md +92 -0
  27. package/template/.agents/skills/design/impeccable/reference/delight.md +47 -279
  28. package/template/.agents/skills/design/impeccable/reference/distill.md +2 -2
  29. package/template/.agents/skills/design/impeccable/reference/doctor.md +53 -0
  30. package/template/.agents/skills/design/impeccable/reference/document.md +60 -73
  31. package/template/.agents/skills/design/impeccable/reference/harden.md +1 -12
  32. package/template/.agents/skills/design/impeccable/reference/hooks.md +20 -5
  33. package/template/.agents/skills/design/impeccable/reference/init.md +72 -119
  34. package/template/.agents/skills/design/impeccable/reference/ios.md +45 -0
  35. package/template/.agents/skills/design/impeccable/reference/layout.md +54 -131
  36. package/template/.agents/skills/design/impeccable/reference/live-setup.md +102 -0
  37. package/template/.agents/skills/design/impeccable/reference/live.md +116 -511
  38. package/template/.agents/skills/design/impeccable/reference/new-work.md +105 -0
  39. package/template/.agents/skills/design/impeccable/reference/{product.md → operate.md} +6 -5
  40. package/template/.agents/skills/design/impeccable/reference/optimize.md +4 -4
  41. package/template/.agents/skills/design/impeccable/reference/overdrive.md +1 -4
  42. package/template/.agents/skills/design/impeccable/reference/polish.md +68 -212
  43. package/template/.agents/skills/design/impeccable/reference/quieter.md +3 -3
  44. package/template/.agents/skills/design/impeccable/reference/routing.md +18 -0
  45. package/template/.agents/skills/design/impeccable/reference/shape.md +38 -144
  46. package/template/.agents/skills/design/impeccable/reference/typeset.md +51 -250
  47. package/template/.agents/skills/design/impeccable/reference/visualize.md +47 -0
  48. package/template/.agents/skills/design/impeccable/scripts/command-metadata.json +1 -1
  49. package/template/.agents/skills/design/impeccable/scripts/concept-seed.mjs +558 -0
  50. package/template/.agents/skills/design/impeccable/scripts/context-signals.mjs +119 -10
  51. package/template/.agents/skills/design/impeccable/scripts/context.mjs +534 -45
  52. package/template/.agents/skills/design/impeccable/scripts/critique-storage.mjs +18 -47
  53. package/template/.agents/skills/design/impeccable/scripts/detector/browser/injected/index.mjs +96 -10
  54. package/template/.agents/skills/design/impeccable/scripts/detector/cli/main.mjs +174 -26
  55. package/template/.agents/skills/design/impeccable/scripts/detector/design-system.mjs +233 -0
  56. package/template/.agents/skills/design/impeccable/scripts/detector/detect-antipatterns-browser.js +3348 -203
  57. package/template/.agents/skills/design/impeccable/scripts/detector/engines/browser/detect-url.mjs +102 -7
  58. package/template/.agents/skills/design/impeccable/scripts/detector/engines/regex/detect-text.mjs +297 -97
  59. package/template/.agents/skills/design/impeccable/scripts/detector/engines/static-html/css-cascade.mjs +187 -16
  60. package/template/.agents/skills/design/impeccable/scripts/detector/engines/static-html/detect-html.mjs +41 -11
  61. package/template/.agents/skills/design/impeccable/scripts/detector/findings.mjs +7 -1
  62. package/template/.agents/skills/design/impeccable/scripts/detector/node/file-system.mjs +16 -2
  63. package/template/.agents/skills/design/impeccable/scripts/detector/registry/antipatterns.mjs +207 -38
  64. package/template/.agents/skills/design/impeccable/scripts/detector/rules/checks.mjs +3082 -173
  65. package/template/.agents/skills/design/impeccable/scripts/detector/shared/constants.mjs +11 -0
  66. package/template/.agents/skills/design/impeccable/scripts/detector/shared/fonts.mjs +30 -0
  67. package/template/.agents/skills/design/impeccable/scripts/doctor.mjs +336 -0
  68. package/template/.agents/skills/design/impeccable/scripts/embed-prompt.mjs +133 -0
  69. package/template/.agents/skills/design/impeccable/scripts/generate-image.mjs +240 -0
  70. package/template/.agents/skills/design/impeccable/scripts/hook-admin.mjs +98 -18
  71. package/template/.agents/skills/design/impeccable/scripts/hook-before-edit.mjs +46 -6
  72. package/template/.agents/skills/design/impeccable/scripts/hook-lib.mjs +518 -50
  73. package/template/.agents/skills/design/impeccable/scripts/hook.mjs +25 -8
  74. package/template/.agents/skills/design/impeccable/scripts/lib/artifact-schema.mjs +93 -0
  75. package/template/.agents/skills/design/impeccable/scripts/lib/composition-catalog.mjs +200 -0
  76. package/template/.agents/skills/design/impeccable/scripts/lib/concept-catalog.mjs +357 -0
  77. package/template/.agents/skills/design/impeccable/scripts/lib/impeccable-config.mjs +27 -7
  78. package/template/.agents/skills/design/impeccable/scripts/lib/impeccable-paths.mjs +17 -8
  79. package/template/.agents/skills/design/impeccable/scripts/lib/provider.mjs +5 -0
  80. package/template/.agents/skills/design/impeccable/scripts/lib/roll-selection.mjs +362 -0
  81. package/template/.agents/skills/design/impeccable/scripts/lib/staleness-deep.mjs +457 -0
  82. package/template/.agents/skills/design/impeccable/scripts/lib/staleness-notice.mjs +169 -0
  83. package/template/.agents/skills/design/impeccable/scripts/lib/staleness.mjs +457 -0
  84. package/template/.agents/skills/design/impeccable/scripts/lib/surface-briefs.mjs +151 -0
  85. package/template/.agents/skills/design/impeccable/scripts/lib/target-slug.mjs +33 -0
  86. package/template/.agents/skills/design/impeccable/scripts/lib/template-extensions.mjs +146 -0
  87. package/template/.agents/skills/design/impeccable/scripts/live/accept-css.mjs +617 -0
  88. package/template/.agents/skills/design/impeccable/scripts/live/accept-verify.mjs +60 -0
  89. package/template/.agents/skills/design/impeccable/scripts/live/browser-script-parts.mjs +7 -1
  90. package/template/.agents/skills/design/impeccable/scripts/live/completion.mjs +10 -1
  91. package/template/.agents/skills/design/impeccable/scripts/live/event-validation.mjs +67 -5
  92. package/template/.agents/skills/design/impeccable/scripts/live/frameworks/astro.mjs +47 -0
  93. package/template/.agents/skills/design/impeccable/scripts/live/frameworks/detect-utils.mjs +73 -0
  94. package/template/.agents/skills/design/impeccable/scripts/live/frameworks/index.mjs +143 -0
  95. package/template/.agents/skills/design/impeccable/scripts/live/frameworks/journal.mjs +197 -0
  96. package/template/.agents/skills/design/impeccable/scripts/live/frameworks/nextjs.mjs +49 -0
  97. package/template/.agents/skills/design/impeccable/scripts/live/frameworks/nuxt.mjs +161 -0
  98. package/template/.agents/skills/design/impeccable/scripts/live/frameworks/script-src.mjs +17 -0
  99. package/template/.agents/skills/design/impeccable/scripts/live/frameworks/static-html.mjs +26 -0
  100. package/template/.agents/skills/design/impeccable/scripts/live/frameworks/sveltekit.mjs +71 -0
  101. package/template/.agents/skills/design/impeccable/scripts/live/frameworks/tag-strategy.mjs +247 -0
  102. package/template/.agents/skills/design/impeccable/scripts/live/frameworks/tanstack-start.mjs +70 -0
  103. package/template/.agents/skills/design/impeccable/scripts/live/frameworks/vite-generic.mjs +42 -0
  104. package/template/.agents/skills/design/impeccable/scripts/live/generation-preflight.mjs +149 -0
  105. package/template/.agents/skills/design/impeccable/scripts/live/instructions.mjs +142 -0
  106. package/template/.agents/skills/design/impeccable/scripts/live/poll-lanes.mjs +14 -0
  107. package/template/.agents/skills/design/impeccable/scripts/live/roots.mjs +508 -0
  108. package/template/.agents/skills/design/impeccable/scripts/live/session-store.mjs +324 -50
  109. package/template/.agents/skills/design/impeccable/scripts/live/source-lock.mjs +105 -0
  110. package/template/.agents/skills/design/impeccable/scripts/live/source-search.mjs +105 -0
  111. package/template/.agents/skills/design/impeccable/scripts/live/svelte-ast.mjs +961 -0
  112. package/template/.agents/skills/design/impeccable/scripts/live/svelte-component.mjs +588 -72
  113. package/template/.agents/skills/design/impeccable/scripts/live/sveltekit-adapter.mjs +59 -17
  114. package/template/.agents/skills/design/impeccable/scripts/live/tanstack-adapter.mjs +280 -0
  115. package/template/.agents/skills/design/impeccable/scripts/live/vocabulary.mjs +135 -0
  116. package/template/.agents/skills/design/impeccable/scripts/live-accept.mjs +210 -68
  117. package/template/.agents/skills/design/impeccable/scripts/live-browser.js +1562 -223
  118. package/template/.agents/skills/design/impeccable/scripts/live-commit-manual-edits.mjs +3 -0
  119. package/template/.agents/skills/design/impeccable/scripts/live-complete.mjs +33 -1
  120. package/template/.agents/skills/design/impeccable/scripts/live-inject.mjs +175 -255
  121. package/template/.agents/skills/design/impeccable/scripts/live-insert.mjs +26 -6
  122. package/template/.agents/skills/design/impeccable/scripts/live-manual-edit-evidence.mjs +6 -1
  123. package/template/.agents/skills/design/impeccable/scripts/live-poll.mjs +61 -16
  124. package/template/.agents/skills/design/impeccable/scripts/live-resume.mjs +39 -10
  125. package/template/.agents/skills/design/impeccable/scripts/live-server.mjs +573 -47
  126. package/template/.agents/skills/design/impeccable/scripts/live-status.mjs +17 -7
  127. package/template/.agents/skills/design/impeccable/scripts/live-wrap.mjs +124 -91
  128. package/template/.agents/skills/design/impeccable/scripts/live.mjs +88 -26
  129. package/template/.agents/skills/design/impeccable/scripts/palette.mjs +76 -81
  130. package/template/.agents/skills/design/impeccable/scripts/pin.mjs +18 -11
  131. package/template/.agents/skills/design/impeccable/scripts/serve-question.mjs +932 -0
  132. package/template/.agents/skills/design/impeccable/scripts/surface-brief.mjs +74 -0
  133. package/template/.agents/skills/design/shadcn/SKILL.md +46 -11
  134. package/template/.agents/skills/design/shadcn/cli.md +49 -16
  135. package/template/.agents/skills/design/shadcn/customization.md +14 -7
  136. package/template/.agents/skills/design/shadcn/evals/evals.json +30 -0
  137. package/template/.agents/skills/design/shadcn/mcp.md +27 -16
  138. package/template/.agents/skills/design/shadcn/registry.md +277 -0
  139. package/template/.agents/skills/design/shadcn/rules/chat.md +224 -0
  140. package/template/.agents/skills/design/shadcn/rules/composition.md +20 -2
  141. package/template/.agents/skills/design/shadcn/rules/styling.md +23 -0
  142. package/template/.agents/skills/find-skills/SKILL.md +2 -3
  143. package/template/.agents/skills/hono/SKILL.md +579 -0
  144. package/template/.agents/skills/integrations/langfuse/SKILL.md +10 -6
  145. package/template/.agents/skills/integrations/langfuse/references/ci-cd.md +41 -0
  146. package/template/.agents/skills/integrations/langfuse/references/cli.md +8 -0
  147. package/template/.agents/skills/integrations/langfuse/references/error-analysis.md +15 -27
  148. package/template/.agents/skills/integrations/langfuse/references/instrumentation.md +39 -52
  149. package/template/.agents/skills/integrations/langfuse/references/judge-calibration.md +5 -2
  150. package/template/.agents/skills/integrations/langfuse/references/prompt-engineering.md +35 -0
  151. package/template/.agents/skills/integrations/langfuse/references/prompt-migration.md +41 -196
  152. package/template/.agents/skills/integrations/langfuse/references/skill-feedback.md +3 -0
  153. package/template/.agents/skills/integrations/langfuse/references/trace-evaluator-upgrade.md +76 -0
  154. package/template/.agents/skills/integrations/langfuse/references/user-feedback.md +4 -0
  155. package/template/.agents/skills/integrations/langfuse/references/v4-project-migration.md +73 -0
  156. package/template/.agents/skills/supabase/CHANGELOG.md +71 -0
  157. package/template/.agents/skills/supabase/SKILL.md +145 -0
  158. package/template/.agents/skills/supabase/assets/feedback-issue-template.md +17 -0
  159. package/template/.agents/skills/supabase/references/skill-feedback.md +17 -0
  160. package/template/.agents/skills/supabase-postgres-best-practices/CHANGELOG.md +73 -0
  161. package/template/.agents/skills/supabase-postgres-best-practices/SKILL.md +64 -0
  162. package/template/.agents/skills/supabase-postgres-best-practices/references/_contributing.md +170 -0
  163. package/template/.agents/skills/supabase-postgres-best-practices/references/_sections.md +39 -0
  164. package/template/.agents/skills/supabase-postgres-best-practices/references/_template.md +34 -0
  165. package/template/.agents/skills/supabase-postgres-best-practices/references/advanced-full-text-search.md +55 -0
  166. package/template/.agents/skills/supabase-postgres-best-practices/references/advanced-jsonb-indexing.md +49 -0
  167. package/template/.agents/skills/supabase-postgres-best-practices/references/conn-idle-timeout.md +46 -0
  168. package/template/.agents/skills/supabase-postgres-best-practices/references/conn-limits.md +44 -0
  169. package/template/.agents/skills/supabase-postgres-best-practices/references/conn-pooling.md +41 -0
  170. package/template/.agents/skills/supabase-postgres-best-practices/references/conn-prepared-statements.md +46 -0
  171. package/template/.agents/skills/supabase-postgres-best-practices/references/data-batch-inserts.md +54 -0
  172. package/template/.agents/skills/supabase-postgres-best-practices/references/data-n-plus-one.md +53 -0
  173. package/template/.agents/skills/supabase-postgres-best-practices/references/data-pagination.md +50 -0
  174. package/template/.agents/skills/supabase-postgres-best-practices/references/data-upsert.md +50 -0
  175. package/template/.agents/skills/supabase-postgres-best-practices/references/lock-advisory.md +56 -0
  176. package/template/.agents/skills/supabase-postgres-best-practices/references/lock-deadlock-prevention.md +68 -0
  177. package/template/.agents/skills/supabase-postgres-best-practices/references/lock-short-transactions.md +50 -0
  178. package/template/.agents/skills/supabase-postgres-best-practices/references/lock-skip-locked.md +54 -0
  179. package/template/.agents/skills/supabase-postgres-best-practices/references/monitor-explain-analyze.md +45 -0
  180. package/template/.agents/skills/supabase-postgres-best-practices/references/monitor-pg-stat-statements.md +55 -0
  181. package/template/.agents/skills/supabase-postgres-best-practices/references/monitor-vacuum-analyze.md +55 -0
  182. package/template/.agents/skills/supabase-postgres-best-practices/references/query-composite-indexes.md +44 -0
  183. package/template/.agents/skills/supabase-postgres-best-practices/references/query-covering-indexes.md +40 -0
  184. package/template/.agents/skills/supabase-postgres-best-practices/references/query-index-types.md +48 -0
  185. package/template/.agents/skills/supabase-postgres-best-practices/references/query-missing-indexes.md +43 -0
  186. package/template/.agents/skills/supabase-postgres-best-practices/references/query-partial-indexes.md +45 -0
  187. package/template/.agents/skills/supabase-postgres-best-practices/references/schema-constraints.md +80 -0
  188. package/template/.agents/skills/supabase-postgres-best-practices/references/schema-data-types.md +46 -0
  189. package/template/.agents/skills/supabase-postgres-best-practices/references/schema-foreign-key-indexes.md +59 -0
  190. package/template/.agents/skills/supabase-postgres-best-practices/references/schema-lowercase-identifiers.md +55 -0
  191. package/template/.agents/skills/supabase-postgres-best-practices/references/schema-partitioning.md +55 -0
  192. package/template/.agents/skills/supabase-postgres-best-practices/references/schema-primary-keys.md +61 -0
  193. package/template/.agents/skills/supabase-postgres-best-practices/references/security-privileges.md +54 -0
  194. package/template/.agents/skills/supabase-postgres-best-practices/references/security-rls-basics.md +50 -0
  195. package/template/.agents/skills/supabase-postgres-best-practices/references/security-rls-performance.md +63 -0
  196. package/template/.agents/upstreams.json +34 -12
  197. package/template/.agents/skills/design/impeccable/reference/brand.md +0 -108
  198. package/template/.agents/skills/design/impeccable/reference/codex.md +0 -105
  199. package/template/.agents/skills/design/impeccable/reference/interaction-design.md +0 -189
  200. package/template/.agents/skills/integrations/langfuse/references/sdk-upgrade.md +0 -175
@@ -0,0 +1,74 @@
1
+ #!/usr/bin/env node
2
+ import fs from 'node:fs';
3
+ import path from 'node:path';
4
+ import { fileURLToPath, pathToFileURL } from 'node:url';
5
+ import { resolveProjectRoot } from './context.mjs';
6
+ import {
7
+ listSurfaceBriefs,
8
+ resolveSurfaceBrief,
9
+ surfaceBriefPathForTarget,
10
+ writeSurfaceBrief,
11
+ } from './lib/surface-briefs.mjs';
12
+
13
+ function summary(brief, projectRoot) {
14
+ return {
15
+ slug: brief.slug,
16
+ path: path.relative(projectRoot, brief.path).split(path.sep).join('/'),
17
+ primaryTarget: brief.primaryTarget,
18
+ relatedTargets: brief.relatedTargets,
19
+ };
20
+ }
21
+
22
+ function main(argv) {
23
+ const [command, target, bodyFile, ...relatedTargets] = argv;
24
+ const projectRoot = resolveProjectRoot(process.cwd(), target ? { targetPath: target } : {});
25
+ if (command === 'path') {
26
+ const filePath = surfaceBriefPathForTarget(target, { projectRoot });
27
+ if (!filePath) throw new Error('surface brief path requires a concrete target');
28
+ process.stdout.write(`${path.relative(process.cwd(), filePath) || filePath}\n`);
29
+ return;
30
+ }
31
+ if (command === 'list') {
32
+ process.stdout.write(`${JSON.stringify(listSurfaceBriefs(projectRoot).map((brief) => summary(brief, projectRoot)), null, 2)}\n`);
33
+ return;
34
+ }
35
+ if (command === 'read') {
36
+ const result = resolveSurfaceBrief(projectRoot, target || null);
37
+ if (result.brief) {
38
+ process.stdout.write(result.brief.text);
39
+ return;
40
+ }
41
+ if (result.candidates.length) process.stderr.write(`${JSON.stringify(result.candidates.map((brief) => summary(brief, projectRoot)), null, 2)}\n`);
42
+ process.exit(2);
43
+ }
44
+ if (command === 'write') {
45
+ if (!target || !bodyFile) throw new Error('usage: surface-brief.mjs write <primary-target> <body-file>');
46
+ const filePath = writeSurfaceBrief({
47
+ projectRoot,
48
+ primaryTarget: target,
49
+ relatedTargets,
50
+ body: fs.readFileSync(bodyFile, 'utf-8'),
51
+ });
52
+ process.stdout.write(`${path.relative(process.cwd(), filePath) || filePath}\n`);
53
+ return;
54
+ }
55
+ throw new Error('usage: surface-brief.mjs <path|list|read|write> [target] [body-file] [related-target ...]');
56
+ }
57
+
58
+ function isMainModule() {
59
+ if (!process.argv[1]) return false;
60
+ try {
61
+ return fs.realpathSync(fileURLToPath(import.meta.url)) === fs.realpathSync(process.argv[1]);
62
+ } catch {
63
+ return import.meta.url === pathToFileURL(process.argv[1]).href;
64
+ }
65
+ }
66
+
67
+ if (isMainModule()) {
68
+ try {
69
+ main(process.argv.slice(2));
70
+ } catch (error) {
71
+ process.stderr.write(`${error?.message || error}\n`);
72
+ process.exit(1);
73
+ }
74
+ }
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: shadcn
3
- description: Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI. Provides project context, component docs, and usage examples. Applies when working with shadcn/ui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for "shadcn init", "create an app with --preset", or "switch to --preset".
3
+ description: Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI, including chat interfaces. Provides project context, component docs, and usage examples. Applies when working with shadcn/ui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for "shadcn init", "create an app with --preset", or "switch to --preset".
4
4
  user-invocable: false
5
5
  allowed-tools: Bash(npx shadcn@latest *), Bash(pnpm dlx shadcn@latest *), Bash(bunx --bun shadcn@latest *)
6
6
  ---
@@ -64,7 +64,9 @@ These rules are **always enforced**. Each links to a file with Incorrect/Correct
64
64
  - **Use existing components before custom markup.** Check if a component exists before writing a styled `div`.
65
65
  - **Callouts use `Alert`.** Don't build custom styled divs.
66
66
  - **Empty states use `Empty`.** Don't build custom empty state markup.
67
- - **Toast via `sonner`.** Use `toast()` from `sonner`.
67
+ - **Toast follows the project base.** Use `toast` from the `toast` component for
68
+ Base UI projects. Use `toast()` from `sonner` for Radix and React Aria
69
+ projects.
68
70
  - **Use `Separator`** instead of `<hr>` or `<div className="border-t">`.
69
71
  - **Use `Skeleton`** for loading placeholders. No custom `animate-pulse` divs.
70
72
  - **Use `Badge`** instead of custom styled spans.
@@ -75,9 +77,16 @@ These rules are **always enforced**. Each links to a file with Incorrect/Correct
75
77
  - **No sizing classes on icons inside components.** Components handle icon sizing via CSS. No `size-4` or `w-4 h-4`.
76
78
  - **Pass icons as objects, not string keys.** `icon={CheckIcon}`, not a string lookup.
77
79
 
80
+ ### Chat & Messaging → [chat.md](./rules/chat.md)
81
+
82
+ - **Chat UI composes the chat primitives.** Conversations use `MessageScroller`, rows use `Message`, surfaces use `Bubble`. Never hand-rolled bubble `div`s or a raw scroll container.
83
+ - **`MessageScroller` owns scroll behavior.** Streaming follow, anchoring, and jump-to-latest (`MessageScrollerButton`) are built in. Don't write a `useStickToBottom`/`ResizeObserver` hook.
84
+ - **Attachments use `Attachment`; system notes and dividers use `Marker`.** Not `Item` cards or `Separator` + a label.
85
+
78
86
  ### CLI
79
87
 
80
- - **Never decode or fetch preset codes manually.** Pass them directly to `npx shadcn@latest init --preset <code>`.
88
+ - **Never decode preset codes or build preset URLs manually.** Use `npx shadcn@latest preset decode <code>`, `preset url <code>`, or `preset open <code>`. For project-aware preset detection, use `npx shadcn@latest preset resolve`.
89
+ - **Apply preset codes directly with the CLI.** Use `npx shadcn@latest apply <code>` for existing projects, or `npx shadcn@latest init --preset <code>` when initializing.
81
90
 
82
91
  ## Key Patterns
83
92
 
@@ -128,13 +137,14 @@ These are the most common patterns that differentiate correct shadcn/ui code. Fo
128
137
  | Data display | `Table`, `Card`, `Badge`, `Avatar` |
129
138
  | Navigation | `Sidebar`, `NavigationMenu`, `Breadcrumb`, `Tabs`, `Pagination` |
130
139
  | Overlays | `Dialog` (modal), `Sheet` (side panel), `Drawer` (bottom sheet), `AlertDialog` (confirmation) |
131
- | Feedback | `sonner` (toast), `Alert`, `Progress`, `Skeleton`, `Spinner` |
140
+ | Feedback | `toast` (Base UI), `sonner` (Radix/Aria), `Alert`, `Progress`, `Skeleton`, `Spinner` |
132
141
  | Command palette | `Command` inside `Dialog` |
133
142
  | Charts | `Chart` (wraps Recharts) |
134
143
  | Layout | `Card`, `Separator`, `Resizable`, `ScrollArea`, `Accordion`, `Collapsible` |
135
144
  | Empty states | `Empty` |
136
145
  | Menus | `DropdownMenu`, `ContextMenu`, `Menubar` |
137
146
  | Tooltips/info | `Tooltip`, `HoverCard`, `Popover` |
147
+ | Chat / conversation UI | `MessageScroller`, `Message`, `Bubble`, `Attachment`, `Marker` |
138
148
 
139
149
  ## Key Fields
140
150
 
@@ -150,6 +160,7 @@ The injected project context contains these key fields:
150
160
  - **`resolvedPaths`** → exact file-system destinations for components, utils, hooks, etc.
151
161
  - **`framework`** → routing and file conventions (e.g. Next.js App Router vs Vite SPA).
152
162
  - **`packageManager`** → use this for any non-shadcn dependency installs (e.g. `pnpm add date-fns` vs `npm install date-fns`).
163
+ - **`preset`** → resolved preset code and values for the current project. Use `npx shadcn@latest preset resolve --json` when you only need preset information.
153
164
 
154
165
  See [cli.md — `info` command](./cli.md) for the full field reference.
155
166
 
@@ -172,12 +183,15 @@ npx shadcn@latest docs button dialog select
172
183
  5. **Install or update** — `npx shadcn@latest add`. When updating existing components, use `--dry-run` and `--diff` to preview changes first (see [Updating Components](#updating-components) below).
173
184
  6. **Fix imports in third-party components** — After adding components from community registries (e.g. `@bundui`, `@magicui`), check the added non-UI files for hardcoded import paths like `@/components/ui/...`. These won't match the project's actual aliases. Use `npx shadcn@latest info` to get the correct `ui` alias (e.g. `@workspace/ui/components`) and rewrite the imports accordingly. The CLI rewrites imports for its own UI files, but third-party registry components may use default paths that don't match the project.
174
185
  7. **Review added components** — After adding a component or block from any registry, **always read the added files and verify they are correct**. Check for missing sub-components (e.g. `SelectItem` without `SelectGroup`), missing imports, incorrect composition, or violations of the [Critical Rules](#critical-rules). Also replace any icon imports with the project's `iconLibrary` from the project context (e.g. if the registry item uses `lucide-react` but the project uses `hugeicons`, swap the imports and icon names accordingly). Fix all issues before moving on.
175
- 8. **Registry must be explicit** — When the user asks to add a block or component, **do not guess the registry**. If no registry is specified (e.g. user says "add a login block" without specifying `@shadcn`, `@tailark`, etc.), ask which registry to use. Never default to a registry on behalf of the user.
176
- 9. **Switching presets** — Ask the user first: **reinstall**, **merge**, or **skip**?
177
- - **Reinstall**: `npx shadcn@latest init --preset <code> --force --reinstall`. Overwrites all components.
186
+ 8. **Registry must be explicit** — When the user asks to add a block or component, **do not guess the registry**. If no registry is specified (e.g. user says "add a login block" without specifying `@shadcn`, `@tailark`, `owner/repo`, etc.), ask which registry to use. Never default to a registry on behalf of the user.
187
+ 9. **Switching presets** — Ask the user first: **overwrite**, **partial**, **merge**, or **skip**?
188
+ - **Inspect current preset**: `npx shadcn@latest preset resolve`. Use `--json` when you need structured values.
189
+ - **Inspect incoming preset**: `npx shadcn@latest preset decode <code>`. Use `preset url <code>` or `preset open <code>` to share or open the preset builder.
190
+ - **Overwrite**: `npx shadcn@latest apply <code>`. Overwrites detected components, fonts, and CSS variables.
191
+ - **Partial**: `npx shadcn@latest apply <code> --only theme,font`. Updates only the selected preset parts without reinstalling UI components. Supported values are `theme` and `font`; comma-separated combinations are allowed. `icon` is intentionally not supported, because icon changes may require full component reinstall and transforms.
178
192
  - **Merge**: `npx shadcn@latest init --preset <code> --force --no-reinstall`, then run `npx shadcn@latest info` to list installed components, then for each installed component use `--dry-run` and `--diff` to [smart merge](#updating-components) it individually.
179
193
  - **Skip**: `npx shadcn@latest init --preset <code> --force --no-reinstall`. Only updates config and CSS, leaves components as-is.
180
- - **Important**: Always run preset commands inside the user's project directory. The CLI automatically preserves the current base (`base` vs `radix`) from `components.json`. If you must use a scratch/temp directory (e.g. for `--dry-run` comparisons), pass `--base <current-base>` explicitly — preset codes do not encode the base.
194
+ - **Important**: Always run preset commands inside the user's project directory. `apply` only works in an existing project with a `components.json` file. The CLI automatically preserves the current base (`base` vs `radix`) from `components.json`. If you must use a scratch/temp directory (e.g. for `--dry-run` comparisons), pass `--base <current-base>` explicitly — preset codes do not encode the base.
181
195
 
182
196
  ## Updating Components
183
197
 
@@ -204,39 +218,60 @@ npx shadcn@latest init --name my-app --preset base-nova --template next --monore
204
218
 
205
219
  # Initialize existing project.
206
220
  npx shadcn@latest init --preset base-nova
207
- npx shadcn@latest init --defaults # shortcut: --template=next --preset=base-nova
221
+ npx shadcn@latest init --defaults # shortcut: --template=next --preset=nova (base style implied)
222
+
223
+ # Apply a preset to an existing project.
224
+ npx shadcn@latest apply a2r6bw
225
+ npx shadcn@latest apply a2r6bw --only theme
226
+ npx shadcn@latest apply a2r6bw --only font
227
+ npx shadcn@latest apply a2r6bw --only theme,font
228
+
229
+ # Inspect preset codes and project preset state.
230
+ npx shadcn@latest preset decode a2r6bw
231
+ npx shadcn@latest preset url a2r6bw
232
+ npx shadcn@latest preset open a2r6bw
233
+ npx shadcn@latest preset resolve
234
+ npx shadcn@latest preset resolve --json
208
235
 
209
236
  # Add components.
210
237
  npx shadcn@latest add button card dialog
211
238
  npx shadcn@latest add @magicui/shimmer-button
239
+ npx shadcn@latest add owner/repo/item
212
240
  npx shadcn@latest add --all
213
241
 
214
242
  # Preview changes before adding/updating.
215
243
  npx shadcn@latest add button --dry-run
216
244
  npx shadcn@latest add button --diff button.tsx
217
245
  npx shadcn@latest add @acme/form --view button.tsx
246
+ npx shadcn@latest add owner/repo/item --dry-run
218
247
 
219
248
  # Search registries.
220
249
  npx shadcn@latest search @shadcn -q "sidebar"
221
250
  npx shadcn@latest search @tailark -q "stats"
251
+ npx shadcn@latest search owner/repo -q "login"
252
+ npx shadcn@latest search # all configured registries
253
+ npx shadcn@latest search @shadcn -q "menu" -t ui # filter by item type
222
254
 
223
255
  # Get component docs and example URLs.
224
256
  npx shadcn@latest docs button dialog select
225
257
 
226
258
  # View registry item details (for items not yet installed).
227
259
  npx shadcn@latest view @shadcn/button
260
+ npx shadcn@latest view owner/repo/item
228
261
  ```
229
262
 
230
- **Named presets:** `base-nova`, `radix-nova`
263
+ **Named presets:** `nova`, `vega`, `maia`, `lyra`, `mira`, `luma`
231
264
  **Templates:** `next`, `vite`, `start`, `react-router`, `astro` (all support `--monorepo`) and `laravel` (not supported for monorepo)
232
- **Preset codes:** Base62 strings starting with `a` (e.g. `a2r6bw`), from [ui.shadcn.com](https://ui.shadcn.com).
265
+ **Preset codes:** Version-prefixed base62 strings (e.g. `a2r6bw` or `b0`), from [ui.shadcn.com](https://ui.shadcn.com).
233
266
 
234
267
  ## Detailed References
235
268
 
236
269
  - [rules/forms.md](./rules/forms.md) — FieldGroup, Field, InputGroup, ToggleGroup, FieldSet, validation states
237
270
  - [rules/composition.md](./rules/composition.md) — Groups, overlays, Card, Tabs, Avatar, Alert, Empty, Toast, Separator, Skeleton, Badge, Button loading
271
+ - [rules/chat.md](./rules/chat.md) — MessageScroller, Message, Bubble, Attachment, Marker; streaming, anchoring, jump-to-latest
238
272
  - [rules/icons.md](./rules/icons.md) — data-icon, icon sizing, passing icons as objects
239
273
  - [rules/styling.md](./rules/styling.md) — Semantic colors, variants, className, spacing, size, truncate, dark mode, cn(), z-index
240
274
  - [rules/base-vs-radix.md](./rules/base-vs-radix.md) — asChild vs render, Select, ToggleGroup, Slider, Accordion
241
275
  - [cli.md](./cli.md) — Commands, flags, presets, templates
276
+ - [registry.md](./registry.md) — Authoring source registries, `include`, item definitions, dependencies, GitHub registry rules
242
277
  - [customization.md](./customization.md) — Theming, CSS variables, extending components
@@ -8,7 +8,7 @@ Configuration is read from `components.json`.
8
8
 
9
9
  ## Contents
10
10
 
11
- - Commands: init, add (dry-run, smart merge), search, view, docs, info, build
11
+ - Commands: init, apply, add (dry-run, smart merge), search, view, docs, info, build
12
12
  - Templates: next, vite, start, react-router, astro
13
13
  - Presets: named, code, URL formats and fields
14
14
  - Switching presets
@@ -42,6 +42,24 @@ Initializes shadcn/ui in an existing project or creates a new project (when `--n
42
42
 
43
43
  `npx shadcn@latest create` is an alias for `npx shadcn@latest init`.
44
44
 
45
+ ### `apply` — Apply a preset to an existing project
46
+
47
+ ```bash
48
+ npx shadcn@latest apply [preset] [options]
49
+ ```
50
+
51
+ Applies a preset to an existing project, overwriting preset-driven config, fonts, CSS variables, and detected UI components.
52
+
53
+ | Flag | Short | Description | Default |
54
+ | ------------------- | ----- | ------------------------------------------ | ------- |
55
+ | `--preset <preset>` | — | Preset configuration (named, code, or URL) | — |
56
+ | `--yes` | `-y` | Skip confirmation prompt | `false` |
57
+ | `--cwd <cwd>` | `-c` | Working directory | current |
58
+ | `--silent` | `-s` | Mute output | `false` |
59
+
60
+ `[preset]` is a shorthand for `--preset <preset>`. If both are provided, they must match.
61
+ If no preset is provided, the CLI offers to open the custom preset builder on `ui.shadcn.com/create`.
62
+
45
63
  ### `add` — Add components
46
64
 
47
65
  > **IMPORTANT:** To compare local components against upstream or to preview changes, ALWAYS use `npx shadcn@latest add <component> --dry-run`, `--diff`, or `--view`. NEVER fetch raw files from GitHub or other sources manually. The CLI handles registry resolution, file paths, and CSS diffing automatically.
@@ -50,7 +68,8 @@ Initializes shadcn/ui in an existing project or creates a new project (when `--n
50
68
  npx shadcn@latest add [components...] [options]
51
69
  ```
52
70
 
53
- Accepts component names, registry-prefixed names (`@magicui/shimmer-button`), URLs, or local paths.
71
+ Accepts component names, registry-prefixed names (`@magicui/shimmer-button`),
72
+ GitHub item addresses (`owner/repo/item`), URLs, or local paths.
54
73
 
55
74
  | Flag | Short | Description | Default |
56
75
  | --------------- | ----- | -------------------------------------------------------------------------------------------------------------------- | ------- |
@@ -87,6 +106,9 @@ npx shadcn@latest add button --view button.tsx
87
106
  # Works with URLs too.
88
107
  npx shadcn@latest add https://api.npoint.io/abc123 --dry-run
89
108
 
109
+ # Works with public GitHub registries too.
110
+ npx shadcn@latest add owner/repo/item --dry-run
111
+
90
112
  # CSS diffs.
91
113
  npx shadcn@latest add button --diff globals.css
92
114
  ```
@@ -108,17 +130,22 @@ See [Updating Components in SKILL.md](./SKILL.md#updating-components) for the fu
108
130
  ### `search` — Search registries
109
131
 
110
132
  ```bash
111
- npx shadcn@latest search <registries...> [options]
133
+ npx shadcn@latest search [registries...] [options]
112
134
  ```
113
135
 
114
- Fuzzy search across registries. Also aliased as `npx shadcn@latest list`. Without `-q`, lists all items.
136
+ Fuzzy search across registries. Also aliased as `npx shadcn@latest list`.
137
+ Supports namespaces (`@acme`), public GitHub registry sources (`owner/repo`),
138
+ and registry catalog URLs. Without `-q`, lists all items. When no registries are
139
+ passed, searches every registry configured in `components.json`.
115
140
 
116
- | Flag | Short | Description | Default |
117
- | ------------------- | ----- | ---------------------- | ------- |
118
- | `--query <query>` | `-q` | Search query | — |
119
- | `--limit <number>` | `-l` | Max items per registry | `100` |
120
- | `--offset <number>` | `-o` | Items to skip | `0` |
121
- | `--cwd <cwd>` | `-c` | Working directory | current |
141
+ | Flag | Short | Description | Default |
142
+ | ------------------- | ----- | ------------------------------------------------- | ------- |
143
+ | `--query <query>` | `-q` | Search query | — |
144
+ | `--type <type>` | `-t` | Filter by item type (e.g. `ui`, `block`, `hook`); comma-separated | — |
145
+ | `--limit <number>` | `-l` | Max items to display | `100` |
146
+ | `--offset <number>` | `-o` | Items to skip | `0` |
147
+ | `--json` | | Output as JSON | `false` |
148
+ | `--cwd <cwd>` | `-c` | Working directory | current |
122
149
 
123
150
  ### `view` — View item details
124
151
 
@@ -126,7 +153,9 @@ Fuzzy search across registries. Also aliased as `npx shadcn@latest list`. Withou
126
153
  npx shadcn@latest view <items...> [options]
127
154
  ```
128
155
 
129
- Displays item info including file contents. Example: `npx shadcn@latest view @shadcn/button`.
156
+ Displays item info including file contents. Examples:
157
+ `npx shadcn@latest view @shadcn/button`,
158
+ `npx shadcn@latest view owner/repo/item`.
130
159
 
131
160
  ### `docs` — Get component documentation URLs
132
161
 
@@ -214,6 +243,9 @@ npx shadcn@latest build [registry] [options]
214
243
 
215
244
  Builds `registry.json` into individual JSON files for distribution. Default input: `./registry.json`, default output: `./public/r`.
216
245
 
246
+ For authoring rules, `include`, item definitions, `registryDependencies`, and
247
+ GitHub registry behavior, see [registry.md](./registry.md).
248
+
217
249
  | Flag | Short | Description | Default |
218
250
  | ----------------- | ----- | ----------------- | ------------ |
219
251
  | `--output <path>` | `-o` | Output directory | `./public/r` |
@@ -240,18 +272,19 @@ All templates support monorepo scaffolding via the `--monorepo` flag. When passe
240
272
 
241
273
  Three ways to specify a preset via `--preset`:
242
274
 
243
- 1. **Named:** `--preset base-nova` or `--preset radix-nova`
244
- 2. **Code:** `--preset a2r6bw` (base62 string, starts with lowercase `a`)
275
+ 1. **Named:** `--preset nova` or `--preset lyra`
276
+ 2. **Code:** `--preset a2r6bw` (version-prefixed base62 string, e.g. `a2r6bw` or `b0`)
245
277
  3. **URL:** `--preset "https://ui.shadcn.com/init?base=radix&style=nova&..."`
246
278
 
247
279
  > **IMPORTANT:** Never try to decode, fetch, or resolve preset codes manually. Preset codes are opaque — pass them directly to `npx shadcn@latest init --preset <code>` and let the CLI handle resolution.
280
+ > Use `npx shadcn@latest apply --preset <code>` when overwriting an existing project's preset.
248
281
 
249
282
  ## Switching Presets
250
283
 
251
- Ask the user first: **reinstall**, **merge**, or **skip** existing components?
284
+ Ask the user first: **overwrite**, **merge**, or **skip** existing components?
252
285
 
253
- - **Re-install** → `npx shadcn@latest init --preset <code> --force --reinstall`. Overwrites all component files with the new preset styles. Use when the user hasn't customized components.
286
+ - **Overwrite / Re-install** → `npx shadcn@latest apply --preset <code>`. Overwrites all detected component files with the new preset styles. Use when the user hasn't customized components.
254
287
  - **Merge** → `npx shadcn@latest init --preset <code> --force --no-reinstall`, then run `npx shadcn@latest info` to get the list of installed components and use the [smart merge workflow](./SKILL.md#updating-components) to update them one by one, preserving local changes. Use when the user has customized components.
255
288
  - **Skip** → `npx shadcn@latest init --preset <code> --force --no-reinstall`. Only updates config and CSS variables, leaves existing components as-is.
256
289
 
257
- Always run preset commands inside the user's project directory. The CLI automatically preserves the current base (`base` vs `radix`) from `components.json`. If you must use a scratch/temp directory (e.g. for `--dry-run` comparisons), pass `--base <current-base>` explicitly — preset codes do not encode the base.
290
+ Always run preset commands inside the user's project directory. `apply` only works in an existing project with a `components.json` file. The CLI automatically preserves the current base (`base` vs `radix`) from `components.json`. If you must use a scratch/temp directory (e.g. for `--dry-run` comparisons), pass `--base <current-base>` explicitly — preset codes do not encode the base.
@@ -65,14 +65,19 @@ import { ThemeProvider } from "next-themes"
65
65
 
66
66
  ```bash
67
67
  # Apply a preset code from ui.shadcn.com.
68
- npx shadcn@latest init --preset a2r6bw --force
68
+ npx shadcn@latest apply --preset a2r6bw
69
69
 
70
- # Switch to a named preset.
71
- npx shadcn@latest init --preset radix-nova --force
72
- npx shadcn@latest init --reinstall # update existing components to match
70
+ # Positional shorthand also works.
71
+ npx shadcn@latest apply a2r6bw
72
+
73
+ # Switch to a named preset and overwrite existing components.
74
+ npx shadcn@latest apply --preset nova
75
+
76
+ # Preserve existing components instead.
77
+ npx shadcn@latest init --preset nova --force --no-reinstall
73
78
 
74
79
  # Use a custom theme URL.
75
- npx shadcn@latest init --preset "https://ui.shadcn.com/init?base=radix&style=nova&theme=blue&..." --force
80
+ npx shadcn@latest apply --preset "https://ui.shadcn.com/init?base=radix&style=nova&theme=blue&..."
76
81
  ```
77
82
 
78
83
  Or edit CSS variables directly in `globals.css`.
@@ -142,13 +147,15 @@ Prefer these approaches in order:
142
147
  ### 1. Built-in variants
143
148
 
144
149
  ```tsx
145
- <Button variant="outline" size="sm">Click</Button>
150
+ <Button variant="outline" size="sm">
151
+ Click
152
+ </Button>
146
153
  ```
147
154
 
148
155
  ### 2. Tailwind classes via `className`
149
156
 
150
157
  ```tsx
151
- <Card className="max-w-md mx-auto">...</Card>
158
+ <Card className="mx-auto max-w-md">...</Card>
152
159
  ```
153
160
 
154
161
  ### 3. Add a new variant
@@ -42,6 +42,36 @@
42
42
  "Uses gap-* instead of space-y-* or space-x-* for spacing",
43
43
  "Uses size-* when width and height are equal instead of separate w-* h-*"
44
44
  ]
45
+ },
46
+ {
47
+ "id": 4,
48
+ "prompt": "I'm building a Next.js app with shadcn/ui (base-nova preset, lucide icons). Build a chat conversation view: a scrollable thread of messages from two different people, each with an avatar, sender name, timestamp, and message bubble. A couple of messages include an image attachment and a PDF file attachment, and there's a 'Today' divider separating the days.",
49
+ "expected_output": "A React component composing MessageScroller, Message, Bubble, Attachment, and Marker from the registry instead of hand-rolled bubble/divider/attachment markup.",
50
+ "files": [],
51
+ "expectations": [
52
+ "Uses MessageScroller (MessageScrollerProvider, MessageScrollerViewport, MessageScrollerContent, MessageScrollerItem) for the scrollable thread instead of a raw overflow-y-auto div or ScrollArea",
53
+ "Wraps each row in MessageScrollerItem inside MessageScrollerContent",
54
+ "Uses Message with MessageAvatar/MessageContent/MessageHeader for row layout instead of custom flex divs",
55
+ "Uses Bubble + BubbleContent for the message surface instead of a styled div with bg-muted/bg-primary",
56
+ "Uses Attachment (AttachmentMedia, AttachmentContent, AttachmentTitle, AttachmentDescription) for the file and image attachments instead of Item or a custom card",
57
+ "Uses Marker (variant=\"separator\") for the 'Today' divider instead of Separator plus a centered label",
58
+ "Uses semantic color tokens and gap-* spacing; no raw colors like bg-emerald-500 and no space-y-*",
59
+ "Includes \"use client\" when the component uses state or event handlers (isRSC)"
60
+ ]
61
+ },
62
+ {
63
+ "id": 5,
64
+ "prompt": "Using shadcn/ui (base-nova preset, lucide icons), build a streaming AI chat UI. The assistant's reply streams in while it generates, the view auto-scrolls to follow the latest content but stops following if the user scrolls up to read earlier messages, a 'jump to latest' button appears when the user has scrolled away from the bottom, and a subtle 'thinking…' shimmer shows while the model is generating.",
65
+ "expected_output": "A React component that delegates scroll/anchor behavior to MessageScroller and uses MessageScrollerButton for jump-to-latest and the shimmer utility for the thinking indicator — no hand-rolled scroll logic or custom shimmer keyframes.",
66
+ "files": [],
67
+ "expectations": [
68
+ "Uses MessageScroller with MessageScrollerProvider (autoScroll) and scrollAnchor on message items for the stick-to-bottom/follow behavior instead of a custom useStickToBottom hook or ResizeObserver/scrollTop wiring",
69
+ "Uses MessageScrollerButton for the jump-to-latest control instead of a hand-built conditional button driven by manual scroll-position state",
70
+ "Uses the shimmer utility class for the 'thinking…' indicator instead of a custom @keyframes or bg-clip-text gradient animation",
71
+ "Wraps each message row in MessageScrollerItem inside MessageScrollerContent",
72
+ "Uses Message + Bubble + BubbleContent for the conversation rows instead of hand-rolled bubble divs",
73
+ "Uses semantic color tokens and gap-* spacing; includes \"use client\" (isRSC)"
74
+ ]
45
75
  }
46
76
  ]
47
77
  }
@@ -1,6 +1,6 @@
1
1
  # shadcn MCP Server
2
2
 
3
- The CLI includes an MCP server that lets AI assistants search, browse, view, and install components from registries.
3
+ The CLI includes an MCP server that lets AI assistants search, browse, view, and install items from registries.
4
4
 
5
5
  ---
6
6
 
@@ -13,13 +13,13 @@ shadcn mcp init # write config for your editor
13
13
 
14
14
  Editor config files:
15
15
 
16
- | Editor | Config file |
17
- |--------|------------|
18
- | Claude Code | `.mcp.json` |
19
- | Cursor | `.cursor/mcp.json` |
20
- | VS Code | `.vscode/mcp.json` |
21
- | OpenCode | `opencode.json` |
22
- | Codex | `~/.codex/config.toml` (manual) |
16
+ | Editor | Config file |
17
+ | ----------- | ------------------------------- |
18
+ | Claude Code | `.mcp.json` |
19
+ | Cursor | `.cursor/mcp.json` |
20
+ | VS Code | `.vscode/mcp.json` |
21
+ | OpenCode | `opencode.json` |
22
+ | Codex | `~/.codex/config.toml` (manual) |
23
23
 
24
24
  ---
25
25
 
@@ -35,27 +35,35 @@ Returns registry names from `components.json`. Errors if no `components.json` ex
35
35
 
36
36
  ### `shadcn:list_items_in_registries`
37
37
 
38
- Lists all items from one or more registries.
38
+ Lists all items from one or more registries. Registries can be configured
39
+ namespaces such as `@acme`, public GitHub sources such as `owner/repo`, or
40
+ registry catalog URLs. Omit `registries` to list from every registry configured
41
+ in `components.json`.
39
42
 
40
- **Input:** `registries` (string[]), `limit` (number, optional), `offset` (number, optional)
43
+ **Input:** `registries` (string[], optional — omit for all configured), `types` (string[], optional — e.g. `["ui", "block"]`), `limit` (number, optional, defaults to 100), `offset` (number, optional)
41
44
 
42
45
  ### `shadcn:search_items_in_registries`
43
46
 
44
- Fuzzy search across registries.
47
+ Fuzzy search across registries. Registries can be configured namespaces, public
48
+ GitHub sources, or registry catalog URLs. Omit `registries` to search every
49
+ registry configured in `components.json` — e.g. "find me a hero" across all
50
+ configured registries.
45
51
 
46
- **Input:** `registries` (string[]), `query` (string), `limit` (number, optional), `offset` (number, optional)
52
+ **Input:** `registries` (string[], optional — omit for all configured), `query` (string), `types` (string[], optional — e.g. `["ui", "block"]`), `limit` (number, optional, defaults to 100), `offset` (number, optional)
47
53
 
48
54
  ### `shadcn:view_items_in_registries`
49
55
 
50
56
  View item details including full file contents.
51
57
 
52
- **Input:** `items` (string[]) — e.g. `["@shadcn/button", "@shadcn/card"]`
58
+ **Input:** `items` (string[]) — e.g.
59
+ `["@shadcn/button", "@shadcn/card", "owner/repo/item"]`
53
60
 
54
61
  ### `shadcn:get_item_examples_from_registries`
55
62
 
56
- Find usage examples and demos with source code.
63
+ Find usage examples and demos with source code. Omit `registries` to search
64
+ every registry configured in `components.json`.
57
65
 
58
- **Input:** `registries` (string[]), `query` (string) — e.g. `"accordion-demo"`, `"button example"`
66
+ **Input:** `registries` (string[], optional — omit for all configured), `query` (string) — e.g. `"accordion-demo"`, `"button example"`
59
67
 
60
68
  ### `shadcn:get_add_command_for_items`
61
69
 
@@ -73,7 +81,10 @@ Returns a checklist for verifying components (imports, deps, lint, TypeScript).
73
81
 
74
82
  ## Configuring Registries
75
83
 
76
- Registries are set in `components.json`. The `@shadcn` registry is always built-in.
84
+ Namespaced and authenticated registries are set in `components.json`. The
85
+ `@shadcn` registry is always built-in. Public GitHub registries can also be used
86
+ directly as `owner/repo` registry sources when the repository has a root
87
+ `registry.json`; they do not need `components.json` configuration.
77
88
 
78
89
  ```json
79
90
  {