The labb command-line interface provides a comprehensive set of tools for managing your Django projects using labb.
Commands Overview
| Command | Description |
|---|---|
init |
Initialize labb project with configuration and project structure |
setup |
Install labb dependencies (Tailwind CSS CLI and daisyUI) |
scan |
Scan templates for labb components |
build |
Build CSS using Tailwind CSS 4 |
dev |
Development mode with watch and scan |
config |
Display, validate, or edit configuration |
icons |
Search and manage icon packs (requires labbicons package) |
components |
Inspect available components and view their examples |
llms |
Display llms.txt content for AI/LLM consumption |
Reference
labb init
Usage:
labb init [OPTIONS]
Options:
--defaults: Use default values without prompts--force: Overwrite existing files and directories created bylabb init
Examples:
# Interactive initialization
labb init
# Use defaults for quick setup
labb init --defaults
# Force overwrite existing files
labb init --force
labb setup
Usage:
labb setup [OPTIONS]
Options:
--install-deps / --no-install-deps: Install Node.js dependencies
Examples:
# Install dependencies (interactive)
labb setup
# Install dependencies automatically
labb setup --install-deps
# Skip dependency installation
labb setup --no-install-deps
labb scan
Usage:
labb scan [OPTIONS]
Options:
--watch, -w: Watch for changes and rescan--output, -o TEXT: Override output file path--patterns TEXT: Override template patterns (comma-separated)--verbose, -v: Show detailed scanning information
Examples:
# Scan templates once
labb scan
# Watch for changes
labb scan --watch
# Custom output file
labb scan --output src/extracted-classes.txt
# Custom template patterns
labb scan --patterns "templates/**/*.html,components/**/*.html"
# Verbose output
labb scan --verbose
labb build
Usage:
labb build [OPTIONS]
Options:
--watch, -w: Watch for changes and rebuild--scan, -s: Scan templates for CSS classes (behavior depends on watch mode)--minify / --no-minify: Minify CSS output (default: from config)--input, -i TEXT: Override input CSS file path--output, -o TEXT: Override output CSS file path
Examples:
# One-time build
labb build
# Watch for changes
labb build --watch
# Scan templates before building
labb build --scan
# Development mode (concurrent watch + scan)
labb build --watch --scan
# Override minification
labb build --no-minify
# Custom input/output files
labb build --input src/styles.css --output dist/app.css
labb dev
Usage:
labb dev [OPTIONS]
Options:
--minify / --no-minify: Minify CSS output (default: false for dev)--input, -i TEXT: Override input CSS file path--output, -o TEXT: Override output CSS file path
Examples:
# Start development mode
labb dev
# Development mode with minification
labb dev --minify
# Custom file paths
labb dev --input src/styles.css --output dist/app.css
labb config
Usage:
labb config [OPTIONS]
Options:
--metadata, -m: Show configuration metadata--validate, -v: Validate configuration and check files--edit, -e: Open configuration file in editor--config, -c TEXT: Path to specific configuration file
Examples:
# Show current configuration
labb config
# Show with metadata
labb config --metadata
# Validate configuration
labb config --validate
# Edit configuration file
labb config --edit
# Use specific config file
labb config --config /path/to/custom.yaml
labb components
Usage:
labb components [SUBCOMMAND] [OPTIONS]
Subcommands:
inspect: Inspect component specificationsex: View component examples
labb components inspect
Inspect available components and their specifications.
Usage:
labb components inspect [OPTIONS] [COMPONENT]
Arguments:
COMPONENT: Specific component to inspect
Options:
--list, -l: List all components--verbose, -v: Show detailed information (includes raw YAML)
Examples:
# List all components
labb components inspect
# List with details
labb components inspect --list --verbose
# Inspect specific component
labb components inspect button
# Detailed component inspection with raw YAML
labb components inspect button --verbose
labb components ex
View and explore component examples.
Usage:
labb components ex [OPTIONS] [COMPONENT] [EXAMPLES]...
Arguments:
COMPONENT: Component name to show examples forEXAMPLES: Specific example(s) to display (can specify multiple)
Options:
--list, -l: List all components with examples--tree, -t: Show examples in tree format
Examples:
# List all components with examples
labb components ex --list
# Show examples tree view
labb components ex --tree
# List examples for a specific component
labb components ex badge
# View a specific example
labb components ex badge basic
# View multiple examples at once
labb components ex badge basic color-variants sizes
# View examples from different components
labb components ex button primary-button
labb components ex modal basic-modal
labb icons
If the
labbiconspackage is not installed, the command will show an error with installation instructions.
Usage:
labb icons [SUBCOMMAND] [OPTIONS]
Subcommands:
search: Search for icons by name, pack, category, or variantpacks: List all available icon packs with categoriesinfo: Show detailed information about a specific icon
labb icons search
Usage:
labb icons search QUERY [OPTIONS]
Arguments:
QUERY: Search term for icon names
Options:
--pack, -p TEXT: Filter by icon pack (e.g., rmx)--category, -c TEXT: Filter by category--variant, -v TEXT: Filter by variant (fill, line)--limit, -l INTEGER: Maximum number of results to show (default: 20)
Examples:
# Search for icons containing "arrow"
labb icons search "arrow"
# Search in specific pack
labb icons search "arrow" --pack rmx
# Search by category
labb icons search "arrow" --category Arrows
# Search with variant filter
labb icons search "arrow" --variant fill
# Limit results
labb icons search "arrow" --limit 5
labb icons packs
Usage:
labb icons packs
Examples:
# List all available packs
labb icons packs
labb icons info
Usage:
labb icons info ICON_IDENTIFIER
Arguments:
ICON_IDENTIFIER: Icon identifier in format 'pack.icon' (e.g., 'rmx.arrow-down')
Examples:
# Get detailed info about an icon
labb icons info rmx.arrow-down
# Get info about another icon
labb icons info rmx.home
labb llms
Usage:
labb llms
Examples:
# Display complete llms.txt content
labb llms
# Pipe to other tools
labb llms | grep "variant:"
# Search for specific components
labb llms | grep "button"
Development Workflow
1. Project Initialization
# Initialize project (creates config + project structure)
labb init
# Install dependencies
labb setup
For new developers joining an existing project:
# Just install dependencies (project already initialized)
labb setup
2. Development
# Start development mode
labb dev
This runs both CSS building and template scanning in watch mode.
3. Production Build
# Build for production
labb build --minify
4. Component Usage
# List all components
labb components inspect --list
# Inspect specific component
labb components inspect button --verbose
# Explore component examples
labb components ex --tree
# View specific examples
labb components ex badge basic color-variants
5. Icon Usage (Optional)
# Install labbicons package first
pip install labbicons
# List available icon packs
labb icons packs
# Search for icons
labb icons search "arrow"
# Get detailed icon information
labb icons info rmx.arrow-down
Troubleshooting
Common Issues
"npx is not available"
# Install Node.js and npm
# Visit https://nodejs.org/
"Configuration file not found"
# Initialize project
labb init
"package.json not found"
# Initialize project first, then setup
labb init
labb setup
"Input CSS file not found"
# Initialize project (creates CSS files)
labb init
"No template files found"
# Check template patterns in labb.yaml
labb config --validate
Getting Help
# Show general help
labb --help
# Show command-specific help
labb build --help
labb llms --help
# Show components help
labb components --help
# Show subcommand help
labb components inspect --help
labb components ex --help
Advanced Usage
Custom Configuration
# Use custom config file
export LABB_CONFIG_PATH=/path/to/custom.yaml
labb build
# Or specify directly
labb build --config /path/to/custom.yaml
CI/CD Integration
# Non-interactive setup
labb init --defaults
labb setup --install-deps
# Production build
labb build --minify
AI/LLM Integration
# Get complete documentation for AI consumption
labb llms
# Extract specific component information
labb llms | grep -A 10 "button:"
# Get installation instructions
labb llms | grep -A 5 "## Installation"