CLI Automation
Automate GPU rentals with the clore CLI — bash scripts, CI/CD pipelines, monitoring, and batch operations
Basic Workflow
The core loop: search → deploy → connect → cancel.
# 1. Find a GPU
clore search --gpu "RTX 4090" --max-price 2.0 --sort price --limit 5
# 2. Deploy (use a server ID from step 1)
clore deploy 142 \
--image cloreai/ubuntu22.04-cuda12 \
--type on-demand \
--currency bitcoin \
--ssh-password MySecurePass \
--port 22:tcp \
--port 8888:http
# 3. Check your orders
clore orders
# 4. SSH into the server
clore ssh 38
# 5. Cancel when done
clore cancel 38
# 6. Check wallet balance
clore walletsCLI Command Reference
clore search
Search GPU marketplace
clore deploy <server_id>
Create a new order
clore orders
List active orders
clore orders --completed
List all orders including completed
clore ssh <order_id>
SSH into an active order
clore cancel <order_id>
Cancel an order
clore wallets
Show wallet balances
clore servers
List your hosted servers
clore server-config <name>
Show server configuration
clore spot <server_id>
View spot market for a server
clore spot-price <order_id> <price>
Set spot price for an order
clore config set <key> <value>
Set config value
clore config get <key>
Get config value
clore config show
Show all config
Scripting with CLI
Deploy and Wait for SSH
Find Cheapest GPU and Deploy
Cancel All Orders
CI/CD Integration
GitHub Actions: Deploy GPU for Training
GitLab CI: Batch Processing
Monitoring
Check Orders Periodically
Python Monitoring Script
Batch Operations
Deploy on Multiple Servers
Batch Deploy with Python (Async)
Usage:
Spot Market Scanner
Cron Jobs
Daily GPU Price Check
Hourly Balance Check
Tips
Always set
CLORE_API_KEYas an environment variable in scripts and CIAdd
sleep 6between deploy commands in bash loops to respect rate limitsUse
--type spotfor batch/CI jobs — cheaper and interruptible is fineCancel orders in
after_script/if: always()to avoid forgotten billingStore SSH passwords in secrets (GitHub Secrets, GitLab CI Variables, etc.)
Use
clore orders --completedto audit past usage
Next Steps
Python SDK Guide — Full SDK reference with async patterns
Batch Processing — Process large AI workloads
API Integration — Connect AI services to your apps
Last updated
Was this helpful?