CLI
Just like the original cli everything else works the same but the new command is
npx shadcn-fe-cli init
pnpm dlx shadcn-fe-cli init
but with a few
Extra features :
- a
shad.config.json
to persist your path preferences.
{
"directory":"./src/shadcn",
"componentsDir":"./src/shadcn/ui",
"libDir":"./src/shadcn/lib"
}
if you switch path preferences later make sure to manually move the lib/util file or run
npx shadcn-fe-cli init
again
- install all components by passing in
-A
option
npx shadcn-fe-cli add -A
pnpm shadcn-fe-cli add -A
A CLI for adding components to your project.
Usage
Use the init
command to initialize dependencies for a new project.
The init
command installs dependencies, adds the cn
util, configures tailwind.config.js
, and CSS variables for the project.
npx shadcn-fe-cli init
add
Use the add
command to add components to your project.
The add
command adds a component to your project and installs all required dependencies.
npx shadcn-fe-cli add [component]
or install all components by passing in -A
option
npx shadcn-fe-cli add -A
pnpm shadcn-fe-cli add -A
Example
npx shadcn-fe-cli add alert-dialog
You can also run the command without any arguments to view a list of all available components:
npx shadcn-plus add
Documentation
Visit http://ui.shadcn.com/docs to view the documentation.