CLI Guide
The Galadriel CLI is a command-line tool for interacting with the GPU marketplace. It provides a kubectl-style interface for managing orders, leases, and marketplace operations.Installation
Configuration
Initial Setup
- API token (get from https://app.galadriel.com/settings/tokens)
- Default zone (e.g.,
us-west-1) - SSH public key (optional)
~/.galadriel/config.yaml:
Environment Variables
Override config with environment variables:Marketplace Commands
Create Buy Order
Market Order (Instant)
--gpu-type- GPU type:h100,h200,b200,b300--gpus- Number of GPUs (multiple of 8)--duration- Duration:12h,24h,7d, etc.--zone- Availability zone--type- Order type (default:market)
Limit Order (Wait for Price)
--price- Maximum price per GPU/hour--start- Start time (ISO 8601, default: now)
Flexible Order (Best Price)
--flex- Time window for execution
List Orders
Get Order Status
Cancel Order
Orderbook Commands
View Orderbook
--gpu-type- GPU type--zone- Availability zone--depth- Number of price levels (default: 10)
View Prices
Get Price Estimate
Lease Management
List Leases
Get Lease Details
Get Kubeconfig
SSH Access
Resell Lease
Terminate Lease
Inventory Commands
View Inventory
Billing Commands
View Usage
View Invoices
Global Options
All commands support these global flags:Examples
Bash Completion
Setup
Usage
After setup, tab completion works:Advanced Usage
Piping and Scripting
Watch Mode
Aliases
Add to your~/.bashrc or ~/.zshrc:
Troubleshooting
Common Issues
Command not found
Command not found
Ensure the CLI is in your PATH:If not found, add to PATH:
Authentication failed
Authentication failed
Check your API token:Reconfigure if needed:
Order not filling
Order not filling
Check the orderbook to see if your price is competitive:Cancel and retry with better price or use market order.