Command Reference
Complete reference for all Lium CLI commands.
Global Options​
Options available for all commands:
--help
: Show help message--version
: Display CLI version--config PATH
: Use alternate config file--debug
: Enable debug output
Core Commands​
lium init
​
Initialize configuration and setup.
lium init [OPTIONS]
Options:
--api-key KEY
: Set API key non-interactively--ssh-key PATH
: Path to SSH private key--force
: Overwrite existing configuration
Example:
lium init --api-key abc123 --ssh-key ~/.ssh/id_ed25519
lium ls
​
List available GPU executors.
lium ls [GPU_TYPE] [OPTIONS]
Arguments:
GPU_TYPE
: Filter by GPU type (H100, A100, RTX4090, etc.)
Options:
--region REGION
: Filter by region--min-memory GB
: Minimum GPU memory--max-price USD
: Maximum price per hour--format FORMAT
: Output format (table, json, csv)
Examples:
lium ls # List all executors
lium ls H100 # Only H100 GPUs
lium ls --max-price 2.5 # Under $2.50/hour
lium ls --format json # JSON output
lium up
​
Create a new pod.
lium up [EXECUTOR] [OPTIONS]
Arguments:
EXECUTOR
: Executor index fromlium ls
or executor ID
Options:
--name NAME
: Pod name (auto-generated if not specified)--ports PORTS
: Exposed ports (comma-separated)--env KEY=VALUE
: Environment variables--volume LOCAL:REMOTE
: Mount volumes--yes, -y
: Skip confirmation
Note: You'll be prompted to select a template from available options when creating a pod. You can filter templates during selection.
Examples:
lium up 1 # Use executor #1
lium up --name dev-pod # Named pod (select template interactively)
lium up 1 --ports 8080,8888 --yes # Expose ports
lium up --env CUDA_VISIBLE_DEVICES=0 # Set environment variable
lium ps
​
List your active pods.
lium ps [OPTIONS]
Options:
--all, -a
: Show all pods including stopped--format FORMAT
: Output format (table, json, csv)--sort FIELD
: Sort by field (name, status, cost, uptime)
Examples:
lium ps # Show running pods
lium ps --all # Include stopped pods
lium ps --format json # JSON output
lium ps --sort cost # Sort by cost
lium ssh
​
SSH into a pod.
lium ssh POD [OPTIONS]
Arguments:
POD
: Pod name or index fromlium ps
Options:
--command CMD
: Execute command and exit--port PORT
: SSH port (default: 22)--key PATH
: Use specific SSH key
Examples:
lium ssh my-pod # Interactive SSH
lium ssh 1 # SSH to pod #1
lium ssh my-pod --command "nvidia-smi" # Run command
lium exec
​
Execute command on pod.
lium exec POD COMMAND [OPTIONS]
Arguments:
POD
: Pod name or indexCOMMAND
: Command to execute
Options:
--timeout SECONDS
: Command timeout--output FILE
: Save output to file
Examples:
lium exec my-pod "python train.py"
lium exec 1 "nvidia-smi" --output gpu_info.txt
lium exec all "pip install numpy" # Run on all pods
lium scp
​
Copy files to pods.
lium scp POD LOCAL_FILE [REMOTE_PATH] [OPTIONS]
Arguments:
POD
: Pod name, index, comma-separated list, or "all"LOCAL_FILE
: Local file to copyREMOTE_PATH
: Destination path (default: /root/)
Options:
--recursive, -r
: Copy directories recursively--preserve, -p
: Preserve file attributes
Examples:
lium scp my-pod ./script.py # Copy to /root/
lium scp 1 ./data.csv /root/datasets/ # Specific destination
lium scp all ./config.json # Copy to all pods
lium scp 1,2,3 ./model.py /root/models/ # Multiple pods
lium scp my-pod ./folder -r # Copy directory
lium rsync
​
Synchronize directories to pods.
lium rsync POD LOCAL_DIR [REMOTE_PATH] [OPTIONS]
Arguments:
POD
: Pod name, index, list, or "all"LOCAL_DIR
: Local directory to syncREMOTE_PATH
: Destination path
Options:
--delete
: Delete files not in source--exclude PATTERN
: Exclude files matching pattern--dry-run
: Show what would be synced
Examples:
lium rsync my-pod ./project # Sync project
lium rsync 1 ./data /root/datasets/ # Specific path
lium rsync all ./configs --delete # Mirror exactly
lium rsync my-pod ./code --exclude "*.pyc" # Exclude files
lium rm
​
Remove/stop pods.
lium rm POD [POD...] [OPTIONS]
Arguments:
POD
: Pod name(s) or "all"
Options:
--force, -f
: Force removal without confirmation--keep-volumes
: Preserve pod volumes
Examples:
lium rm my-pod # Remove single pod
lium rm pod1 pod2 pod3 # Remove multiple
lium rm all # Remove all pods
lium rm my-pod --force # Skip confirmation
Template Commands​
lium templates
​
List available Docker templates.
lium templates [SEARCH] [OPTIONS]
Arguments:
SEARCH
: Search term to filter templates
Options:
--category CAT
: Filter by category (ml, web, database, etc.)--format FORMAT
: Output format
Examples:
lium templates # List all templates
lium templates pytorch # Search for pytorch
lium templates --category ml # ML templates only
Financial Commands​
lium fund
​
Fund account with TAO from Bittensor wallet.
lium fund [OPTIONS]
Options:
--wallet, -w NAME
: Wallet name--hotkey, -h NAME
: Hotkey name--amount, -a AMOUNT
: Amount of TAO to transfer--yes, -y
: Skip confirmation
Examples:
lium fund # Interactive mode
lium fund -w default -a 10.0 # Fund 10 TAO
lium fund -w mywallet -h hotkey1 -a 5.0 -y # Skip confirmation
Configuration Commands​
lium config
​
Manage configuration.
lium config SUBCOMMAND [OPTIONS]
Subcommands:
show
: Display current configurationset
: Set configuration valueget
: Get configuration valueedit
: Open configuration in editor
Examples:
lium config show # Show all config
lium config get api.api_key # Get specific value
lium config set ssh.key_path ~/.ssh/new_key
lium config edit # Open in editor
lium theme
​
Change CLI color theme.
lium theme [THEME_NAME]
Arguments:
THEME_NAME
: Theme to apply (optional, shows menu if not provided)
Available Themes:
default
: Default colorsmonokai
: Monokai color schemesolarized
: Solarized darkdracula
: Dracula themenord
: Nord theme
Examples:
lium theme # Interactive theme selector
lium theme monokai # Apply Monokai theme
Advanced Usage​
Batch Operations​
Many commands support batch operations:
# Execute on multiple pods
lium exec 1,2,3 "apt update"
lium exec all "nvidia-smi"
# Copy to multiple pods
lium scp 1,2,3 ./config.json
lium scp all ./requirements.txt
# Sync to all pods
lium rsync all ./project
Using Pod Indices​
Use numbers from lium ps
output:
lium ps # Note pod numbers
lium ssh 1 # SSH to pod #1
lium exec 2 "ls" # Execute on pod #2
lium rm 3 # Remove pod #3
Environment Variables​
Override configuration with environment variables:
LIUM_API_KEY=xyz lium ls
LIUM_SSH_KEY=/tmp/key lium ssh my-pod
Output Formats​
Many commands support different output formats:
lium ls --format json | jq '.[] | .gpu_type'
lium ps --format csv > pods.csv
Exit Codes​
0
: Success1
: General error2
: Configuration error3
: API error4
: SSH error5
: Pod not found6
: Permission denied
See Also​
- Quick Start Guide - Getting started with the CLI
- Installation Guide - Installation and setup