The Future of Web Dev
The Future of Web Dev
Global Shorthand for Smarter & Faster shadcn/ui Component Installation – shadd
Install shadcn/ui components with one command across all package managers. shadd detects npm, pnpm, yarn, bun, or deno and handles the rest.

shadd is a global command-line tool that acts as a shorthand for the shadcn add command.
It automatically detects your project’s package manager (npm, pnpm, yarn, bun, or deno) and executes the appropriate shadcn add command without requiring you to remember specific runner syntax for each environment.
Features
🔄 Automatic package manager detection for npm, pnpm, yarn, bun, and deno environments.
🚀 Single command interface that works consistently across all supported package managers.
📦 Complete flag and argument pass-through to maintain full shadcn/ui compatibility.
🏗️ Monorepo support with intelligent repository root detection.
⚡ Zero configuration required after global installation.
🔧 Git repository validation to prevent execution in invalid project contexts.
Use Cases
- Multi-Project Workflows. You can maintain a consistent command for adding components across different projects, where each one might use a different package manager like npm or pnpm.
- Team Collaboration. It standardizes the component-adding process for development teams, so everyone uses the same simple command regardless of their local setup.
- Component Scaffolding. You can quickly add single or multiple components to your application without the mental overhead of recalling package manager-specific syntax.
How to Use It
1. Install shadd globally on your system.
For npm users.
npm install -g shadd@latestFor pnpm users.
pnpm add -g shadd@latestFor yarn users.
yarn global add shadd@latestFor bun users.
bun add -g shadd@latest2. Use the shadd command inside any git repository that has a supported package manager. The tool forwards all arguments to shadcn add.
To enter the interactive mode and receive prompts for selecting components, run the command without any arguments.
shaddTo add a single component, specify its name after the command.
shadd buttonYou can also add multiple components at once by listing their names.
shadd button card dialog3. shadd supports all flags that shadcn add accepts. For example, you can add a component non-interactively and overwrite existing files using the -y and --overwrite flags.
shadd button -y --overwrite4. The tool also works with custom shadcn/ui registries. You can specify a registry by its name, a URL, or a local file path.
shadd @registry/accordionHow It Works
Shadd uses package-manager-detector to identify your project’s package manager by examining lock files and configuration. The tool searches upward from your current directory to find the repository root and associated package manager files.
When you run shadd, it maps to these underlying commands based on detection results.
For pnpm projects, it executes pnpm dlx shadcn@latest add with your arguments. NPM projects trigger npx shadcn@latest add, while yarn projects run yarn shadcn@latest add. Bun projects execute bunx --bun shadcn@latest add, and deno projects use deno run -A npm:shadcn@latest add.
Error Handling
Shadd validates your environment before executing commands. The tool requires execution within a git repository and will exit with an error if no git context is found.
Similarly, if package manager detection fails, shadd will terminate with an appropriate error message rather than making incorrect assumptions about your environment.
Related Resources
- shadcn/ui – The official shadcn/ui documentation and component registry for React applications.
- package-manager-detector – The underlying package manager detection library used by shadd.
FAQs
Q: Does shadd work in monorepo environments?
A: Yes, shadd uses package-manager-detector to crawl upward through directory structures and identify the correct package manager for the nearest repository root. This makes it compatible with monorepo setups where different packages might use different tooling.
Q: What happens if shadd can’t detect my package manager?
A: Shadd will exit with an error message if it cannot identify a supported package manager in your project. The tool requires detection of npm, pnpm, yarn, bun, or deno environments to function properly.
Q: Can I use shadd with custom shadcn/ui registries?
A: Yes, shadd passes all arguments directly to the underlying shadcn add command, including registry specifications. You can use registry names, URLs, or local paths exactly as you would with the standard shadcn CLI.
Q: Is shadd compatible with all shadcn/ui flags and options?
A: Yes, shadd forwards all flags and arguments without modification to the underlying shadcn add command.
Q: Does shadd require any project-specific configuration?
A: No, shadd works without any configuration after global installation. The tool automatically detects your project setup and executes the appropriate commands based on your environment.





