Remote Execution
Execute CLIO tasks on remote systems via SSH
Overview
CLIO can execute tasks on remote systems, offloading work to other machines while you control everything from your local terminal.
How It Works
- CLIO copies itself to the remote system via rsync
- Configures the remote CLIO with your API provider
- Executes your task on the remote system
- Returns results to your local session
- Optionally retrieves generated files
- Cleans up automatically (unless you specify otherwise)
Basic Usage
Single Remote Execution
: /remote exec user@hostname "analyze log files in /var/log"
With File Retrieval
: /remote exec user@server "generate report" --retrieve report.pdf
Keep CLIO Installed
: /remote exec user@server "task description" --no-cleanup
Configuration
Device Registry
Register frequently-used devices in ~/.clio/devices.json
Using Registered Devices
: /remote exec build-server "compile project"
Parallel Execution
Run on Multiple Devices
# Execute on device group
: /remote parallel servers "check disk space"
# Execute on all devices
: /remote parallel all "update dependencies"
Advanced Options
| Option | Description |
|---|---|
--model MODEL |
Specify AI model for remote |
--provider PROVIDER |
Specify AI provider |
--working-dir PATH |
Remote working directory |
--ssh-key PATH |
SSH private key |
--port NUM |
SSH port (default: 22) |
--timeout SECS |
Execution timeout |
--no-cleanup |
Leave CLIO installed |
--retrieve FILES |
Files to fetch from remote |
Use Cases
Build on Remote Server
: /remote exec build-server "compile release build" --retrieve dist/app.tar.gz
Analyze Logs on Production
: /remote exec prod-server "analyze nginx logs for errors in last hour"
GPU Work on Dedicated Machine
: /remote exec gpu-box "train model with dataset.csv" --retrieve model.pth
Fleet Management
: /remote parallel servers "check for security updates"
Security
- API keys are passed via environment variables (not persisted on remote)
- SSH key authentication recommended over passwords
- CLIO cleans up by default (removes itself after execution)
- All communication over SSH
Next Steps
- Multi-Agent - Parallel local agents
- Workflows - Effective patterns
- Configuration - Advanced settings