Compadcn simplifies the workflow of installing and managing ShadCN UI components with a modern CLI tool. Its features include smart linting, automatic import cleanup, and interactive TUI that enhance development efficiency. Custom presets allow for easy management of component collections, making component workflows faster and more organized.
compadcn is an advanced Command Line Interface (CLI) tool designed specifically for the efficient installation and management of ShadCN UI components. This tool enhances the development experience through a variety of powerful features:
Effortless Component Installation: Quickly add ShadCN components to your project with a simple command.
Smart Linting: Identify and eliminate unused components from your codebase, ensuring a clean and optimized project.
Automatic Import Cleanup: When components are removed, any associated imports are also automatically deleted, simplifying maintenance.
Dependency Management: Choose to automatically remove unused dependencies when components are deleted, streamlining your project's dependency tree.
Custom Presets: Create and manage collections of frequently used components, allowing for quicker setup rates and uniformity across projects.
To add ShadCN components to your project, use:
# Interactive mode: Select components from the list
compadcn add
# Specify components directly
compadcn add button card dialog
To remove components, the command is as follows:
# Interactive mode: Choose which installed components to delete
compadcn remove
# Specify components directly to remove
compadcn remove button card
Run a lint check against your project using the command:
compadcn lint
This command scans the codebase for unused components and can even suggest commands for their removal.
Manage presets, which encompasses collections of commonly utilized components, with:
# Open the preset manager
compadcn preset
compadcn preset listcompadcn preset install dashboardcompadcn preset create "my-preset" button cardcompadcn preset delete "my-preset"components.json file to ascertain project structure.compadcn operates seamlessly within the standard ShadCN directory layout:
your-project/
├── components.json # Configuration file for ShadCN
├── src/
│ └── components/
│ └── ui/ # Directory containing components
│ ├── button.tsx
│ ├── card.tsx
│ └── ...
└── package.json
Custom presets are stored in ~/.compadcn/custom-presets.json and can be:
compadcn streamlines the workflow for developers working with ShadCN UI components, making it an essential tool for any modern coding environment.
No comments yet.
Sign in to be the first to comment.