| name | vastai-upgrade-migration |
| description | Upgrade Vast.ai CLI, migrate API versions, and handle breaking changes.
Use when upgrading vastai CLI, detecting deprecations,
or migrating between API versions.
Trigger with phrases like "upgrade vastai", "vastai migration",
"vastai breaking changes", "update vastai CLI".
|
| allowed-tools | Read, Write, Edit, Bash(pip:*), Bash(vastai:*) |
| version | 1.11.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","vast-ai","api","migration"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Vast.ai Upgrade & Migration
Current State
!vastai --version 2>/dev/null || echo 'vastai CLI not installed'
!pip show vastai 2>/dev/null | grep -E "^(Name|Version)" || echo 'N/A'
Overview
Upgrade the Vast.ai CLI and Python SDK, handle API changes, and migrate between GPU configurations. The CLI is distributed via PyPI as vastai and tracks the REST API at cloud.vast.ai/api/v0.
Prerequisites
- Current
vastai CLI installed
- Active instances inventory documented
- Backup of any custom scripts using the API
Instructions
Step 1: Check Current Version and Upgrade
vastai --version
pip show vastai | grep Version
pip install --upgrade vastai
vastai --version
vastai show user
Step 2: Detect Breaking Changes
import subprocess
def get_cli_commands():
result = subprocess.run(["vastai", "--help"], capture_output=True, text=True)
commands = set()
for line in result.stdout.split('\n'):
stripped = line.strip()
if stripped and not stripped.startswith('-') and not stripped.startswith('usage'):
cmd = stripped.split()[0] if stripped.split() else ""
if cmd.isalpha():
commands.add(cmd)
return commands