Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

vastai

БесплатноЗапускает вложенные скриптыНе проверен

Vast.ai CLI to manage GPU instances, volumes, serverless endpoints, and billing.

vast-aiот vast-ai★ 233 звезды на GitHub

Об этом скилле

vastai

Manage GPU instances, templates, volumes, serverless endpoints, SSH keys, and billing on Vast.ai.

Command is vastai (lowercase). Always use --raw for machine-readable JSON output.

Install

# Linux/macOS (recommended, no Python required)
curl -fsSL https://vast.ai/install.sh | bash

# or via PyPI (Windows, or if you'd rather use pip)
pip install vastai

Quick start

vastai set api-key <YOUR_API_KEY>                   # Authenticate (one-time); Create API Key in account at https://console.vast.ai/manage-keys/
vastai show user                                    # Verify auth + check balance
vastai create ssh-key ~/.ssh/id_ed25519.pub         # Register SSH key (do BEFORE create)
vastai search offers 'gpu_name=RTX_4090 num_gpus=1 verified=true direct_port_count>=1 rentable=true' -o 'dlperf_usd-'
# Note the offer ID from the output
vastai create instance <OFFER_ID> --image pytorch/pytorch:@vastai-automatic-tag --disk 20 --ssh --direct
# Automatically grab appropriate image tag; Response:  {"success": true, "new_contract": <INSTANCE_ID>}
vastai show instance <INSTANCE_ID>                  # Poll until actual_status == "running" (see Instance status values below)
vastai ssh-url <INSTANCE_ID>                        # Get SSH connection string
vastai copy local:./data/ <INSTANCE_ID>:/workspace/ # Upload files
vastai destroy instance <INSTANCE_ID> -y             # Clean up (stops all billing; -y skips confirmation)

API key: https://console.vast.ai/manage-keys/

Global flags

Available on every command:

--api-key KEY    Override stored API key
--raw            Output machine-readable JSON (agents should always use this)
--full           Print full results (don't page with less)
--explain        Show underlying API calls (useful for debugging)
--curl           Show equivalent curl command
--no-color       Disable colored output
--url URL        Override server REST API URL
--retry RETRY    Set retry limit for API calls
--version        Show CLI version

Query syntax

Search commands accept filter expressions. Operators: =, !=, >, >=, <, <=, in, notin.

# Examples
'gpu_name=RTX_4090 num_gpus=1'           # Exact match + numeric
'gpu_ram>=48 reliability>0.95'           # Greater-than filters
'geolocation=EU dph_total<=2.0'          # Region + price cap

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

vastai show instances                                    # List all your instances (fetches every page, no prompts)
vastai show instances --status running loading           # Filter by status
vastai show instances --gpu-name 'RTX 4090'              # Filter by GPU
vastai show instances --label training                   # Filter by label
vastai show instances --order-by start_date desc         # Sort by column
vastai show instances --cols id,status,gpu,dph           # Custom columns
vastai show instances --raw                              # Flat JSON list of all instances (scripting)
vastai show instance <id>                                # Poll single instance (use for status checks)
vastai create instance <offer-id> --image pytorch/pytorch:2.4.0-cuda12.4-cudnn9-runtime --disk 20 --ssh --direct
# Response includes "new_contract": <id> — that is your instance ID
vastai launch instance --gpu-name RTX_4090 --num-gpus 1 --image pytorch/pytorch
vastai start instance <id>                               # Start stopped instance
vastai stop instance <id>                                # Stop (preserves disk, no GPU charges)
vastai reboot instance <id>                              # Stop + start
vastai destroy instance <id> -y                          # Delete permanently (irreversible; -y required for non-interactive use)
vastai destroy instances <id1> <id2> -y                  # Batch delete (-y skips confirmation prompt)
vastai label instance <id> --label "training-run-1"      # Tag instance
vastai update instance <id>                              # Recreate from updated template
vastai prepay instance <id>                              # Deposit credits into reserved instance
vastai recycle instance <id>                             # Destroy + recreate

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

vastai/base-image:@vastai-automatic-tag          # Minimal Ubuntu base
vastai/pytorch:@vastai-automatic-tag             # PyTorch + CUDA
vastai/linux-desktop:@vastai-automatic-tag       # L
Полный SKILL.md на GitHub

Установить vastai в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Bash(vastai:*)

Вложенные файлы

__init__.py_base.pyapi/__init__.pyapi/auth.pyapi/billing.pyapi/client.pyapi/deployments.pyapi/endpoints.pyapi/instances.pyapi/keys.pyapi/machines.pyapi/metrics.pyapi/offers.pyapi/price_increase.pyapi/query.pyapi/storage.pyapi/teams.pyasync_/__init__.pyasync_/client.pyasync_/results.pycli/__init__.pycli/commands/__init__.pycli/commands/auth.pycli/commands/benchmarks.pycli/commands/billing.pycli/commands/deployments.pycli/commands/endpoints.pycli/commands/instances.pycli/commands/keys.pycli/commands/machines.pycli/commands/metrics.pycli/commands/misc.pycli/commands/offers.pycli/commands/price_increase.pycli/commands/repl.pycli/commands/storage.pycli/commands/teams.pycli/commands/uninstall.pycli/commands/update.pycli/display.py

FAQ

Что делает скилл vastai?

Vast.ai CLI to manage GPU instances, volumes, serverless endpoints, and billing.

Как установить скилл vastai?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл vastai запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить vastai с