Skip to main content
Updated May 10, 2026 The Raff CLI (raff) is a single static binary that wraps the Raff public API for terminal use. Same API key auth as the dashboard, same role-based scoping, same resources — just driven from the command line. It’s the right tool for one-off operations, scripted workflows, and CI/CD pipelines. For declarative infrastructure (commit your VM and project definitions to git), use Terraform instead. CLI is imperative; Terraform is declarative.

What you can do with the CLI

ResourceCommands
Configureraff configure — set API key, base URL, default project
Virtual Machinesraff vm — full lifecycle: create, delete, power, reboot, hard-reboot, reinstall, factory-reset, rename, reset-password, resize, resize-disk, save-image, plus IP / firewall / VPC attach-detach, tags, notes, networks
Volumesraff volume — list, get, create, delete, resize, attach, detach
Snapshotsraff snapshot — list, get, create, rename, restore, delete
Backupsraff backup — backups + recurring schedules with retention
VPCsraff vpc — list, get, create, update, delete, cidr-suggestions
Public IPsraff ip — list, get, reserve, release, change
Firewallsraff security-group — list, templates, get, create, update, delete
SSH Keysraff ssh-key — register, list, rename, delete
API Keysraff api-key — create, regenerate, revoke
Projectsraff project — list, get, create, update, delete + members
Membersraff member — account-level membership
Roles & Permissionsraff role, raff permission — IAM
Invitationsraff invitation — send + cancel
Catalog / lookupraff region, raff template, raff pricing — discovery for required IDs
Every command supports --output json for parseable output (default is human-readable tables). Every command honors the same auth precedence: CLI flag > env var > config file.

Quick start

# Install
go install github.com/RaffTechnologies/raff-cli/cmd/raff@latest

# Configure (writes to ~/.raff/config.yaml)
raff configure

# Pick the project you want to work with
raff project list

# Create a VM
raff vm create \
  --name web-01 \
  --template-id <template-uuid> \
  --pricing-id 9 \
  --region us-east \
  --project-id <project-id>

# Watch it come up
raff vm list --output json | jq '.[] | {name, status}'

# When you're done
raff vm delete <vm-id>

Authentication and configuration

The CLI looks for credentials in this order:
  1. CLI flags (--api-key, --api-url, --project-id)
  2. Environment variables (RAFF_API_KEY, RAFF_API_URL, RAFF_PROJECT_ID)
  3. Config file (~/.raff/config.yaml)
raff configure walks you through writing the config file. Multiple profiles are supported with --profile <name> so you can keep prod, staging, and dev credentials side-by-side. For CI/CD where there’s no interactive shell, set RAFF_API_KEY and RAFF_PROJECT_ID as secrets and skip the config file entirely. See Configure for the full setup walkthrough.

Output formats

# Default table output — human-readable
raff vm list

# JSON output — for scripting
raff vm list --output json

# Pipe through jq for transformations
raff vm list --output json | jq '.[] | select(.status == "running") | .id'
The JSON shape matches the public API response schema. Anything you can do with curl you can do with raff <command> --output json.

Cross-cutting flags

FlagWhat it does
--api-url <url>Override the API base URL — defaults to production
--api-key <key>Override the API key for this command
--project-id <uuid>Override the default project for this command
-o, --output <format>table (default) or json
--profile <name>Use a named profile from your config file
--helpShow help for any command (raff vm --help, raff vm create --help, etc.)

What’s covered

The CLI tracks the public API surface — everything in the API Reference is available through the CLI. Admin-only endpoints (admin-service has its own internal tooling) are not exposed; this is by design. Customer-facing parity is full.

Where to go next

Install the CLI

Build from source, install via go, or grab a release binary.

Configure

Set up API key, profiles, and defaults.

VM commands

The full set of VM commands with examples.

Volume commands

Block storage management.

Backup commands

Backups + recurring schedules.

Project commands

Create and manage projects.
Last modified on May 11, 2026