diff --git a/.changeset/common-pears-accept.md b/.changeset/common-pears-accept.md new file mode 100644 index 0000000000..c5662c64b9 --- /dev/null +++ b/.changeset/common-pears-accept.md @@ -0,0 +1,5 @@ +--- +"shadcn": minor +--- + +add shadcn apply command diff --git a/apps/v4/content/docs/(root)/cli.mdx b/apps/v4/content/docs/(root)/cli.mdx index 43374f8724..95ac99edaf 100644 --- a/apps/v4/content/docs/(root)/cli.mdx +++ b/apps/v4/content/docs/(root)/cli.mdx @@ -5,10 +5,12 @@ description: Use the shadcn CLI to add components to your project. ## init -Use the `init` command to initialize configuration and dependencies for a new project. +Use the `init` command to initialize configuration and dependencies for an existing project, or create a new project with `--name`. The `init` command installs dependencies, adds the `cn` util and configures CSS variables for the project. +For preset reapplication in an existing project, use [`apply`](#apply) when you want to overwrite preset-driven files and reinstall detected UI components. Use `init --force --no-reinstall` when you want to update config and CSS without reinstalling existing components. + ```bash npx shadcn@latest init ``` @@ -16,31 +18,31 @@ npx shadcn@latest init **Options** ```bash -Usage: shadcn init [options] [components...] +Usage: shadcn init|create [options] [components...] initialize your project and install dependencies Arguments: - components name, url or local path to component + components names, url or local path to component Options: -t, --template