🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

aaspaiui

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aaspaiui

ZedBlock UI Component Library CLI - Add beautiful components to your project

latest
Source
npmnpm
Version
0.1.28
Version published
Maintainers
1
Created
Source

ZedBlock UI Library CLI

A powerful CLI tool for managing and deploying UI components with automatic scanning, dependency management, and docs generation.

🚀 Quick Start

# Install dependencies
npm install

# Initialize CLI in a project
node index.js init

# List all available components
node index.js list

# Add a specific component
node index.js add button

# Deploy a single component to docs
./scripts/deploy-component.sh button

# 🆕 AUTO-SCAN: Deploy ALL valid components automatically
./scripts/deploy-component-scan-basic.sh

📋 Table of Contents

  • Installation
  • Commands
  • 🆕 Auto-Scan Deployment
  • Component Structure
  • Deployment Scripts
  • Development Workflow
  • Contributing

Installation

  • Clone the repository
  • Install dependencies: npm install
  • Build the CLI: npm run build

Commands

init

Initialize the CLI configuration in your project.

node index.js init

list

List all available components in the registry.

node index.js list

add <component-name>

Add a specific component to your project.

node index.js add button
node index.js add card

🆕 Auto-Scan Deployment

Revolutionary Component Detection 🔍

We've introduced intelligent auto-scanning that eliminates the need to manually specify component names. The system automatically detects and deploys components that exist in all required locations.

Requirements for Auto-Deployment

A component will be automatically deployed if it exists in:

  • cli/ui/<component-name>.tsx - Component implementation file
  • cli/components.json - Component definition with dependencies
  • cli/component-variants.tsx - Component variants (optional, but recommended)

Auto-Scan Scripts

🎯 Basic Auto-Scan (Recommended)

./scripts/deploy-component-scan-basic.sh
  • Uses existing deploy-component.sh logic
  • Scans and validates all components
  • Deploys only components that meet all requirements
  • Provides detailed reporting

⚡ Advanced Auto-Scan

./scripts/deploy-component-auto-scan.sh
  • Built-in deployment logic
  • Automatically updates DynamicComponentRenderer
  • Advanced variant handling
  • Complete automation

Example Output

🔍 AUTO-SCANNING FOR DEPLOYABLE COMPONENTS (Basic Mode)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📋 Step 1: Scanning cli/ui/ for component files...
✅ Found 23 component files

📋 Step 2: Validating components...
✅ button: Ready for deployment
✅ card: Ready for deployment
❌ alert: Not ready (missing in components.json)

📊 Validation Summary:
   ✅ Valid for deployment: 19 components
   ❌ Invalid/incomplete: 4 components

🚀 Step 3: Deploying 19 valid components...

🎯 Successfully deployed components:
   • button → http://localhost:3000/components/button
   • card → http://localhost:3000/components/card
   • form → http://localhost:3000/components/form
   [... and 16 more]

Benefits

  • 🔥 Zero Manual Work - No need to specify component names
  • 🛡️ Safe Deployment - Only deploys components that meet all requirements
  • 📊 Clear Reporting - See what was deployed and what was skipped
  • 🔄 Repeatable - Run anytime to deploy new components
  • 📦 Dependency Management - Auto-installs all required packages

Component Structure

For a component to be auto-deployable, ensure it has:

1. Component File (cli/ui/<name>.tsx)

import * as React from "react";
import { cn } from "../lib/utils";

export interface ComponentProps {
  // Your props here
}

const Component = React.forwardRef<HTMLDivElement, ComponentProps>(
  ({ className, ...props }, ref) => {
    return (
      <div ref={ref} className={cn("base-styles", className)} {...props} />
    );
  }
);
Component.displayName = "Component";

export { Component };

2. Component Definition (cli/components.json)

{
  "components": {
    "component-name": {
      "name": "component-name",
      "type": "components:ui",
      "dependencies": ["@radix-ui/react-slot"],
      "files": [{ "name": "component-name.tsx", "content": "" }],
      "category": "Form",
      "subcategory": "Input"
    }
  }
}

3. Component Variants (cli/component-variants.tsx)

export const componentVariants: ComponentVariants = {
  "component-name": [
    {
      name: "Default",
      description: "Basic component usage",
      code: `import { Component } from "@/components/ui/component-name"

export function ComponentDemo() {
  return <Component>Hello World</Component>
}`,
    },
  ],
};

Deployment Scripts

Manual Deployment

# Deploy a single component
./scripts/deploy-component.sh button

# Deploy with advanced features
./scripts/deploy-component-auto.sh button

# Deploy all components (old method)
./scripts/deploy-all-components.sh

Auto-Scan Deployment (New)

# Basic auto-scan (recommended)
./scripts/deploy-component-scan-basic.sh

# Advanced auto-scan
./scripts/deploy-component-auto-scan.sh

Sync Scripts

# Sync a single component
./scripts/sync-component.sh button

# Sync with full features
./scripts/sync-component-full.sh button

# Sync all components
./scripts/sync-all-components.sh

Development Workflow

Adding a New Component

  • Create the component file

    touch cli/ui/my-component.tsx
    
  • Add to components.json

    # Add component definition with dependencies
    
  • Add variants

    # Add to cli/component-variants.tsx
    
  • Auto-deploy

    ./scripts/deploy-component-scan-basic.sh
    

Updating Components

Simply run the auto-scan script to redeploy all components:

./scripts/deploy-component-scan-basic.sh

🔧 Script Comparison

ScriptManual NamesAuto-ScanDynamicRendererBest For
deploy-component.shSingle component
deploy-component-auto.shSingle component + renderer
deploy-all-components.sh⚠️ (basic)All components (old)
deploy-component-scan-basic.shAuto-scan (recommended)
deploy-component-auto-scan.shAuto-scan + advanced features

Tips for Auto-Scan Success

  • Keep components.json updated - Missing entries will cause components to be skipped
  • Add variants for better docs - Components without variants will deploy but with warnings
  • Run regularly - Auto-scan is safe to run multiple times
  • Check skipped components - The script tells you exactly what's missing

Contributing

  • Fork the repository
  • Create your feature branch
  • Add components following the structure above
  • Run auto-scan deployment to test
  • Submit a pull request

License

MIT License - see LICENSE.md for details.

🚀 Pro Tip: Use ./scripts/deploy-component-scan-basic.sh for the best automated deployment experience!

Keywords

ui

FAQs

Package last updated on 30 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts