# shadcn-init

The shadcn-init command sets up shadcn/ui in a project and adds a defined set of components. Use it when you want the UI files placed in the expected directory with the new-york theme.

- command · `type=command` · Claude Code, Codex, GitHub Copilot, Gemini CLI · ★ 267 repo stars
- Author: przeprogramowani
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/przeprogramowani/ai-rules-builder/tree/HEAD/.claude/commands/shadcn-init.md
- Updated: 2026-02-20
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/commands/shadcn-init

## What it does

The command runs `npx shadcn@latest init` in the 10xRules.ai project, then adds `button`, `card`, `input`, `tabs`, `table`, `dialog`, `sheet`, `form`, `textarea`, `select`, `switch`, and `toast`. It checks that the components are under `src/components/ui` and that the selected theme is `new-york`.

The setup must not use the `--defaults` flag. That restriction matters: an initialization run with that flag does not follow this command’s instructions. Components are added through a separate `npx shadcn@latest add` call.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/commands/shadcn-init.md` — Call it with /shadcn-init. For all projects use ~/.claude/commands/

### Codex

**Manually: put the files in place**
- File: `~/.codex/prompts/shadcn-init.md` — Call it with /prompts:shadcn-init. Codex marks this format deprecated in favour of skills

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/prompts/shadcn-init.prompt.md`

### Gemini CLI

**Manually: put the files in place**
- File: `.gemini/commands/shadcn-init.toml` — Gemini stores commands as TOML: the prompt text goes into the prompt field

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/przeprogramowani/ai-rules-builder/tree/HEAD/.claude/commands/shadcn-init.md

## When to use it
- initialize shadcn/ui in a project
- add the specified UI components
- check that components are in `src/components/ui`
- verify the `new-york` theme

## Example prompts
- Set up shadcn/ui in this project and add the required components with `/shadcn-init`.
- Prepare the shadcn/ui components under `src/components/ui` using the `new-york` theme.

## Similar
- [shadcn](https://affpapa.org/en/nevibecode/skills/shadcn-ui-shadcn.md) — skill · 150100 installs
- [shadcn-svelte](https://affpapa.org/en/nevibecode/skills/shadcn-svelte.md) — skill · 7600 installs
- [shadcn-ui](https://affpapa.org/en/nevibecode/skills/nexu-io-shadcn-ui.md) — skill · 3100 installs
- [shadcn-component-review](https://affpapa.org/en/nevibecode/skills/shadcn-component-review.md) — skill · 676 installs
- [w-shadcn](https://affpapa.org/en/nevibecode/skills/w-shadcn.md) — skill · 647 installs
- [shadcn-component-discovery](https://affpapa.org/en/nevibecode/skills/shadcn-component-discovery.md) — skill · 773 installs

From the same set: [przeprogramowani/ai-rules-builder](https://affpapa.org/en/nevibecode/by/przeprogramowani/ai-rules-builder.md) — 24 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
