This section covers CLI commands for managing your deployed chutes, monitoring performance, viewing logs, and controlling resources.
Chute Management
chutes chutes list
List all your deployed chutes.
chutes chutes list [OPTIONS]
Options:
--format TEXT: Output format (table, json, yaml)
--filter TEXT: Filter by name, status, or tag
--limit INTEGER: Maximum number of results
--sort TEXT: Sort by field (name, created, status)
Examples:
# List all chutes
chutes chutes list
# List with JSON output
chutes chutes list --format json
# Filter by status
chutes chutes list --filter status=running
# Filter by name pattern
chutes chutes list --filter name=*-prod
# Basic chute information
chutes chutes get my-chute
# Detailed configuration
chutes chutes get my-chute --show-config
# Include performance metrics
chutes chutes get my-chute --show-metrics
# Status of all chutes
chutes status
# Status of specific chute
chutes status my-chute
# Watch status with auto-refresh
chutes status --watch --refresh 5
# Show status with alerts
chutes status --alerts
# Scale up to 3 instances
chutes scale my-chute 3 --wait# Scale down to 1 instance
chutes scale my-chute 1
# Rolling scale with timeout
chutes scale my-chute 5 --strategy rolling --timeout 300
# List all images
chutes images list
# Get image details
chutes images get myuser/my-chute:v1.2.0
# Delete old image
chutes images delete myuser/my-chute:v1.0.0
# Clean up unused images
chutes images prune --older-than 30d
Environment Management
chutes env
Manage environment variables for your chutes.
chutes env <chute_name> [SUBCOMMAND] [OPTIONS]
Subcommands:
list: List environment variables
set: Set environment variable
unset: Remove environment variable
import: Import from file
Examples:
# List current environment variables
chutes env my-chute list
# Set environment variable
chutes env my-chute set DEBUG=true# Import from file
chutes env my-chute import --file production.env
# Remove environment variable
chutes env my-chute unset DEBUG
Health and Diagnostics
chutes health
Check health status of your chutes.
chutes health <chute_name> [OPTIONS]
Options:
--detailed: Show detailed health information
--history: Show health check history
--alerts: Show health-related alerts
Examples:
# Basic health check
chutes health my-chute
# Detailed health information
chutes health my-chute --detailed
# Health check history
chutes health my-chute --history --days 7
chutes debug
Debug issues with your chutes.
chutes debug <chute_name> [OPTIONS]
Options:
--component TEXT: Focus on specific component
--export: Export debug information
--verbose: Verbose output
Examples:
# General debug information
chutes debug my-chute
# Debug specific component
chutes debug my-chute --component networking
# Export debug bundle
chutes debug my-chute --export debug-bundle.zip
Backup and Recovery
chutes backup
Create backups of your chute configurations.
chutes backup <chute_name> [OPTIONS]
Options:
--include-data: Include persistent data
--output TEXT: Output file path
--compress: Compress backup
Examples:
# Backup configuration
chutes backup my-chute --output my-chute-backup.json
# Full backup with data
chutes backup my-chute --include-data --compress
chutes restore
Restore chute from backup.
chutes restore <backup_file> [OPTIONS]
Options:
--name TEXT: New chute name
--force: Overwrite existing chute
Examples:
# Restore from backup
chutes restore my-chute-backup.json
# Restore with new name
chutes restore my-chute-backup.json --name my-chute-restored
Automation and Scripting
Bash Scripting
#!/bin/bash# Health check scriptcheck_chute_health() {
local chute_name=$1echo"Checking health of $chute_name..."# Get chute status
status=$(chutes chutes get $chute_name --format json | jq -r '.status')
if [ "$status" != "Running" ]; thenecho"ERROR: Chute $chute_name is $status"return 1
fi# Check health endpoint
health=$(chutes health $chute_name --format json | jq -r '.healthy')
if [ "$health" != "true" ]; thenecho"ERROR: Chute $chute_name health check failed"return 1
fiecho"SUCCESS: Chute $chute_name is healthy"return 0
}
# Check all chutes
chutes chutes list --format json | jq -r '.[].name' | whileread chute; do
check_chute_health $chutedone
Python Scripting
#!/usr/bin/env python3import subprocess
import json
import sys
defrun_chutes_command(command):
"""Run chutes CLI command and return JSON output."""try:
result = subprocess.run(
f"chutes {command}".split(),
capture_output=True,
text=True,
check=True
)
return json.loads(result.stdout)
except subprocess.CalledProcessError as e:
print(f"Command failed: {e}")
returnNonedefmonitor_chutes():
"""Monitor all chutes and alert on issues."""
chutes = run_chutes_command("chutes list --format json")
ifnot chutes:
print("Failed to get chute list")
returnfor chute in chutes:
name = chute['name']
status = chute['status']
if status != 'Running':
print(f"ALERT: {name} is {status}")
continue# Check metrics
metrics = run_chutes_command(f"metrics {name} --format json")
if metrics:
cpu = metrics.get('cpu_usage', 0)
memory = metrics.get('memory_usage', 0)
if cpu > 90:
print(f"ALERT: {name} high CPU usage: {cpu}%")
if memory > 90:
print(f"ALERT: {name} high memory usage: {memory}%")
if __name__ == "__main__":
monitor_chutes()