quiver-cli 1.3.0 → 2.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.
- package/README.md +197 -239
- package/dist/cli.js +3163 -2040
- package/package.json +10 -11
- package/template/.agents/AGENTS.md +0 -26
- package/template/.agents/commands/cp.md +0 -108
- package/template/.agents/commands/next-setup.md +0 -1064
- package/template/.agents/commands/review.md +0 -68
- package/template/.agents/commands/terraform-readme.md +0 -38
- package/template/.agents/config.json +0 -80
- package/template/.agents/plugins/opencode/rtk.ts +0 -34
- package/template/.agents/skills/agent-browser/SKILL.md +0 -51
- package/template/.agents/skills/apps/skybridge/SKILL.md +0 -50
- package/template/.agents/skills/code/cleanup/SKILL.md +0 -26
- package/template/.agents/skills/code/improve/SKILL.md +0 -122
- package/template/.agents/skills/code/improve/references/audit-playbook.md +0 -130
- package/template/.agents/skills/code/improve/references/closing-the-loop.md +0 -96
- package/template/.agents/skills/code/improve/references/plan-template.md +0 -197
- package/template/.agents/skills/code/vercel-react-best-practices/AGENTS.md +0 -3810
- package/template/.agents/skills/code/vercel-react-best-practices/README.md +0 -123
- package/template/.agents/skills/code/vercel-react-best-practices/SKILL.md +0 -149
- package/template/.agents/skills/code/vercel-react-best-practices/metadata.json +0 -15
- package/template/.agents/skills/code/vercel-react-best-practices/rules/_sections.md +0 -46
- package/template/.agents/skills/code/vercel-react-best-practices/rules/_template.md +0 -28
- package/template/.agents/skills/code/vercel-react-best-practices/rules/advanced-effect-event-deps.md +0 -56
- package/template/.agents/skills/code/vercel-react-best-practices/rules/advanced-event-handler-refs.md +0 -55
- package/template/.agents/skills/code/vercel-react-best-practices/rules/advanced-init-once.md +0 -42
- package/template/.agents/skills/code/vercel-react-best-practices/rules/advanced-use-latest.md +0 -39
- package/template/.agents/skills/code/vercel-react-best-practices/rules/async-api-routes.md +0 -38
- package/template/.agents/skills/code/vercel-react-best-practices/rules/async-cheap-condition-before-await.md +0 -37
- package/template/.agents/skills/code/vercel-react-best-practices/rules/async-defer-await.md +0 -82
- package/template/.agents/skills/code/vercel-react-best-practices/rules/async-dependencies.md +0 -51
- package/template/.agents/skills/code/vercel-react-best-practices/rules/async-parallel.md +0 -28
- package/template/.agents/skills/code/vercel-react-best-practices/rules/async-suspense-boundaries.md +0 -99
- package/template/.agents/skills/code/vercel-react-best-practices/rules/bundle-analyzable-paths.md +0 -63
- package/template/.agents/skills/code/vercel-react-best-practices/rules/bundle-barrel-imports.md +0 -60
- package/template/.agents/skills/code/vercel-react-best-practices/rules/bundle-conditional.md +0 -31
- package/template/.agents/skills/code/vercel-react-best-practices/rules/bundle-defer-third-party.md +0 -49
- package/template/.agents/skills/code/vercel-react-best-practices/rules/bundle-dynamic-imports.md +0 -35
- package/template/.agents/skills/code/vercel-react-best-practices/rules/bundle-preload.md +0 -50
- package/template/.agents/skills/code/vercel-react-best-practices/rules/client-event-listeners.md +0 -74
- package/template/.agents/skills/code/vercel-react-best-practices/rules/client-localstorage-schema.md +0 -71
- package/template/.agents/skills/code/vercel-react-best-practices/rules/client-passive-event-listeners.md +0 -48
- package/template/.agents/skills/code/vercel-react-best-practices/rules/client-swr-dedup.md +0 -56
- package/template/.agents/skills/code/vercel-react-best-practices/rules/js-batch-dom-css.md +0 -107
- package/template/.agents/skills/code/vercel-react-best-practices/rules/js-cache-function-results.md +0 -80
- package/template/.agents/skills/code/vercel-react-best-practices/rules/js-cache-property-access.md +0 -28
- package/template/.agents/skills/code/vercel-react-best-practices/rules/js-cache-storage.md +0 -70
- package/template/.agents/skills/code/vercel-react-best-practices/rules/js-combine-iterations.md +0 -32
- package/template/.agents/skills/code/vercel-react-best-practices/rules/js-early-exit.md +0 -50
- package/template/.agents/skills/code/vercel-react-best-practices/rules/js-flatmap-filter.md +0 -60
- package/template/.agents/skills/code/vercel-react-best-practices/rules/js-hoist-regexp.md +0 -45
- package/template/.agents/skills/code/vercel-react-best-practices/rules/js-index-maps.md +0 -37
- package/template/.agents/skills/code/vercel-react-best-practices/rules/js-length-check-first.md +0 -49
- package/template/.agents/skills/code/vercel-react-best-practices/rules/js-min-max-loop.md +0 -82
- package/template/.agents/skills/code/vercel-react-best-practices/rules/js-request-idle-callback.md +0 -105
- package/template/.agents/skills/code/vercel-react-best-practices/rules/js-set-map-lookups.md +0 -24
- package/template/.agents/skills/code/vercel-react-best-practices/rules/js-tosorted-immutable.md +0 -57
- package/template/.agents/skills/code/vercel-react-best-practices/rules/rendering-activity.md +0 -26
- package/template/.agents/skills/code/vercel-react-best-practices/rules/rendering-animate-svg-wrapper.md +0 -47
- package/template/.agents/skills/code/vercel-react-best-practices/rules/rendering-conditional-render.md +0 -40
- package/template/.agents/skills/code/vercel-react-best-practices/rules/rendering-content-visibility.md +0 -38
- package/template/.agents/skills/code/vercel-react-best-practices/rules/rendering-hoist-jsx.md +0 -46
- package/template/.agents/skills/code/vercel-react-best-practices/rules/rendering-hydration-no-flicker.md +0 -82
- package/template/.agents/skills/code/vercel-react-best-practices/rules/rendering-hydration-suppress-warning.md +0 -30
- package/template/.agents/skills/code/vercel-react-best-practices/rules/rendering-resource-hints.md +0 -85
- package/template/.agents/skills/code/vercel-react-best-practices/rules/rendering-script-defer-async.md +0 -68
- package/template/.agents/skills/code/vercel-react-best-practices/rules/rendering-svg-precision.md +0 -28
- package/template/.agents/skills/code/vercel-react-best-practices/rules/rendering-usetransition-loading.md +0 -75
- package/template/.agents/skills/code/vercel-react-best-practices/rules/rerender-defer-reads.md +0 -39
- package/template/.agents/skills/code/vercel-react-best-practices/rules/rerender-dependencies.md +0 -45
- package/template/.agents/skills/code/vercel-react-best-practices/rules/rerender-derived-state-no-effect.md +0 -40
- package/template/.agents/skills/code/vercel-react-best-practices/rules/rerender-derived-state.md +0 -29
- package/template/.agents/skills/code/vercel-react-best-practices/rules/rerender-functional-setstate.md +0 -74
- package/template/.agents/skills/code/vercel-react-best-practices/rules/rerender-lazy-state-init.md +0 -58
- package/template/.agents/skills/code/vercel-react-best-practices/rules/rerender-memo-with-default-value.md +0 -38
- package/template/.agents/skills/code/vercel-react-best-practices/rules/rerender-memo.md +0 -44
- package/template/.agents/skills/code/vercel-react-best-practices/rules/rerender-move-effect-to-event.md +0 -45
- package/template/.agents/skills/code/vercel-react-best-practices/rules/rerender-no-inline-components.md +0 -82
- package/template/.agents/skills/code/vercel-react-best-practices/rules/rerender-simple-expression-in-memo.md +0 -35
- package/template/.agents/skills/code/vercel-react-best-practices/rules/rerender-split-combined-hooks.md +0 -64
- package/template/.agents/skills/code/vercel-react-best-practices/rules/rerender-transitions.md +0 -40
- package/template/.agents/skills/code/vercel-react-best-practices/rules/rerender-use-deferred-value.md +0 -59
- package/template/.agents/skills/code/vercel-react-best-practices/rules/rerender-use-ref-transient-values.md +0 -73
- package/template/.agents/skills/code/vercel-react-best-practices/rules/server-after-nonblocking.md +0 -73
- package/template/.agents/skills/code/vercel-react-best-practices/rules/server-auth-actions.md +0 -96
- package/template/.agents/skills/code/vercel-react-best-practices/rules/server-cache-lru.md +0 -41
- package/template/.agents/skills/code/vercel-react-best-practices/rules/server-cache-react.md +0 -76
- package/template/.agents/skills/code/vercel-react-best-practices/rules/server-dedup-props.md +0 -65
- package/template/.agents/skills/code/vercel-react-best-practices/rules/server-hoist-static-io.md +0 -149
- package/template/.agents/skills/code/vercel-react-best-practices/rules/server-no-shared-module-state.md +0 -50
- package/template/.agents/skills/code/vercel-react-best-practices/rules/server-parallel-fetching.md +0 -83
- package/template/.agents/skills/code/vercel-react-best-practices/rules/server-parallel-nested-fetching.md +0 -34
- package/template/.agents/skills/code/vercel-react-best-practices/rules/server-serialization.md +0 -38
- package/template/.agents/skills/data/prisma-cli/SKILL.md +0 -247
- package/template/.agents/skills/data/prisma-cli/references/db-execute.md +0 -78
- package/template/.agents/skills/data/prisma-cli/references/db-pull.md +0 -185
- package/template/.agents/skills/data/prisma-cli/references/db-push.md +0 -148
- package/template/.agents/skills/data/prisma-cli/references/db-seed.md +0 -188
- package/template/.agents/skills/data/prisma-cli/references/debug.md +0 -46
- package/template/.agents/skills/data/prisma-cli/references/dev.md +0 -157
- package/template/.agents/skills/data/prisma-cli/references/format.md +0 -48
- package/template/.agents/skills/data/prisma-cli/references/generate.md +0 -173
- package/template/.agents/skills/data/prisma-cli/references/init.md +0 -136
- package/template/.agents/skills/data/prisma-cli/references/mcp.md +0 -38
- package/template/.agents/skills/data/prisma-cli/references/migrate-deploy.md +0 -127
- package/template/.agents/skills/data/prisma-cli/references/migrate-dev.md +0 -145
- package/template/.agents/skills/data/prisma-cli/references/migrate-diff.md +0 -89
- package/template/.agents/skills/data/prisma-cli/references/migrate-reset.md +0 -78
- package/template/.agents/skills/data/prisma-cli/references/migrate-resolve.md +0 -57
- package/template/.agents/skills/data/prisma-cli/references/migrate-status.md +0 -65
- package/template/.agents/skills/data/prisma-cli/references/studio.md +0 -137
- package/template/.agents/skills/data/prisma-cli/references/validate.md +0 -53
- package/template/.agents/skills/data/prisma-client-api/SKILL.md +0 -216
- package/template/.agents/skills/data/prisma-client-api/references/client-methods.md +0 -223
- package/template/.agents/skills/data/prisma-client-api/references/constructor.md +0 -208
- package/template/.agents/skills/data/prisma-client-api/references/filters.md +0 -256
- package/template/.agents/skills/data/prisma-client-api/references/model-queries.md +0 -281
- package/template/.agents/skills/data/prisma-client-api/references/query-options.md +0 -276
- package/template/.agents/skills/data/prisma-client-api/references/raw-queries.md +0 -194
- package/template/.agents/skills/data/prisma-client-api/references/relations.md +0 -308
- package/template/.agents/skills/data/prisma-client-api/references/transactions.md +0 -184
- package/template/.agents/skills/design/impeccable/SKILL.md +0 -84
- package/template/.agents/skills/design/impeccable/reference/adapt.md +0 -312
- package/template/.agents/skills/design/impeccable/reference/adapt.native.md +0 -58
- package/template/.agents/skills/design/impeccable/reference/android.md +0 -40
- package/template/.agents/skills/design/impeccable/reference/animate.md +0 -86
- package/template/.agents/skills/design/impeccable/reference/audit.md +0 -136
- package/template/.agents/skills/design/impeccable/reference/audit.native.md +0 -139
- package/template/.agents/skills/design/impeccable/reference/bolder.md +0 -31
- package/template/.agents/skills/design/impeccable/reference/clarify.md +0 -94
- package/template/.agents/skills/design/impeccable/reference/colorize.md +0 -86
- package/template/.agents/skills/design/impeccable/reference/craft-floor.md +0 -42
- package/template/.agents/skills/design/impeccable/reference/craft.md +0 -5
- package/template/.agents/skills/design/impeccable/reference/critique.md +0 -788
- package/template/.agents/skills/design/impeccable/reference/degraded/asset-producer.md +0 -90
- package/template/.agents/skills/design/impeccable/reference/degraded/documenter.md +0 -24
- package/template/.agents/skills/design/impeccable/reference/degraded/finish-reviewer.md +0 -37
- package/template/.agents/skills/design/impeccable/reference/degraded/manual-edit-applier.md +0 -92
- package/template/.agents/skills/design/impeccable/reference/delight.md +0 -70
- package/template/.agents/skills/design/impeccable/reference/distill.md +0 -111
- package/template/.agents/skills/design/impeccable/reference/doctor.md +0 -53
- package/template/.agents/skills/design/impeccable/reference/document.md +0 -416
- package/template/.agents/skills/design/impeccable/reference/extract.md +0 -69
- package/template/.agents/skills/design/impeccable/reference/harden.md +0 -336
- package/template/.agents/skills/design/impeccable/reference/hooks.md +0 -105
- package/template/.agents/skills/design/impeccable/reference/init.md +0 -125
- package/template/.agents/skills/design/impeccable/reference/ios.md +0 -45
- package/template/.agents/skills/design/impeccable/reference/layout.md +0 -84
- package/template/.agents/skills/design/impeccable/reference/live-setup.md +0 -102
- package/template/.agents/skills/design/impeccable/reference/live.md +0 -323
- package/template/.agents/skills/design/impeccable/reference/new-work.md +0 -105
- package/template/.agents/skills/design/impeccable/reference/onboard.md +0 -234
- package/template/.agents/skills/design/impeccable/reference/operate.md +0 -61
- package/template/.agents/skills/design/impeccable/reference/optimize.md +0 -258
- package/template/.agents/skills/design/impeccable/reference/overdrive.md +0 -127
- package/template/.agents/skills/design/impeccable/reference/polish.md +0 -97
- package/template/.agents/skills/design/impeccable/reference/quieter.md +0 -99
- package/template/.agents/skills/design/impeccable/reference/routing.md +0 -18
- package/template/.agents/skills/design/impeccable/reference/shape.md +0 -59
- package/template/.agents/skills/design/impeccable/reference/typeset.md +0 -80
- package/template/.agents/skills/design/impeccable/reference/visualize.md +0 -47
- package/template/.agents/skills/design/impeccable/scripts/command-metadata.json +0 -94
- package/template/.agents/skills/design/impeccable/scripts/concept-seed.mjs +0 -558
- package/template/.agents/skills/design/impeccable/scripts/context-signals.mjs +0 -334
- package/template/.agents/skills/design/impeccable/scripts/context.mjs +0 -1450
- package/template/.agents/skills/design/impeccable/scripts/critique-storage.mjs +0 -213
- package/template/.agents/skills/design/impeccable/scripts/detect-csp.mjs +0 -198
- package/template/.agents/skills/design/impeccable/scripts/detect.mjs +0 -21
- package/template/.agents/skills/design/impeccable/scripts/detector/browser/injected/index.mjs +0 -2023
- package/template/.agents/skills/design/impeccable/scripts/detector/cli/main.mjs +0 -438
- package/template/.agents/skills/design/impeccable/scripts/detector/design-system.mjs +0 -983
- package/template/.agents/skills/design/impeccable/scripts/detector/detect-antipatterns-browser.js +0 -8283
- package/template/.agents/skills/design/impeccable/scripts/detector/detect-antipatterns.mjs +0 -50
- package/template/.agents/skills/design/impeccable/scripts/detector/engines/browser/detect-url.mjs +0 -372
- package/template/.agents/skills/design/impeccable/scripts/detector/engines/regex/detect-text.mjs +0 -768
- package/template/.agents/skills/design/impeccable/scripts/detector/engines/static-html/css-cascade.mjs +0 -1186
- package/template/.agents/skills/design/impeccable/scripts/detector/engines/static-html/detect-html.mjs +0 -264
- package/template/.agents/skills/design/impeccable/scripts/detector/engines/visual/screenshot-contrast.mjs +0 -189
- package/template/.agents/skills/design/impeccable/scripts/detector/findings.mjs +0 -18
- package/template/.agents/skills/design/impeccable/scripts/detector/node/file-system.mjs +0 -212
- package/template/.agents/skills/design/impeccable/scripts/detector/profile/profiler.mjs +0 -166
- package/template/.agents/skills/design/impeccable/scripts/detector/registry/antipatterns.mjs +0 -617
- package/template/.agents/skills/design/impeccable/scripts/detector/rules/checks.mjs +0 -5580
- package/template/.agents/skills/design/impeccable/scripts/detector/shared/color.mjs +0 -124
- package/template/.agents/skills/design/impeccable/scripts/detector/shared/constants.mjs +0 -112
- package/template/.agents/skills/design/impeccable/scripts/detector/shared/fonts.mjs +0 -30
- package/template/.agents/skills/design/impeccable/scripts/detector/shared/inline-ignores.mjs +0 -148
- package/template/.agents/skills/design/impeccable/scripts/detector/shared/page.mjs +0 -7
- package/template/.agents/skills/design/impeccable/scripts/doctor.mjs +0 -336
- package/template/.agents/skills/design/impeccable/scripts/embed-prompt.mjs +0 -133
- package/template/.agents/skills/design/impeccable/scripts/generate-image.mjs +0 -240
- package/template/.agents/skills/design/impeccable/scripts/hook-admin.mjs +0 -741
- package/template/.agents/skills/design/impeccable/scripts/hook-before-edit.mjs +0 -516
- package/template/.agents/skills/design/impeccable/scripts/hook-lib.mjs +0 -2100
- package/template/.agents/skills/design/impeccable/scripts/hook.mjs +0 -78
- package/template/.agents/skills/design/impeccable/scripts/lib/artifact-schema.mjs +0 -93
- package/template/.agents/skills/design/impeccable/scripts/lib/composition-catalog.mjs +0 -200
- package/template/.agents/skills/design/impeccable/scripts/lib/concept-catalog.mjs +0 -357
- package/template/.agents/skills/design/impeccable/scripts/lib/design-parser.mjs +0 -842
- package/template/.agents/skills/design/impeccable/scripts/lib/impeccable-config.mjs +0 -658
- package/template/.agents/skills/design/impeccable/scripts/lib/impeccable-paths.mjs +0 -137
- package/template/.agents/skills/design/impeccable/scripts/lib/is-generated.mjs +0 -69
- package/template/.agents/skills/design/impeccable/scripts/lib/provider.mjs +0 -5
- package/template/.agents/skills/design/impeccable/scripts/lib/roll-selection.mjs +0 -362
- package/template/.agents/skills/design/impeccable/scripts/lib/staleness-deep.mjs +0 -457
- package/template/.agents/skills/design/impeccable/scripts/lib/staleness-notice.mjs +0 -169
- package/template/.agents/skills/design/impeccable/scripts/lib/staleness.mjs +0 -457
- package/template/.agents/skills/design/impeccable/scripts/lib/surface-briefs.mjs +0 -151
- package/template/.agents/skills/design/impeccable/scripts/lib/target-args.mjs +0 -42
- package/template/.agents/skills/design/impeccable/scripts/lib/target-slug.mjs +0 -33
- package/template/.agents/skills/design/impeccable/scripts/lib/template-extensions.mjs +0 -146
- package/template/.agents/skills/design/impeccable/scripts/live/accept-css.mjs +0 -617
- package/template/.agents/skills/design/impeccable/scripts/live/accept-verify.mjs +0 -60
- package/template/.agents/skills/design/impeccable/scripts/live/browser-script-parts.mjs +0 -55
- package/template/.agents/skills/design/impeccable/scripts/live/completion.mjs +0 -28
- package/template/.agents/skills/design/impeccable/scripts/live/event-validation.mjs +0 -199
- package/template/.agents/skills/design/impeccable/scripts/live/frameworks/astro.mjs +0 -47
- package/template/.agents/skills/design/impeccable/scripts/live/frameworks/detect-utils.mjs +0 -73
- package/template/.agents/skills/design/impeccable/scripts/live/frameworks/index.mjs +0 -143
- package/template/.agents/skills/design/impeccable/scripts/live/frameworks/journal.mjs +0 -197
- package/template/.agents/skills/design/impeccable/scripts/live/frameworks/nextjs.mjs +0 -49
- package/template/.agents/skills/design/impeccable/scripts/live/frameworks/nuxt.mjs +0 -161
- package/template/.agents/skills/design/impeccable/scripts/live/frameworks/script-src.mjs +0 -17
- package/template/.agents/skills/design/impeccable/scripts/live/frameworks/static-html.mjs +0 -26
- package/template/.agents/skills/design/impeccable/scripts/live/frameworks/sveltekit.mjs +0 -71
- package/template/.agents/skills/design/impeccable/scripts/live/frameworks/tag-strategy.mjs +0 -247
- package/template/.agents/skills/design/impeccable/scripts/live/frameworks/tanstack-start.mjs +0 -70
- package/template/.agents/skills/design/impeccable/scripts/live/frameworks/vite-generic.mjs +0 -42
- package/template/.agents/skills/design/impeccable/scripts/live/generation-preflight.mjs +0 -149
- package/template/.agents/skills/design/impeccable/scripts/live/insert-ui.mjs +0 -458
- package/template/.agents/skills/design/impeccable/scripts/live/instructions.mjs +0 -142
- package/template/.agents/skills/design/impeccable/scripts/live/manual-apply.mjs +0 -939
- package/template/.agents/skills/design/impeccable/scripts/live/manual-edit-routes.mjs +0 -357
- package/template/.agents/skills/design/impeccable/scripts/live/manual-edits-buffer.mjs +0 -152
- package/template/.agents/skills/design/impeccable/scripts/live/poll-lanes.mjs +0 -14
- package/template/.agents/skills/design/impeccable/scripts/live/roots.mjs +0 -508
- package/template/.agents/skills/design/impeccable/scripts/live/session-store.mjs +0 -563
- package/template/.agents/skills/design/impeccable/scripts/live/source-lock.mjs +0 -105
- package/template/.agents/skills/design/impeccable/scripts/live/source-search.mjs +0 -105
- package/template/.agents/skills/design/impeccable/scripts/live/svelte-ast.mjs +0 -961
- package/template/.agents/skills/design/impeccable/scripts/live/svelte-component.mjs +0 -1342
- package/template/.agents/skills/design/impeccable/scripts/live/sveltekit-adapter.mjs +0 -316
- package/template/.agents/skills/design/impeccable/scripts/live/tanstack-adapter.mjs +0 -280
- package/template/.agents/skills/design/impeccable/scripts/live/ui-core.mjs +0 -180
- package/template/.agents/skills/design/impeccable/scripts/live/vocabulary.mjs +0 -171
- package/template/.agents/skills/design/impeccable/scripts/live-accept.mjs +0 -954
- package/template/.agents/skills/design/impeccable/scripts/live-browser-dom.js +0 -146
- package/template/.agents/skills/design/impeccable/scripts/live-browser-session.js +0 -123
- package/template/.agents/skills/design/impeccable/scripts/live-browser.js +0 -12512
- package/template/.agents/skills/design/impeccable/scripts/live-commit-manual-edits.mjs +0 -1244
- package/template/.agents/skills/design/impeccable/scripts/live-complete.mjs +0 -107
- package/template/.agents/skills/design/impeccable/scripts/live-copy-edit-agent.mjs +0 -683
- package/template/.agents/skills/design/impeccable/scripts/live-discard-manual-edits.mjs +0 -51
- package/template/.agents/skills/design/impeccable/scripts/live-inject.mjs +0 -503
- package/template/.agents/skills/design/impeccable/scripts/live-insert.mjs +0 -292
- package/template/.agents/skills/design/impeccable/scripts/live-manual-edit-evidence.mjs +0 -368
- package/template/.agents/skills/design/impeccable/scripts/live-poll.mjs +0 -429
- package/template/.agents/skills/design/impeccable/scripts/live-resume.mjs +0 -123
- package/template/.agents/skills/design/impeccable/scripts/live-server.mjs +0 -1661
- package/template/.agents/skills/design/impeccable/scripts/live-status.mjs +0 -71
- package/template/.agents/skills/design/impeccable/scripts/live-target.mjs +0 -30
- package/template/.agents/skills/design/impeccable/scripts/live-wrap.mjs +0 -927
- package/template/.agents/skills/design/impeccable/scripts/live.mjs +0 -359
- package/template/.agents/skills/design/impeccable/scripts/modern-screenshot.umd.js +0 -14
- package/template/.agents/skills/design/impeccable/scripts/palette.mjs +0 -628
- package/template/.agents/skills/design/impeccable/scripts/pin.mjs +0 -221
- package/template/.agents/skills/design/impeccable/scripts/serve-question.mjs +0 -932
- package/template/.agents/skills/design/impeccable/scripts/surface-brief.mjs +0 -74
- package/template/.agents/skills/design/shadcn/SKILL.md +0 -277
- package/template/.agents/skills/design/shadcn/agents/openai.yml +0 -5
- package/template/.agents/skills/design/shadcn/assets/shadcn-small.png +0 -0
- package/template/.agents/skills/design/shadcn/assets/shadcn.png +0 -0
- package/template/.agents/skills/design/shadcn/cli.md +0 -290
- package/template/.agents/skills/design/shadcn/customization.md +0 -209
- package/template/.agents/skills/design/shadcn/evals/evals.json +0 -77
- package/template/.agents/skills/design/shadcn/mcp.md +0 -105
- package/template/.agents/skills/design/shadcn/registry.md +0 -277
- package/template/.agents/skills/design/shadcn/rules/base-vs-radix.md +0 -306
- package/template/.agents/skills/design/shadcn/rules/chat.md +0 -224
- package/template/.agents/skills/design/shadcn/rules/composition.md +0 -213
- package/template/.agents/skills/design/shadcn/rules/forms.md +0 -192
- package/template/.agents/skills/design/shadcn/rules/icons.md +0 -101
- package/template/.agents/skills/design/shadcn/rules/styling.md +0 -185
- package/template/.agents/skills/find-skills/SKILL.md +0 -141
- package/template/.agents/skills/hono/SKILL.md +0 -579
- package/template/.agents/skills/integrations/langfuse/SKILL.md +0 -146
- package/template/.agents/skills/integrations/langfuse/references/ci-cd.md +0 -41
- package/template/.agents/skills/integrations/langfuse/references/cli.md +0 -60
- package/template/.agents/skills/integrations/langfuse/references/error-analysis.md +0 -88
- package/template/.agents/skills/integrations/langfuse/references/instrumentation.md +0 -121
- package/template/.agents/skills/integrations/langfuse/references/judge-calibration.md +0 -291
- package/template/.agents/skills/integrations/langfuse/references/prompt-engineering.md +0 -35
- package/template/.agents/skills/integrations/langfuse/references/prompt-migration.md +0 -79
- package/template/.agents/skills/integrations/langfuse/references/skill-feedback.md +0 -55
- package/template/.agents/skills/integrations/langfuse/references/trace-evaluator-upgrade.md +0 -76
- package/template/.agents/skills/integrations/langfuse/references/user-feedback.md +0 -92
- package/template/.agents/skills/integrations/langfuse/references/v4-project-migration.md +0 -73
- package/template/.agents/skills/integrations/posthog/SKILL.md +0 -102
- package/template/.agents/skills/integrations/posthog/references/error-tracking-alerts.md +0 -63
- package/template/.agents/skills/integrations/posthog/references/error-tracking-assigning-issues.md +0 -77
- package/template/.agents/skills/integrations/posthog/references/error-tracking-fingerprints.md +0 -57
- package/template/.agents/skills/integrations/posthog/references/error-tracking-monitoring.md +0 -140
- package/template/.agents/skills/integrations/posthog/references/error-tracking-nextjs.md +0 -490
- package/template/.agents/skills/integrations/posthog/references/error-tracking-source-maps.md +0 -45
- package/template/.agents/skills/integrations/posthog/references/feature-flags-best-practices.md +0 -139
- package/template/.agents/skills/integrations/posthog/references/feature-flags-react.md +0 -302
- package/template/.agents/skills/integrations/posthog/references/identify-users.md +0 -202
- package/template/.agents/skills/integrations/posthog/references/integration-example.md +0 -706
- package/template/.agents/skills/integrations/posthog/references/integration-nextjs.md +0 -385
- package/template/.agents/skills/integrations/posthog/references/integration-step-1-begin.md +0 -43
- package/template/.agents/skills/integrations/posthog/references/integration-step-2-edit.md +0 -37
- package/template/.agents/skills/integrations/posthog/references/integration-step-3-revise.md +0 -22
- package/template/.agents/skills/integrations/posthog/references/integration-step-4-conclude.md +0 -38
- package/template/.agents/skills/integrations/posthog/references/llm-analytics-anthropic.md +0 -200
- package/template/.agents/skills/integrations/posthog/references/llm-analytics-basics.md +0 -62
- package/template/.agents/skills/integrations/posthog/references/llm-analytics-costs.md +0 -197
- package/template/.agents/skills/integrations/posthog/references/llm-analytics-manual-capture.md +0 -397
- package/template/.agents/skills/integrations/posthog/references/llm-analytics-traces.md +0 -98
- package/template/.agents/skills/integrations/posthog/references/llm-analytics-vercel-ai.md +0 -120
- package/template/.agents/skills/repo/repo-ci/SKILL.md +0 -265
- package/template/.agents/skills/repo/repo-init-next-js/SKILL.md +0 -129
- package/template/.agents/skills/repo/repo-init-next-js/references/file-contents.md +0 -800
- package/template/.agents/skills/repo/repo-init-next-js/scripts/setup.sh +0 -47
- package/template/.agents/skills/repo/repo-init-node/SKILL.md +0 -196
- package/template/.agents/skills/skill-creator/LICENSE.txt +0 -202
- package/template/.agents/skills/skill-creator/SKILL.md +0 -485
- package/template/.agents/skills/skill-creator/agents/analyzer.md +0 -274
- package/template/.agents/skills/skill-creator/agents/comparator.md +0 -202
- package/template/.agents/skills/skill-creator/agents/grader.md +0 -223
- package/template/.agents/skills/skill-creator/assets/eval_review.html +0 -146
- package/template/.agents/skills/skill-creator/eval-viewer/generate_review.py +0 -471
- package/template/.agents/skills/skill-creator/eval-viewer/viewer.html +0 -1325
- package/template/.agents/skills/skill-creator/references/schemas.md +0 -430
- package/template/.agents/skills/skill-creator/scripts/__init__.py +0 -0
- package/template/.agents/skills/skill-creator/scripts/aggregate_benchmark.py +0 -401
- package/template/.agents/skills/skill-creator/scripts/generate_report.py +0 -326
- package/template/.agents/skills/skill-creator/scripts/improve_description.py +0 -247
- package/template/.agents/skills/skill-creator/scripts/package_skill.py +0 -136
- package/template/.agents/skills/skill-creator/scripts/quick_validate.py +0 -103
- package/template/.agents/skills/skill-creator/scripts/run_eval.py +0 -310
- package/template/.agents/skills/skill-creator/scripts/run_loop.py +0 -328
- package/template/.agents/skills/skill-creator/scripts/utils.py +0 -47
- package/template/.agents/skills/supabase/CHANGELOG.md +0 -71
- package/template/.agents/skills/supabase/SKILL.md +0 -145
- package/template/.agents/skills/supabase/assets/feedback-issue-template.md +0 -17
- package/template/.agents/skills/supabase/references/skill-feedback.md +0 -17
- package/template/.agents/skills/supabase-postgres-best-practices/CHANGELOG.md +0 -73
- package/template/.agents/skills/supabase-postgres-best-practices/SKILL.md +0 -64
- package/template/.agents/skills/supabase-postgres-best-practices/references/_contributing.md +0 -170
- package/template/.agents/skills/supabase-postgres-best-practices/references/_sections.md +0 -39
- package/template/.agents/skills/supabase-postgres-best-practices/references/_template.md +0 -34
- package/template/.agents/skills/supabase-postgres-best-practices/references/advanced-full-text-search.md +0 -55
- package/template/.agents/skills/supabase-postgres-best-practices/references/advanced-jsonb-indexing.md +0 -49
- package/template/.agents/skills/supabase-postgres-best-practices/references/conn-idle-timeout.md +0 -46
- package/template/.agents/skills/supabase-postgres-best-practices/references/conn-limits.md +0 -44
- package/template/.agents/skills/supabase-postgres-best-practices/references/conn-pooling.md +0 -41
- package/template/.agents/skills/supabase-postgres-best-practices/references/conn-prepared-statements.md +0 -46
- package/template/.agents/skills/supabase-postgres-best-practices/references/data-batch-inserts.md +0 -54
- package/template/.agents/skills/supabase-postgres-best-practices/references/data-n-plus-one.md +0 -53
- package/template/.agents/skills/supabase-postgres-best-practices/references/data-pagination.md +0 -50
- package/template/.agents/skills/supabase-postgres-best-practices/references/data-upsert.md +0 -50
- package/template/.agents/skills/supabase-postgres-best-practices/references/lock-advisory.md +0 -56
- package/template/.agents/skills/supabase-postgres-best-practices/references/lock-deadlock-prevention.md +0 -68
- package/template/.agents/skills/supabase-postgres-best-practices/references/lock-short-transactions.md +0 -50
- package/template/.agents/skills/supabase-postgres-best-practices/references/lock-skip-locked.md +0 -54
- package/template/.agents/skills/supabase-postgres-best-practices/references/monitor-explain-analyze.md +0 -45
- package/template/.agents/skills/supabase-postgres-best-practices/references/monitor-pg-stat-statements.md +0 -55
- package/template/.agents/skills/supabase-postgres-best-practices/references/monitor-vacuum-analyze.md +0 -55
- package/template/.agents/skills/supabase-postgres-best-practices/references/query-composite-indexes.md +0 -44
- package/template/.agents/skills/supabase-postgres-best-practices/references/query-covering-indexes.md +0 -40
- package/template/.agents/skills/supabase-postgres-best-practices/references/query-index-types.md +0 -48
- package/template/.agents/skills/supabase-postgres-best-practices/references/query-missing-indexes.md +0 -43
- package/template/.agents/skills/supabase-postgres-best-practices/references/query-partial-indexes.md +0 -45
- package/template/.agents/skills/supabase-postgres-best-practices/references/schema-constraints.md +0 -80
- package/template/.agents/skills/supabase-postgres-best-practices/references/schema-data-types.md +0 -46
- package/template/.agents/skills/supabase-postgres-best-practices/references/schema-foreign-key-indexes.md +0 -59
- package/template/.agents/skills/supabase-postgres-best-practices/references/schema-lowercase-identifiers.md +0 -55
- package/template/.agents/skills/supabase-postgres-best-practices/references/schema-partitioning.md +0 -55
- package/template/.agents/skills/supabase-postgres-best-practices/references/schema-primary-keys.md +0 -61
- package/template/.agents/skills/supabase-postgres-best-practices/references/security-privileges.md +0 -54
- package/template/.agents/skills/supabase-postgres-best-practices/references/security-rls-basics.md +0 -50
- package/template/.agents/skills/supabase-postgres-best-practices/references/security-rls-performance.md +0 -63
- package/template/.agents/skills/writing/humanizer/SKILL.md +0 -621
- package/template/.agents/upstreams.json +0 -116
|
@@ -1,74 +0,0 @@
|
|
|
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,277 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: shadcn
|
|
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
|
-
user-invocable: false
|
|
5
|
-
allowed-tools: Bash(npx shadcn@latest *), Bash(pnpm dlx shadcn@latest *), Bash(bunx --bun shadcn@latest *)
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# shadcn/ui
|
|
9
|
-
|
|
10
|
-
A framework for building ui, components and design systems. Components are added as source code to the user's project via the CLI.
|
|
11
|
-
|
|
12
|
-
> **IMPORTANT:** Run all CLI commands using the project's package runner: `npx shadcn@latest`, `pnpm dlx shadcn@latest`, or `bunx --bun shadcn@latest` — based on the project's `packageManager`. Examples below use `npx shadcn@latest` but substitute the correct runner for the project.
|
|
13
|
-
|
|
14
|
-
## Current Project Context
|
|
15
|
-
|
|
16
|
-
```json
|
|
17
|
-
!`npx shadcn@latest info --json`
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
The JSON above contains the project config and installed components. Use `npx shadcn@latest docs <component>` to get documentation and example URLs for any component.
|
|
21
|
-
|
|
22
|
-
## Principles
|
|
23
|
-
|
|
24
|
-
1. **Use existing components first.** Use `npx shadcn@latest search` to check registries before writing custom UI. Check community registries too.
|
|
25
|
-
2. **Compose, don't reinvent.** Settings page = Tabs + Card + form controls. Dashboard = Sidebar + Card + Chart + Table.
|
|
26
|
-
3. **Use built-in variants before custom styles.** `variant="outline"`, `size="sm"`, etc.
|
|
27
|
-
4. **Use semantic colors.** `bg-primary`, `text-muted-foreground` — never raw values like `bg-blue-500`.
|
|
28
|
-
|
|
29
|
-
## Critical Rules
|
|
30
|
-
|
|
31
|
-
These rules are **always enforced**. Each links to a file with Incorrect/Correct code pairs.
|
|
32
|
-
|
|
33
|
-
### Styling & Tailwind → [styling.md](./rules/styling.md)
|
|
34
|
-
|
|
35
|
-
- **`className` for layout, not styling.** Never override component colors or typography.
|
|
36
|
-
- **No `space-x-*` or `space-y-*`.** Use `flex` with `gap-*`. For vertical stacks, `flex flex-col gap-*`.
|
|
37
|
-
- **Use `size-*` when width and height are equal.** `size-10` not `w-10 h-10`.
|
|
38
|
-
- **Use `truncate` shorthand.** Not `overflow-hidden text-ellipsis whitespace-nowrap`.
|
|
39
|
-
- **No manual `dark:` color overrides.** Use semantic tokens (`bg-background`, `text-muted-foreground`).
|
|
40
|
-
- **Use `cn()` for conditional classes.** Don't write manual template literal ternaries.
|
|
41
|
-
- **No manual `z-index` on overlay components.** Dialog, Sheet, Popover, etc. handle their own stacking.
|
|
42
|
-
|
|
43
|
-
### Forms & Inputs → [forms.md](./rules/forms.md)
|
|
44
|
-
|
|
45
|
-
- **Forms use `FieldGroup` + `Field`.** Never use raw `div` with `space-y-*` or `grid gap-*` for form layout.
|
|
46
|
-
- **`InputGroup` uses `InputGroupInput`/`InputGroupTextarea`.** Never raw `Input`/`Textarea` inside `InputGroup`.
|
|
47
|
-
- **Buttons inside inputs use `InputGroup` + `InputGroupAddon`.**
|
|
48
|
-
- **Option sets (2–7 choices) use `ToggleGroup`.** Don't loop `Button` with manual active state.
|
|
49
|
-
- **`FieldSet` + `FieldLegend` for grouping related checkboxes/radios.** Don't use a `div` with a heading.
|
|
50
|
-
- **Field validation uses `data-invalid` + `aria-invalid`.** `data-invalid` on `Field`, `aria-invalid` on the control. For disabled: `data-disabled` on `Field`, `disabled` on the control.
|
|
51
|
-
|
|
52
|
-
### Component Structure → [composition.md](./rules/composition.md)
|
|
53
|
-
|
|
54
|
-
- **Items always inside their Group.** `SelectItem` → `SelectGroup`. `DropdownMenuItem` → `DropdownMenuGroup`. `CommandItem` → `CommandGroup`.
|
|
55
|
-
- **Use `asChild` (radix) or `render` (base) for custom triggers.** Check `base` field from `npx shadcn@latest info`. → [base-vs-radix.md](./rules/base-vs-radix.md)
|
|
56
|
-
- **Dialog, Sheet, and Drawer always need a Title.** `DialogTitle`, `SheetTitle`, `DrawerTitle` required for accessibility. Use `className="sr-only"` if visually hidden.
|
|
57
|
-
- **Use full Card composition.** `CardHeader`/`CardTitle`/`CardDescription`/`CardContent`/`CardFooter`. Don't dump everything in `CardContent`.
|
|
58
|
-
- **Button has no `isPending`/`isLoading`.** Compose with `Spinner` + `data-icon` + `disabled`.
|
|
59
|
-
- **`TabsTrigger` must be inside `TabsList`.** Never render triggers directly in `Tabs`.
|
|
60
|
-
- **`Avatar` always needs `AvatarFallback`.** For when the image fails to load.
|
|
61
|
-
|
|
62
|
-
### Use Components, Not Custom Markup → [composition.md](./rules/composition.md)
|
|
63
|
-
|
|
64
|
-
- **Use existing components before custom markup.** Check if a component exists before writing a styled `div`.
|
|
65
|
-
- **Callouts use `Alert`.** Don't build custom styled divs.
|
|
66
|
-
- **Empty states use `Empty`.** Don't build custom empty state markup.
|
|
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.
|
|
70
|
-
- **Use `Separator`** instead of `<hr>` or `<div className="border-t">`.
|
|
71
|
-
- **Use `Skeleton`** for loading placeholders. No custom `animate-pulse` divs.
|
|
72
|
-
- **Use `Badge`** instead of custom styled spans.
|
|
73
|
-
|
|
74
|
-
### Icons → [icons.md](./rules/icons.md)
|
|
75
|
-
|
|
76
|
-
- **Icons in `Button` use `data-icon`.** `data-icon="inline-start"` or `data-icon="inline-end"` on the icon.
|
|
77
|
-
- **No sizing classes on icons inside components.** Components handle icon sizing via CSS. No `size-4` or `w-4 h-4`.
|
|
78
|
-
- **Pass icons as objects, not string keys.** `icon={CheckIcon}`, not a string lookup.
|
|
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
|
-
|
|
86
|
-
### CLI
|
|
87
|
-
|
|
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.
|
|
90
|
-
|
|
91
|
-
## Key Patterns
|
|
92
|
-
|
|
93
|
-
These are the most common patterns that differentiate correct shadcn/ui code. For edge cases, see the linked rule files above.
|
|
94
|
-
|
|
95
|
-
```tsx
|
|
96
|
-
// Form layout: FieldGroup + Field, not div + Label.
|
|
97
|
-
<FieldGroup>
|
|
98
|
-
<Field>
|
|
99
|
-
<FieldLabel htmlFor="email">Email</FieldLabel>
|
|
100
|
-
<Input id="email" />
|
|
101
|
-
</Field>
|
|
102
|
-
</FieldGroup>
|
|
103
|
-
|
|
104
|
-
// Validation: data-invalid on Field, aria-invalid on the control.
|
|
105
|
-
<Field data-invalid>
|
|
106
|
-
<FieldLabel>Email</FieldLabel>
|
|
107
|
-
<Input aria-invalid />
|
|
108
|
-
<FieldDescription>Invalid email.</FieldDescription>
|
|
109
|
-
</Field>
|
|
110
|
-
|
|
111
|
-
// Icons in buttons: data-icon, no sizing classes.
|
|
112
|
-
<Button>
|
|
113
|
-
<SearchIcon data-icon="inline-start" />
|
|
114
|
-
Search
|
|
115
|
-
</Button>
|
|
116
|
-
|
|
117
|
-
// Spacing: gap-*, not space-y-*.
|
|
118
|
-
<div className="flex flex-col gap-4"> // correct
|
|
119
|
-
<div className="space-y-4"> // wrong
|
|
120
|
-
|
|
121
|
-
// Equal dimensions: size-*, not w-* h-*.
|
|
122
|
-
<Avatar className="size-10"> // correct
|
|
123
|
-
<Avatar className="w-10 h-10"> // wrong
|
|
124
|
-
|
|
125
|
-
// Status colors: Badge variants or semantic tokens, not raw colors.
|
|
126
|
-
<Badge variant="secondary">+20.1%</Badge> // correct
|
|
127
|
-
<span className="text-emerald-600">+20.1%</span> // wrong
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
## Component Selection
|
|
131
|
-
|
|
132
|
-
| Need | Use |
|
|
133
|
-
| -------------------------- | --------------------------------------------------------------------------------------------------- |
|
|
134
|
-
| Button/action | `Button` with appropriate variant |
|
|
135
|
-
| Form inputs | `Input`, `Select`, `Combobox`, `Switch`, `Checkbox`, `RadioGroup`, `Textarea`, `InputOTP`, `Slider` |
|
|
136
|
-
| Toggle between 2–5 options | `ToggleGroup` + `ToggleGroupItem` |
|
|
137
|
-
| Data display | `Table`, `Card`, `Badge`, `Avatar` |
|
|
138
|
-
| Navigation | `Sidebar`, `NavigationMenu`, `Breadcrumb`, `Tabs`, `Pagination` |
|
|
139
|
-
| Overlays | `Dialog` (modal), `Sheet` (side panel), `Drawer` (bottom sheet), `AlertDialog` (confirmation) |
|
|
140
|
-
| Feedback | `toast` (Base UI), `sonner` (Radix/Aria), `Alert`, `Progress`, `Skeleton`, `Spinner` |
|
|
141
|
-
| Command palette | `Command` inside `Dialog` |
|
|
142
|
-
| Charts | `Chart` (wraps Recharts) |
|
|
143
|
-
| Layout | `Card`, `Separator`, `Resizable`, `ScrollArea`, `Accordion`, `Collapsible` |
|
|
144
|
-
| Empty states | `Empty` |
|
|
145
|
-
| Menus | `DropdownMenu`, `ContextMenu`, `Menubar` |
|
|
146
|
-
| Tooltips/info | `Tooltip`, `HoverCard`, `Popover` |
|
|
147
|
-
| Chat / conversation UI | `MessageScroller`, `Message`, `Bubble`, `Attachment`, `Marker` |
|
|
148
|
-
|
|
149
|
-
## Key Fields
|
|
150
|
-
|
|
151
|
-
The injected project context contains these key fields:
|
|
152
|
-
|
|
153
|
-
- **`aliases`** → use the actual alias prefix for imports (e.g. `@/`, `~/`), never hardcode.
|
|
154
|
-
- **`isRSC`** → when `true`, components using `useState`, `useEffect`, event handlers, or browser APIs need `"use client"` at the top of the file. Always reference this field when advising on the directive.
|
|
155
|
-
- **`tailwindVersion`** → `"v4"` uses `@theme inline` blocks; `"v3"` uses `tailwind.config.js`.
|
|
156
|
-
- **`tailwindCssFile`** → the global CSS file where custom CSS variables are defined. Always edit this file, never create a new one.
|
|
157
|
-
- **`style`** → component visual treatment (e.g. `nova`, `vega`).
|
|
158
|
-
- **`base`** → primitive library (`radix` or `base`). Affects component APIs and available props.
|
|
159
|
-
- **`iconLibrary`** → determines icon imports. Use `lucide-react` for `lucide`, `@tabler/icons-react` for `tabler`, etc. Never assume `lucide-react`.
|
|
160
|
-
- **`resolvedPaths`** → exact file-system destinations for components, utils, hooks, etc.
|
|
161
|
-
- **`framework`** → routing and file conventions (e.g. Next.js App Router vs Vite SPA).
|
|
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.
|
|
164
|
-
|
|
165
|
-
See [cli.md — `info` command](./cli.md) for the full field reference.
|
|
166
|
-
|
|
167
|
-
## Component Docs, Examples, and Usage
|
|
168
|
-
|
|
169
|
-
Run `npx shadcn@latest docs <component>` to get the URLs for a component's documentation, examples, and API reference. Fetch these URLs to get the actual content.
|
|
170
|
-
|
|
171
|
-
```bash
|
|
172
|
-
npx shadcn@latest docs button dialog select
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
**When creating, fixing, debugging, or using a component, always run `npx shadcn@latest docs` and fetch the URLs first.** This ensures you're working with the correct API and usage patterns rather than guessing.
|
|
176
|
-
|
|
177
|
-
## Workflow
|
|
178
|
-
|
|
179
|
-
1. **Get project context** — already injected above. Run `npx shadcn@latest info` again if you need to refresh.
|
|
180
|
-
2. **Check installed components first** — before running `add`, always check the `components` list from project context or list the `resolvedPaths.ui` directory. Don't import components that haven't been added, and don't re-add ones already installed.
|
|
181
|
-
3. **Find components** — `npx shadcn@latest search`.
|
|
182
|
-
4. **Get docs and examples** — run `npx shadcn@latest docs <component>` to get URLs, then fetch them. Use `npx shadcn@latest view` to browse registry items you haven't installed. To preview changes to installed components, use `npx shadcn@latest add --diff`.
|
|
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).
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
193
|
-
- **Skip**: `npx shadcn@latest init --preset <code> --force --no-reinstall`. Only updates config and CSS, leaves components as-is.
|
|
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.
|
|
195
|
-
|
|
196
|
-
## Updating Components
|
|
197
|
-
|
|
198
|
-
When the user asks to update a component from upstream while keeping their local changes, use `--dry-run` and `--diff` to intelligently merge. **NEVER fetch raw files from GitHub manually — always use the CLI.**
|
|
199
|
-
|
|
200
|
-
1. Run `npx shadcn@latest add <component> --dry-run` to see all files that would be affected.
|
|
201
|
-
2. For each file, run `npx shadcn@latest add <component> --diff <file>` to see what changed upstream vs local.
|
|
202
|
-
3. Decide per file based on the diff:
|
|
203
|
-
- No local changes → safe to overwrite.
|
|
204
|
-
- Has local changes → read the local file, analyze the diff, and apply upstream updates while preserving local modifications.
|
|
205
|
-
- User says "just update everything" → use `--overwrite`, but confirm first.
|
|
206
|
-
4. **Never use `--overwrite` without the user's explicit approval.**
|
|
207
|
-
|
|
208
|
-
## Quick Reference
|
|
209
|
-
|
|
210
|
-
```bash
|
|
211
|
-
# Create a new project.
|
|
212
|
-
npx shadcn@latest init --name my-app --preset base-nova
|
|
213
|
-
npx shadcn@latest init --name my-app --preset a2r6bw --template vite
|
|
214
|
-
|
|
215
|
-
# Create a monorepo project.
|
|
216
|
-
npx shadcn@latest init --name my-app --preset base-nova --monorepo
|
|
217
|
-
npx shadcn@latest init --name my-app --preset base-nova --template next --monorepo
|
|
218
|
-
|
|
219
|
-
# Initialize existing project.
|
|
220
|
-
npx shadcn@latest init --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
|
|
235
|
-
|
|
236
|
-
# Add components.
|
|
237
|
-
npx shadcn@latest add button card dialog
|
|
238
|
-
npx shadcn@latest add @magicui/shimmer-button
|
|
239
|
-
npx shadcn@latest add owner/repo/item
|
|
240
|
-
npx shadcn@latest add --all
|
|
241
|
-
|
|
242
|
-
# Preview changes before adding/updating.
|
|
243
|
-
npx shadcn@latest add button --dry-run
|
|
244
|
-
npx shadcn@latest add button --diff button.tsx
|
|
245
|
-
npx shadcn@latest add @acme/form --view button.tsx
|
|
246
|
-
npx shadcn@latest add owner/repo/item --dry-run
|
|
247
|
-
|
|
248
|
-
# Search registries.
|
|
249
|
-
npx shadcn@latest search @shadcn -q "sidebar"
|
|
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
|
|
254
|
-
|
|
255
|
-
# Get component docs and example URLs.
|
|
256
|
-
npx shadcn@latest docs button dialog select
|
|
257
|
-
|
|
258
|
-
# View registry item details (for items not yet installed).
|
|
259
|
-
npx shadcn@latest view @shadcn/button
|
|
260
|
-
npx shadcn@latest view owner/repo/item
|
|
261
|
-
```
|
|
262
|
-
|
|
263
|
-
**Named presets:** `nova`, `vega`, `maia`, `lyra`, `mira`, `luma`
|
|
264
|
-
**Templates:** `next`, `vite`, `start`, `react-router`, `astro` (all support `--monorepo`) and `laravel` (not supported for monorepo)
|
|
265
|
-
**Preset codes:** Version-prefixed base62 strings (e.g. `a2r6bw` or `b0`), from [ui.shadcn.com](https://ui.shadcn.com).
|
|
266
|
-
|
|
267
|
-
## Detailed References
|
|
268
|
-
|
|
269
|
-
- [rules/forms.md](./rules/forms.md) — FieldGroup, Field, InputGroup, ToggleGroup, FieldSet, validation states
|
|
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
|
|
272
|
-
- [rules/icons.md](./rules/icons.md) — data-icon, icon sizing, passing icons as objects
|
|
273
|
-
- [rules/styling.md](./rules/styling.md) — Semantic colors, variants, className, spacing, size, truncate, dark mode, cn(), z-index
|
|
274
|
-
- [rules/base-vs-radix.md](./rules/base-vs-radix.md) — asChild vs render, Select, ToggleGroup, Slider, Accordion
|
|
275
|
-
- [cli.md](./cli.md) — Commands, flags, presets, templates
|
|
276
|
-
- [registry.md](./registry.md) — Authoring source registries, `include`, item definitions, dependencies, GitHub registry rules
|
|
277
|
-
- [customization.md](./customization.md) — Theming, CSS variables, extending components
|
|
Binary file
|
|
Binary file
|
|
@@ -1,290 +0,0 @@
|
|
|
1
|
-
# shadcn CLI Reference
|
|
2
|
-
|
|
3
|
-
Configuration is read from `components.json`.
|
|
4
|
-
|
|
5
|
-
> **IMPORTANT:** Always run commands using the project's package runner: `npx shadcn@latest`, `pnpm dlx shadcn@latest`, or `bunx --bun shadcn@latest`. Check `packageManager` from project context to choose the right one. Examples below use `npx shadcn@latest` but substitute the correct runner for the project.
|
|
6
|
-
|
|
7
|
-
> **IMPORTANT:** Only use the flags documented below. Do not invent or guess flags — if a flag isn't listed here, it doesn't exist. The CLI auto-detects the package manager from the project's lockfile; there is no `--package-manager` flag.
|
|
8
|
-
|
|
9
|
-
## Contents
|
|
10
|
-
|
|
11
|
-
- Commands: init, apply, add (dry-run, smart merge), search, view, docs, info, build
|
|
12
|
-
- Templates: next, vite, start, react-router, astro
|
|
13
|
-
- Presets: named, code, URL formats and fields
|
|
14
|
-
- Switching presets
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## Commands
|
|
19
|
-
|
|
20
|
-
### `init` — Initialize or create a project
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
npx shadcn@latest init [components...] [options]
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
Initializes shadcn/ui in an existing project or creates a new project (when `--name` is provided). Optionally installs components in the same step.
|
|
27
|
-
|
|
28
|
-
| Flag | Short | Description | Default |
|
|
29
|
-
| ----------------------- | ----- | --------------------------------------------------------- | ------- |
|
|
30
|
-
| `--template <template>` | `-t` | Template (next, start, vite, next-monorepo, react-router) | — |
|
|
31
|
-
| `--preset [name]` | `-p` | Preset configuration (named, code, or URL) | — |
|
|
32
|
-
| `--yes` | `-y` | Skip confirmation prompt | `true` |
|
|
33
|
-
| `--defaults` | `-d` | Use defaults (`--template=next --preset=base-nova`) | `false` |
|
|
34
|
-
| `--force` | `-f` | Force overwrite existing configuration | `false` |
|
|
35
|
-
| `--cwd <cwd>` | `-c` | Working directory | current |
|
|
36
|
-
| `--name <name>` | `-n` | Name for new project | — |
|
|
37
|
-
| `--silent` | `-s` | Mute output | `false` |
|
|
38
|
-
| `--rtl` | | Enable RTL support | — |
|
|
39
|
-
| `--reinstall` | | Re-install existing UI components | `false` |
|
|
40
|
-
| `--monorepo` | | Scaffold a monorepo project | — |
|
|
41
|
-
| `--no-monorepo` | | Skip the monorepo prompt | — |
|
|
42
|
-
|
|
43
|
-
`npx shadcn@latest create` is an alias for `npx shadcn@latest init`.
|
|
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
|
-
|
|
63
|
-
### `add` — Add components
|
|
64
|
-
|
|
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.
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
npx shadcn@latest add [components...] [options]
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
Accepts component names, registry-prefixed names (`@magicui/shimmer-button`),
|
|
72
|
-
GitHub item addresses (`owner/repo/item`), URLs, or local paths.
|
|
73
|
-
|
|
74
|
-
| Flag | Short | Description | Default |
|
|
75
|
-
| --------------- | ----- | -------------------------------------------------------------------------------------------------------------------- | ------- |
|
|
76
|
-
| `--yes` | `-y` | Skip confirmation prompt | `false` |
|
|
77
|
-
| `--overwrite` | `-o` | Overwrite existing files | `false` |
|
|
78
|
-
| `--cwd <cwd>` | `-c` | Working directory | current |
|
|
79
|
-
| `--all` | `-a` | Add all available components | `false` |
|
|
80
|
-
| `--path <path>` | `-p` | Target path for the component | — |
|
|
81
|
-
| `--silent` | `-s` | Mute output | `false` |
|
|
82
|
-
| `--dry-run` | | Preview all changes without writing files | `false` |
|
|
83
|
-
| `--diff [path]` | | Show diffs. Without a path, shows the first 5 files. With a path, shows that file only (implies `--dry-run`) | — |
|
|
84
|
-
| `--view [path]` | | Show file contents. Without a path, shows the first 5 files. With a path, shows that file only (implies `--dry-run`) | — |
|
|
85
|
-
|
|
86
|
-
#### Dry-Run Mode
|
|
87
|
-
|
|
88
|
-
Use `--dry-run` to preview what `add` would do without writing any files. `--diff` and `--view` both imply `--dry-run`.
|
|
89
|
-
|
|
90
|
-
```bash
|
|
91
|
-
# Preview all changes.
|
|
92
|
-
npx shadcn@latest add button --dry-run
|
|
93
|
-
|
|
94
|
-
# Show diffs for all files (top 5).
|
|
95
|
-
npx shadcn@latest add button --diff
|
|
96
|
-
|
|
97
|
-
# Show the diff for a specific file.
|
|
98
|
-
npx shadcn@latest add button --diff button.tsx
|
|
99
|
-
|
|
100
|
-
# Show contents for all files (top 5).
|
|
101
|
-
npx shadcn@latest add button --view
|
|
102
|
-
|
|
103
|
-
# Show the full content of a specific file.
|
|
104
|
-
npx shadcn@latest add button --view button.tsx
|
|
105
|
-
|
|
106
|
-
# Works with URLs too.
|
|
107
|
-
npx shadcn@latest add https://api.npoint.io/abc123 --dry-run
|
|
108
|
-
|
|
109
|
-
# Works with public GitHub registries too.
|
|
110
|
-
npx shadcn@latest add owner/repo/item --dry-run
|
|
111
|
-
|
|
112
|
-
# CSS diffs.
|
|
113
|
-
npx shadcn@latest add button --diff globals.css
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
**When to use dry-run:**
|
|
117
|
-
|
|
118
|
-
- When the user asks "what files will this add?" or "what will this change?" — use `--dry-run`.
|
|
119
|
-
- Before overwriting existing components — use `--diff` to preview the changes first.
|
|
120
|
-
- When the user wants to inspect component source code without installing — use `--view`.
|
|
121
|
-
- When checking what CSS changes would be made to `globals.css` — use `--diff globals.css`.
|
|
122
|
-
- When the user asks to review or audit third-party registry code before installing — use `--view` to inspect the source.
|
|
123
|
-
|
|
124
|
-
> **`npx shadcn@latest add --dry-run` vs `npx shadcn@latest view`:** Prefer `npx shadcn@latest add --dry-run/--diff/--view` over `npx shadcn@latest view` when the user wants to preview changes to their project. `npx shadcn@latest view` only shows raw registry metadata. `npx shadcn@latest add --dry-run` shows exactly what would happen in the user's project: resolved file paths, diffs against existing files, and CSS updates. Use `npx shadcn@latest view` only when the user wants to browse registry info without a project context.
|
|
125
|
-
|
|
126
|
-
#### Smart Merge from Upstream
|
|
127
|
-
|
|
128
|
-
See [Updating Components in SKILL.md](./SKILL.md#updating-components) for the full workflow.
|
|
129
|
-
|
|
130
|
-
### `search` — Search registries
|
|
131
|
-
|
|
132
|
-
```bash
|
|
133
|
-
npx shadcn@latest search [registries...] [options]
|
|
134
|
-
```
|
|
135
|
-
|
|
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`.
|
|
140
|
-
|
|
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 |
|
|
149
|
-
|
|
150
|
-
### `view` — View item details
|
|
151
|
-
|
|
152
|
-
```bash
|
|
153
|
-
npx shadcn@latest view <items...> [options]
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
Displays item info including file contents. Examples:
|
|
157
|
-
`npx shadcn@latest view @shadcn/button`,
|
|
158
|
-
`npx shadcn@latest view owner/repo/item`.
|
|
159
|
-
|
|
160
|
-
### `docs` — Get component documentation URLs
|
|
161
|
-
|
|
162
|
-
```bash
|
|
163
|
-
npx shadcn@latest docs <components...> [options]
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
Outputs resolved URLs for component documentation, examples, and API references. Accepts one or more component names. Fetch the URLs to get the actual content.
|
|
167
|
-
|
|
168
|
-
Example output for `npx shadcn@latest docs input button`:
|
|
169
|
-
|
|
170
|
-
```
|
|
171
|
-
base radix
|
|
172
|
-
|
|
173
|
-
input
|
|
174
|
-
docs https://ui.shadcn.com/docs/components/radix/input
|
|
175
|
-
examples https://raw.githubusercontent.com/.../examples/input-example.tsx
|
|
176
|
-
|
|
177
|
-
button
|
|
178
|
-
docs https://ui.shadcn.com/docs/components/radix/button
|
|
179
|
-
examples https://raw.githubusercontent.com/.../examples/button-example.tsx
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
Some components include an `api` link to the underlying library (e.g. `cmdk` for the command component).
|
|
183
|
-
|
|
184
|
-
### `diff` — Check for updates
|
|
185
|
-
|
|
186
|
-
Do not use this command. Use `npx shadcn@latest add --diff` instead.
|
|
187
|
-
|
|
188
|
-
### `info` — Project information
|
|
189
|
-
|
|
190
|
-
```bash
|
|
191
|
-
npx shadcn@latest info [options]
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
Displays project info and `components.json` configuration. Run this first to discover the project's framework, aliases, Tailwind version, and resolved paths.
|
|
195
|
-
|
|
196
|
-
| Flag | Short | Description | Default |
|
|
197
|
-
| ------------- | ----- | ----------------- | ------- |
|
|
198
|
-
| `--cwd <cwd>` | `-c` | Working directory | current |
|
|
199
|
-
|
|
200
|
-
**Project Info fields:**
|
|
201
|
-
|
|
202
|
-
| Field | Type | Meaning |
|
|
203
|
-
| -------------------- | --------- | ------------------------------------------------------------------ |
|
|
204
|
-
| `framework` | `string` | Detected framework (`next`, `vite`, `react-router`, `start`, etc.) |
|
|
205
|
-
| `frameworkVersion` | `string` | Framework version (e.g. `15.2.4`) |
|
|
206
|
-
| `isSrcDir` | `boolean` | Whether the project uses a `src/` directory |
|
|
207
|
-
| `isRSC` | `boolean` | Whether React Server Components are enabled |
|
|
208
|
-
| `isTsx` | `boolean` | Whether the project uses TypeScript |
|
|
209
|
-
| `tailwindVersion` | `string` | `"v3"` or `"v4"` |
|
|
210
|
-
| `tailwindConfigFile` | `string` | Path to the Tailwind config file |
|
|
211
|
-
| `tailwindCssFile` | `string` | Path to the global CSS file |
|
|
212
|
-
| `aliasPrefix` | `string` | Import alias prefix (e.g. `@`, `~`, `@/`) |
|
|
213
|
-
| `packageManager` | `string` | Detected package manager (`npm`, `pnpm`, `yarn`, `bun`) |
|
|
214
|
-
|
|
215
|
-
**Components.json fields:**
|
|
216
|
-
|
|
217
|
-
| Field | Type | Meaning |
|
|
218
|
-
| -------------------- | --------- | ------------------------------------------------------------------------------------------ |
|
|
219
|
-
| `base` | `string` | Primitive library (`radix` or `base`) — determines component APIs and available props |
|
|
220
|
-
| `style` | `string` | Visual style (e.g. `nova`, `vega`) |
|
|
221
|
-
| `rsc` | `boolean` | RSC flag from config |
|
|
222
|
-
| `tsx` | `boolean` | TypeScript flag |
|
|
223
|
-
| `tailwind.config` | `string` | Tailwind config path |
|
|
224
|
-
| `tailwind.css` | `string` | Global CSS path — this is where custom CSS variables go |
|
|
225
|
-
| `iconLibrary` | `string` | Icon library — determines icon import package (e.g. `lucide-react`, `@tabler/icons-react`) |
|
|
226
|
-
| `aliases.components` | `string` | Component import alias (e.g. `@/components`) |
|
|
227
|
-
| `aliases.utils` | `string` | Utils import alias (e.g. `@/lib/utils`) |
|
|
228
|
-
| `aliases.ui` | `string` | UI component alias (e.g. `@/components/ui`) |
|
|
229
|
-
| `aliases.lib` | `string` | Lib alias (e.g. `@/lib`) |
|
|
230
|
-
| `aliases.hooks` | `string` | Hooks alias (e.g. `@/hooks`) |
|
|
231
|
-
| `resolvedPaths` | `object` | Absolute file-system paths for each alias |
|
|
232
|
-
| `registries` | `object` | Configured custom registries |
|
|
233
|
-
|
|
234
|
-
**Links fields:**
|
|
235
|
-
|
|
236
|
-
The `info` output includes a **Links** section with templated URLs for component docs, source, and examples. For resolved URLs, use `npx shadcn@latest docs <component>` instead.
|
|
237
|
-
|
|
238
|
-
### `build` — Build a custom registry
|
|
239
|
-
|
|
240
|
-
```bash
|
|
241
|
-
npx shadcn@latest build [registry] [options]
|
|
242
|
-
```
|
|
243
|
-
|
|
244
|
-
Builds `registry.json` into individual JSON files for distribution. Default input: `./registry.json`, default output: `./public/r`.
|
|
245
|
-
|
|
246
|
-
For authoring rules, `include`, item definitions, `registryDependencies`, and
|
|
247
|
-
GitHub registry behavior, see [registry.md](./registry.md).
|
|
248
|
-
|
|
249
|
-
| Flag | Short | Description | Default |
|
|
250
|
-
| ----------------- | ----- | ----------------- | ------------ |
|
|
251
|
-
| `--output <path>` | `-o` | Output directory | `./public/r` |
|
|
252
|
-
| `--cwd <cwd>` | `-c` | Working directory | current |
|
|
253
|
-
|
|
254
|
-
---
|
|
255
|
-
|
|
256
|
-
## Templates
|
|
257
|
-
|
|
258
|
-
| Value | Framework | Monorepo support |
|
|
259
|
-
| -------------- | -------------- | ---------------- |
|
|
260
|
-
| `next` | Next.js | Yes |
|
|
261
|
-
| `vite` | Vite | Yes |
|
|
262
|
-
| `start` | TanStack Start | Yes |
|
|
263
|
-
| `react-router` | React Router | Yes |
|
|
264
|
-
| `astro` | Astro | Yes |
|
|
265
|
-
| `laravel` | Laravel | No |
|
|
266
|
-
|
|
267
|
-
All templates support monorepo scaffolding via the `--monorepo` flag. When passed, the CLI uses a monorepo-specific template directory (e.g. `next-monorepo`, `vite-monorepo`). When neither `--monorepo` nor `--no-monorepo` is passed, the CLI prompts interactively. Laravel does not support monorepo scaffolding.
|
|
268
|
-
|
|
269
|
-
---
|
|
270
|
-
|
|
271
|
-
## Presets
|
|
272
|
-
|
|
273
|
-
Three ways to specify a preset via `--preset`:
|
|
274
|
-
|
|
275
|
-
1. **Named:** `--preset nova` or `--preset lyra`
|
|
276
|
-
2. **Code:** `--preset a2r6bw` (version-prefixed base62 string, e.g. `a2r6bw` or `b0`)
|
|
277
|
-
3. **URL:** `--preset "https://ui.shadcn.com/init?base=radix&style=nova&..."`
|
|
278
|
-
|
|
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.
|
|
281
|
-
|
|
282
|
-
## Switching Presets
|
|
283
|
-
|
|
284
|
-
Ask the user first: **overwrite**, **merge**, or **skip** existing components?
|
|
285
|
-
|
|
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.
|
|
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.
|
|
288
|
-
- **Skip** → `npx shadcn@latest init --preset <code> --force --no-reinstall`. Only updates config and CSS variables, leaves existing components as-is.
|
|
289
|
-
|
|
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.
|