Shadcn AssistantA VS Code extension that helps you discover, install, explore, and use shadcn/ui components directly inside Visual Studio Code. Instead of switching between your browser, terminal, and editor, Shadcn Assistant provides a convenient way to work with shadcn/ui components from your VS Code workspace. ✨ Features🔍 Component DiscoveryBrowse shadcn/ui components directly from the VS Code Activity Bar.
📦 Install ComponentsInstall shadcn/ui components directly from VS Code. The extension uses the official shadcn CLI, so components are installed using the standard shadcn workflow. Example:
📋 Component DetailsView useful information about a component including:
🔗 Dependency AnalysisShadcn Assistant analyzes component dependencies and can show:
📄 Open Component SourceOpen the installed component source directly from VS Code. 📋 Copy ImportCopy the required component import directly to your clipboard. Example:
🧩 Insert ExampleInsert a component usage example directly into your current editor. The extension also helps prevent duplicate imports when inserting examples. 🌐 Official Shadcn RegistryShadcn Assistant integrates with the official shadcn registry to retrieve component information and dependency metadata. This allows the extension to work with the official shadcn component ecosystem instead of maintaining component source code inside the extension. 🚀 Getting StartedRequirementsBefore using Shadcn Assistant, make sure your project has:
Initialize shadcn/uiIf shadcn/ui is not initialized in your project, run:
After initialization, open the project in VS Code. Open Shadcn Assistant
🛠️ How It WorksShadcn Assistant does not copy the entire shadcn/ui component library into the extension. Instead, it works with your project and the official shadcn ecosystem.
📁 Component DetectionThe extension detects installed components from your project's configured shadcn component directory. For example:
The extension can then identify these components as installed. 💡 ExampleSuppose your project does not have the Button component. You can:
The extension invokes the shadcn CLI to install the component into your project. After refreshing the component list, Button appears as an installed component. 🔧 CommandsShadcn Assistant currently provides commands including:
🧑💻 DevelopmentClone or download the project and install dependencies:
Run linting:
Run tests:
To run the extension during development:
🗺️ RoadmapPlanned improvements include:
🤝 ContributingContributions, suggestions, and bug reports are welcome. If you find an issue or have an idea for improving Shadcn Assistant, please open an issue in the project's source repository. 📄 LicenseThis project is licensed under the MIT License. |