CLI Framework (Topia)
Overview
Core Components
Task System
# Simple command task
Topia.task("build")
.describe("Build the application")
.command("crystal build --release src/main.cr")
# Task with dependencies
Topia.task("test")
.describe("Run tests")
.depends_on("build")
.command("crystal spec")
# Task with file watching
Topia.task("dev")
.describe("Development server with hot reload")
.src("./src/**/*.cr")
.pipe(FileWatcher.new)
.command("crystal run src/main.cr")Command Execution
Plugin System
CLI Architecture
Command Parsing
Subcommand Support
Performance Features
Async Operations
Intelligent Caching
Parallel Execution
Configuration Integration
Environment Variable Support
YAML Configuration
Debugging and Monitoring
Enhanced Debugging
Performance Metrics
Lifecycle Hooks
Plugin Lifecycle
Integration with Azu CLI
Command Structure
Error Handling
Performance Benefits
Before Topia Integration
After Topia Integration
Real-World Results
Best Practices
Task Design
Plugin Development
Configuration
Related Documentation
Last updated