@the-grove/cli
v0.1.18
Published
CLI for the-grove component library
Maintainers
Readme
@the-grove/cli
CLI tool for the-grove component library.
Usage
Add components
npx the-grove add async-buttonList components
npx the-grove listContribute components
npx the-grove contribute ./components/my-component.tsxShadcn Compatibility
the-grove registry is fully compatible with shadcn's CLI! You can use either:
the-grove CLI (recommended for ease of use):
npx the-grove add async-buttonshadcn CLI (if you prefer):
npx shadcn@latest add https://raw.githubusercontent.com/matthewnaples/the-grove/main/packages/registry/registry/core/async-button.jsonWhy Use the-grove CLI?
- Automatic component discovery (no need to know category)
- Stack detection (warns about missing Convex/Clerk dependencies)
- Browse components with
the-grove list - Same reliable installation (uses shadcn under the hood)
Commands
add
Add components to your project.
npx the-grove add <component-name> [options]
Options:
-p, --path <path> Custom installation path
-y, --yes Skip confirmation promptslist
List all available components.
npx the-grove list [options]
Options:
-c, --category <category> Filter by category
-t, --tag <tag> Filter by tagcontribute
Contribute components back to the-grove.
npx the-grove contribute <file...>Requires GITHUB_TOKEN environment variable or will prompt for token.
Development
Local Testing (Recommended)
From the repository root:
# Setup local development environment
npm run dev:link
# Test the CLI
the-grove add async-button
the-grove list
# Watch for changes (in separate terminal)
cd packages/cli
npm run dev
# Cleanup when done
cd ../..
npm run dev:unlinkManual Linking
If you prefer to link manually:
cd packages/cli
# Build
npm run build
# Link globally
npm link
# Test
the-grove --help
# Unlink when done
npm unlink -g @the-grove/cliQuick Testing Without Linking
# From repository root
./scripts/test-local.sh add async-buttonWatch Mode
For active development with auto-rebuild on file changes:
npm run devThis runs tsup in watch mode - any changes to source files will automatically rebuild the dist folder.
