@felixgeelhaar/glaze-cli
v1.0.1
Published
Command-line interface for the Glaze Design System
Readme
@felixgeelhaar/glaze-cli
Command-line interface for the Glaze Design System
Installation
npm install -g @felixgeelhaar/glaze-cli
# or
pnpm add -g @felixgeelhaar/glaze-cli
# or
yarn global add @felixgeelhaar/glaze-cliUsage
Initialize a new project
glaze init my-projectThis will create a new project with the Glaze Design System pre-configured.
Add Glaze to an existing project
# In your project directory
glaze addThis command will:
- Install necessary dependencies
- Set up configuration files
- Import required styles
- Configure your build tools
Add specific components
# Add individual components
glaze add button card dialog
# Add all components
glaze add --allGenerate component wrappers
# Generate React wrappers
glaze generate react
# Generate Vue wrappers
glaze generate vue
# Generate Angular wrappers (coming soon)
glaze generate angularCommands
glaze init [project-name]
Create a new project with Glaze Design System.
Options:
--framework <framework>- Choose framework (react, vue, vanilla)--typescript- Use TypeScript--tailwind- Include Tailwind CSS integration--git- Initialize git repository--install- Install dependencies immediately
Example:
glaze init my-app --framework react --typescript --tailwindglaze add [components...]
Add Glaze components to your project.
Options:
--all- Add all components--framework <framework>- Specify framework wrappers--force- Overwrite existing files
Example:
glaze add button card --framework vueglaze generate <framework>
Generate framework-specific component wrappers.
Supported frameworks:
react- React componentsvue- Vue 3 componentsangular- Angular components (coming soon)svelte- Svelte components (coming soon)
Example:
glaze generate react --output ./src/componentsglaze config
Configure Glaze Design System settings.
Options:
--theme- Configure theme settings--tokens- Customize design tokens--css- Configure CSS output
Example:
glaze config --themeglaze update
Update Glaze packages to the latest version.
Options:
--check- Check for updates without installing--major- Include major version updates
Example:
glaze update --checkConfiguration
.glazerc.json
Create a .glazerc.json file in your project root:
{
"framework": "react",
"typescript": true,
"components": ["button", "card", "dialog"],
"theme": {
"primary": "#6366f1",
"accent": "#f472b6",
"radius": "0.75rem"
},
"paths": {
"components": "./src/components",
"styles": "./src/styles"
}
}Environment Variables
# Set default framework
export GLAZE_FRAMEWORK=vue
# Set default output directory
export GLAZE_OUTPUT=./src/glazeProject Templates
React + TypeScript + Tailwind
glaze init my-react-app \
--framework react \
--typescript \
--tailwind \
--gitCreates a project with:
- React 18
- TypeScript
- Tailwind CSS with Glaze preset
- Vite build tool
- ESLint & Prettier
- Git repository
Vue 3 + Composition API
glaze init my-vue-app \
--framework vue \
--typescript \
--gitCreates a project with:
- Vue 3
- TypeScript
- Composition API setup
- Vite build tool
- ESLint & Prettier
- Git repository
Vanilla JavaScript
glaze init my-vanilla-app \
--framework vanilla \
--gitCreates a project with:
- Vanilla JavaScript
- Web Components
- Vite build tool
- Git repository
Integrations
With existing React app
cd my-react-app
glaze add --framework reactThis will:
- Install
@felixgeelhaar/glaze-reactand@felixgeelhaar/glaze-components - Add style imports to your entry file
- Provide usage examples
With existing Vue app
cd my-vue-app
glaze add --framework vueThis will:
- Install
@felixgeelhaar/glaze-vueand@felixgeelhaar/glaze-components - Set up the Vue plugin
- Add style imports
- Provide usage examples
With existing Tailwind project
glaze add --tailwindThis will:
- Install
@felixgeelhaar/glaze-engine - Update your
tailwind.config.js - Add Glaze preset and plugin
Troubleshooting
Common Issues
Issue: Components not styling correctly
# Ensure styles are imported
glaze doctor stylesIssue: TypeScript errors
# Generate type definitions
glaze generate typesIssue: Build errors
# Check configuration
glaze doctor configDebug Mode
Run commands with debug output:
DEBUG=glaze:* glaze init my-projectGetting Help
# Show help for any command
glaze help [command]
# Show version
glaze --version
# Check system compatibility
glaze doctorFeatures
- 🚀 Quick setup - Get started in seconds
- 📦 Smart defaults - Sensible configuration out of the box
- 🔧 Customizable - Fine-tune every aspect
- 🎨 Theme generation - Create custom themes
- 📝 TypeScript support - Full type safety
- 🔄 Auto-updates - Keep dependencies current
- 🏗️ Scaffolding - Generate boilerplate code
- 🔍 Diagnostics - Built-in troubleshooting
License
MIT
