Skip to main content

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

Verify installation:

Configuration

Initial Setup

You’ll be prompted for: Configuration is saved to ~/.galadriel/config.yaml:

Environment Variables

Override config with environment variables:

Marketplace Commands

Create Buy Order

Market Order (Instant)

Options:
  • --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)

Additional Options:
  • --price - Maximum price per GPU/hour
  • --start - Start time (ISO 8601, default: now)

Flexible Order (Best Price)

Additional Options:
  • --flex - Time window for execution

List Orders

Output:

Get Order Status

Output:

Cancel Order

Orderbook Commands

View Orderbook

Output:
Options:
  • --gpu-type - GPU type
  • --zone - Availability zone
  • --depth - Number of price levels (default: 10)

View Prices

Get Price Estimate

Output:

Lease Management

List Leases

Output:

Get Lease Details

Output:

Get Kubeconfig

SSH Access

Resell Lease

Output:

Terminate Lease

Inventory Commands

View Inventory

Output:

Billing Commands

View Usage

Output:

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

Ensure the CLI is in your PATH:
If not found, add to PATH:
Check your API token:
Reconfigure if needed:
Check the orderbook to see if your price is competitive:
Cancel and retry with better price or use market order.

Debug Mode

Enable verbose logging:

Next Steps

API Reference

REST API documentation

SDK Guide

Python and TypeScript SDKs

Examples

Real-world usage examples

Quickstart

Get started in 5 minutes