vast-ai/vast-cli/vastai
Claude Code and agent skill by vast-ai/vast-cli
- community
Checking that the SKILL.md file is still in the repository.
Vast.ai CLI to manage GPU instances, volumes, serverless endpoints, and billing.
Install
npx vskill@latest install vast-ai/vast-cli/vastaiSKILL.md
vastai
Manage GPU instances, templates, volumes, serverless endpoints, SSH keys, and billing on Vast.ai.
Command isvastai(lowercase). Always use--rawfor machine-readable JSON output.
Install
Quick start
API key: https://console.vast.ai/manage-keys/
Global flags
Available on every command:
Query syntax
Search commands accept filter expressions. Operators: =, !=, >, >=, <, <=, in, notin.
Common filter fields: num_gpus, gpu_name, gpu_ram, cpu_ram, disk_space, reliability, compute_cap, inet_up, inet_down, dph_total, geolocation, direct_port_count, verified, rentable
Common sort fields: score (default — overall value), dlperf_usd (DL perf per dollar), dph_total (price), num_gpus, reliability
Commands
Instances
Recommended Vast.ai images (use @vastai-automatic-tag to get the right tag for the machine automatically; browse pre-configured models at https://vast.ai/model-library):
<!-- Note: @vastai-automatic-tag is resolved server-side — CLI passes it unchanged -->
create instance flags:
--image IMAGE— Docker image--disk DISK— Local disk in GB--ssh/--jupyter— Connection type--direct— Faster direct connections--label LABEL— Instance label--env ENV— Env vars and port mappings, e.g.'-e TZ=UTC -p 8080:8080'--onstart FILE— Path to a startup script file--onstart-cmd CMD— Startup script as inline string (for longer scripts use--onstartor gzip+base64 encode)--bid_price PRICE— Interruptible (spot) pricing in $/hr--template_hash HASH— Create from template--create-volume ID— Attach new volume--link-volume ID— Attach existing volume--cancel-unavail— Fail if no machine available (vs. create stopped)
Instance status values:
actual_status | Meaning | |
|---|---|---|
null | Provisioning | |
created | Instance created, not yet provisioned | |
loading | Image downloading / container starting | |
running | Active — GPU charges apply | |
stopped | Halted — disk charges only | |
frozen | Paused with memory — GPU charges apply | |
exited | Container process exited unexpectedly | |
rebooting | Restarting (transient) | |
unknown | No recent heartbeat from host | |
offline | Host disconnected from Vast servers |
Poll loop warning: Ifactual_statusbecomesexited,unknown, orofflineit will never reachrunning. Always add a timeout and error branch — otherwise your script loops forever while disk charges accrue. Destroy and retry with a different offer.
Charges: Storage charges begin at creation. GPU charges begin when status reachesrunning.
Interruptible (spot) rentals
Interruptible (spot) instances are priced below on-demand instances, but can be interrupted at any time by another user with a lower bid. Note: search offers --type bid exposes min_bid, but create instance defaults to on-demand at `dph_total` unless you pass --bid_price <floor>. Always pass --bid_price after a --type bid search, otherwise the instance will be rented as an on-demand instance/price instead of as an interruptible.
When outbid, the instance moves to stopped (not destroyed) and storage charges continue. Resume by raising the bid via update instance --bid_price.
Search
search offers flags: --type on-demand|reserved|bid, --order/-o FIELD[-], --limit, --storage GB, --no-default/-n
SSH & File Transfer
Note: ssh-url returns a connection string — it does not open an interactive session. Use $(vastai ssh-url <id>) to extract the URL, or parse --raw JSON output.
File Copy
cloud copy flags: --src, --dst, --instance, --connection, --transfer
Location formats: [instance_id:]path (legacy), C.instance_id:path, V.volume_id:path, cloud_service[.id]:path, local:path. Volume copy is currently only supported for copying to other volumes, instances, or cloud services, not local. Never copy to /root or / — it breaks ssh permissions on the instance and future copies fail.
Logs & Exec
Volumes
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassedPattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingvastai/SKILL.md
Popularity
- Repository stars
- 206
- Repository forks
- 88
- 7-day trend score
- 27
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 21 Jul 2026, 3 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/vast-ai/vast-cli/vastai)