CLI

BoardCN has no CLI of its own. It is a registry, so the standard shadcn CLI does the work.

Adding items

npx shadcn@latest add @boardcn/button
npx shadcn@latest add @boardcn/button

Several at once:

npx shadcn@latest add @boardcn/button @boardcn/input @boardcn/select
npx shadcn@latest add @boardcn/button @boardcn/input @boardcn/select

Or the whole foundation, which is what you want on a fresh project:

npx shadcn@latest add @boardcn/boardcn
npx shadcn@latest add @boardcn/boardcn

Useful flags

  • --overwrite — replace files that already exist. Needed when you re-add an item after local edits.
  • --yes — skip confirmation prompts, for scripts and CI.
  • --silent — suppress output; pairs well with --yes.
  • --path — write to a directory other than the configured alias.

The registry endpoint

Every item is a plain JSON document served from this site. Nothing is authenticated and nothing is rate limited, so you can fetch or mirror it freely.

bash
# One item
curl https://boardcn.dev/r/button.json

# The full index of 85 items
curl https://boardcn.dev/r/registry.json
# One item
curl https://boardcn.dev/r/button.json

# The full index of 85 items
curl https://boardcn.dev/r/registry.json

To vendor the registry — pinning it for an air-gapped build, say — clone the repository, run npm run registry:build, and serve public/r from anywhere. Point your components.json at that host instead.

How dependencies resolve

Items declare their BoardCN dependencies, so the CLI walks the graph for you. Adding @boardcn/data-table installs the checkbox, dropdown, pagination, select, table, and tooltip it imports — each written once, even when several items share it.

Third-party packages are declared the same way and handed to your package manager, so recharts only lands in your package.json if you install something that charts.