Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Vast.ai CLI

$ vastai Official High Risk
Vast.ai · AI & Media · MIT · macos / linux / windows

Vast.ai CLI (vastai) searches the Vast.ai GPU marketplace (vastai search offers), rents and destroys GPU instances (create instance, destroy instance), manages volumes, and prints SSH connection URLs (ssh-url). Passing --raw outputs raw machine-readable JSON across commands, alongside --explain for API debugging.

FCRS-1.0 Score
80 /100
Good
Medium Confidence
Zero-Friction Install
pip install vastai
CLI vs MCP Decision CLI Only

vastai exposes marketplace query filters and --raw JSON directly in the terminal for GPU provisioning and SSH setup.

Agent-Readiness Checklist

✓ JSON Output
✓ Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 21 / 25

Global --raw outputs JSON across search and instance commands, --api-key supports stateless runs, and query expressions filter offers server-side.

  • Global --raw JSON output across search and show commands
  • Inline query syntax (gpu_name=...) and --explain flag
Trust & Safety 17 / 25

Lacks --dry-run; create instance starts immediate billing and destroy instance permanently wipes the instance.

  • Immediate billing on create instance and irreversible destroy instance without --dry-run
Setup & Portability 12 / 15

Installable via pip install vastai across macOS, Linux, and Windows, or standalone install.sh on macOS/Linux.

  • PyPI package and standalone curl installer script
Utility & Efficiency 13 / 15

Rich query filtering (search offers), instance lifecycle, volume/S3 sync, and ssh-url helpers.

  • Server-side offer filtering and ssh-url automation
Maintenance & Lineage 9 / 10

Official vast-ai/vast-cli repository under MIT license.

  • Official vast-ai/vast-cli repo (MIT)
Docs & Verifiability 8 / 10

Full CLI reference at docs.vast.ai and --help / --explain support.

  • Official CLI reference at docs.vast.ai/api-reference/cli-commands

Security, Auth & Guardrails

Auth Modes
Config File Env API Key
Credential Storage

vastai set api-key stores the key in ~/.config/vastai/vast_api_key (or accepts --api-key <key> per invocation).

Side Effects
Read-Only Remote Write Destructive Billing Impact
Cost & Quotas

MIT open-source CLI; renting instances incurs immediate per-hour GPU and storage marketplace charges.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Vast.ai CLI Agent Rules
- Always pass `--raw` on `search` and `show` queries for deterministic JSON parsing.
- Never execute `vastai create instance` or `vastai destroy instance` without explicit user confirmation, as rentals bill immediately and destruction wipes disks.

Agent-Ready Command Recipes

Safe Read-Only Queries

Search available GPU offers as raw JSON
vastai search offers 'gpu_name=RTX_4090 num_gpus=1 rentable=true' --raw

Queries rentable single-GPU RTX 4090 marketplace offers in structured JSON.

List active rented instances as raw JSON
vastai show instances --raw

Returns current Vast.ai instances, status, costs, and SSH endpoints as JSON.

Controlled Writes & Previews

Stop a running instance without destroying its disk
vastai stop instance <instance_id>

Stops GPU compute billing on an instance while retaining storage rather than destroying it.

Strengths for Agents

  • + Global --raw flag produces clean JSON across marketplace queries and instance inspection.
  • + Expressive server-side filtering ('gpu_name=RTX_4090 num_gpus=1') avoids huge response payloads.

Caveats & Pitfalls

  • ! No --dry-run guard before create instance (billing) or destroy instance (data loss).
  • ! Default API key setup writes to ~/.config/vastai/vast_api_key unless --api-key is passed.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI