CUGA LogoCUGA AGENT
Usage

Control Commands

Master CUGA control commands for service management and monitoring

Master CUGA's command-line interface for service management, monitoring, and control.

🚀 Command Overview

CUGA provides a comprehensive CLI for managing all aspects of the system:

# Basic command structure
cuga <command> <subcommand> [options]

📋 Available Commands

Service Management

CommandDescriptionExample
startStart CUGA servicescuga start demo
stopStop CUGA servicescuga stop all
statusCheck service statuscuga status
restartRestart servicescuga restart demo

Configuration

CommandDescriptionExample
configManage configurationcuga config show
envEnvironment managementcuga env list
modeSwitch execution modescuga mode fast

Monitoring

CommandDescriptionExample
expExperiment dashboardcuga exp
logsView system logscuga logs --tail
monitorReal-time monitoringcuga monitor

🚀 Service Management

Starting Services

Start Demo Mode

# Start complete demo environment
cuga start demo

# Start specific demo components
cuga start api-registry
cuga start cuga-demo

Start Evaluation Mode

# Start AppWorld evaluation
cuga start appworld

# Start WebArena evaluation
cuga start webarena

# Start WxO tools
cuga start wxo

Start Custom Services

# Start with specific configuration
cuga start demo --config settings.fast.toml

# Start on specific port
cuga start demo --port 8006

# Start with custom environment
cuga start demo --env production

Stopping Services

Stop All Services

# Stop all running services
cuga stop all

# Force stop (kill processes)
cuga stop all --force

Stop Specific Services

# Stop demo services
cuga stop demo

# Stop evaluation services
cuga stop appworld
cuga stop webarena

# Stop by port
cuga stop --port 8005

Service Status

Check All Services

# View status of all services
cuga status

# Detailed status with logs
cuga status --verbose

# Status in JSON format
cuga status --format json

Check Specific Services

# Check demo status
cuga status demo

# Check by service type
cuga status --type api
cuga status --type evaluation

⚙️ Configuration Management

View Configuration

Show Current Settings

# Show all configuration
cuga config show

# Show specific sections
cuga config show --section agent
cuga config show --section features
cuga config show --section execution

Export Configuration

# Export to different formats
cuga config export --format toml
cuga config export --format json
cuga config export --format yaml

# Export specific sections
cuga config export --section agent --format json

Modify Configuration

Update Settings

# Update specific values
cuga config set agent.temperature 0.2
cuga config set features.mode hybrid
cuga config set execution.max_retries 5

# Update from file
cuga config import --file custom_settings.toml

# Reset to defaults
cuga config reset

Validate Configuration

# Validate current configuration
cuga config validate

# Validate specific file
cuga config validate --file settings.toml

# Check for conflicts
cuga config validate --check-conflicts

🔄 Mode Management

Switch Execution Modes

Fast Mode

# Switch to fast mode
cuga mode fast

# Verify mode change
cuga config show --section features

Accurate Mode

# Switch to accurate mode
cuga mode accurate

# Start demo with accurate mode
cuga start demo --mode accurate

Custom Mode

# Switch to custom mode
cuga mode custom

# Use custom configuration file
cuga mode custom --config my_custom.toml

Mode Information

# List available modes
cuga mode list

# Show current mode
cuga mode current

# Show mode details
cuga mode info fast

📊 Monitoring Commands

Experiment Dashboard

Launch Dashboard

# Open experiment dashboard
cuga exp

# Dashboard with specific experiment
cuga exp --experiment my_experiment

# Dashboard in browser
cuga exp --browser

Experiment Management

# List experiments
cuga exp list

# Show experiment details
cuga exp show my_experiment

# Delete experiment
cuga exp delete my_experiment

Log Management

View Logs

# View recent logs
cuga logs

# Follow logs in real-time
cuga logs --tail

# View specific log files
cuga logs --file demo.log
cuga logs --file error.log

Log Filtering

# Filter by level
cuga logs --level ERROR
cuga logs --level INFO,WARNING

# Filter by time
cuga logs --since "2024-01-01"
cuga logs --until "2024-01-31"

# Filter by service
cuga logs --service demo
cuga logs --service api-registry

System Monitoring

Real-time Monitoring

# Start monitoring dashboard
cuga monitor

# Monitor specific metrics
cuga monitor --metrics cpu,memory,network

# Monitor specific services
cuga monitor --services demo,api-registry

Performance Metrics

# Show performance stats
cuga stats

# Show resource usage
cuga stats --resources

# Show API metrics
cuga stats --api

🔧 Advanced Commands

Environment Management

Environment Variables

# List environment variables
cuga env list

# Set environment variable
cuga env set OPENAI_API_KEY new_key_here

# Unset environment variable
cuga env unset DEBUG_MODE

# Export environment
cuga env export --file .env.backup

Environment Profiles

# Create profile
cuga env profile create development

# Switch profile
cuga env profile use production

# List profiles
cuga env profile list

Service Discovery

Available Services

# List available services
cuga services list

# Show service details
cuga services info demo

# Check service health
cuga services health

Service Dependencies

# Show service dependencies
cuga services deps

# Check dependency health
cuga services deps --health

# Resolve dependencies
cuga services deps --resolve

🧪 Testing Commands

System Testing

Health Checks

# Run health check
cuga health

# Health check for specific service
cuga health --service demo

# Detailed health report
cuga health --verbose

Integration Tests

# Run integration tests
cuga test integration

# Test specific components
cuga test --component api
cuga test --component demo

# Test with coverage
cuga test --coverage

Performance Testing

Benchmark Tests

# Run benchmarks
cuga benchmark

# Benchmark specific mode
cuga benchmark --mode fast
cuga benchmark --mode accurate

# Compare modes
cuga benchmark --compare fast,accurate,custom

Load Testing

# Load test demo
cuga load-test --service demo --users 100

# Stress test API
cuga load-test --service api --duration 300

🔍 Debug Commands

Debug Mode

Enable Debug

# Enable debug mode
cuga debug enable

# Debug specific service
cuga debug enable --service demo

# Debug with verbose output
cuga debug enable --verbose

Debug Information

# Show debug info
cuga debug info

# Show debug logs
cuga debug logs

# Show debug metrics
cuga debug metrics

Troubleshooting

Diagnostic Commands

# Run diagnostics
cuga diagnose

# Diagnose specific issue
cuga diagnose --issue connectivity
cuga diagnose --issue performance

# Generate report
cuga diagnose --report

System Information

# Show system info
cuga system info

# Show version information
cuga version

# Show dependency versions
cuga deps

📚 Command Examples

Common Workflows

Development Workflow

# Start development environment
cuga start demo --mode fast

# Monitor development
cuga monitor --services demo

# View development logs
cuga logs --level DEBUG --service demo

Production Workflow

# Start production services
cuga start demo --mode accurate --env production

# Monitor production
cuga monitor --metrics all

# Check production health
cuga health --service demo

Evaluation Workflow

# Start evaluation environment
cuga start appworld

# Monitor evaluation
cuga exp --experiment current

# Check evaluation logs
cuga logs --service appworld

🐛 Troubleshooting

Common Command Issues

IssueSolution
🔴 Command not foundCheck CUGA installation and PATH
🔴 Permission deniedUse sudo or check file permissions
🔴 Service not respondingCheck service status and restart if needed
🔴 Configuration errorValidate configuration with cuga config validate
🔴 Port conflictsCheck port usage and stop conflicting services

Debug Commands

# Check CUGA installation
which cuga
cuga version

# Check service status
cuga status --verbose

# Check configuration
cuga config show

# Check environment
cuga env list

📚 Next Steps

After mastering control commands:

  1. API Integration: Add your own APIs
  2. Save & Reuse: Explore workflow persistence
  3. Evaluation: Run benchmarks
  4. Development: Test and debug

Commands mastered? Move to API Integration!