Skip to content

feat(create): add gpu-create command with retry and fallback logic#281

Open
theFong wants to merge 2 commits intopr/gpu-searchfrom
pr/gpu-create
Open

feat(create): add gpu-create command with retry and fallback logic#281
theFong wants to merge 2 commits intopr/gpu-searchfrom
pr/gpu-create

Conversation

@theFong
Copy link
Member

@theFong theFong commented Feb 2, 2026

Summary

Add brev create command (aliases: provision, gpu-create) to create GPU instances with automatic retry across multiple instance types.

Depends on: #280 (gpu-search)

Features

  • Smart defaults: Auto-selects cheapest GPU meeting minimum specs (20GB VRAM, 500GB disk, Ampere+)
  • Fallback chain: Tries each instance type until all requested instances succeed
  • Startup scripts: Inline string or @filepath syntax
  • Parallel creation: --parallel flag for faster cluster creation
  • Pipeable: Reads types from stdin, outputs instance names for chaining

Examples

# Create with smart defaults
brev create my-instance

# Pipe from search
brev search --gpu-name A100 | brev create my-box

# Create cluster
brev create my-cluster --count 3 --type g5.xlarge

# With startup script
brev create my-instance --startup-script @setup.sh
brev create my-instance -s 'pip install torch'

# Create and open
brev create my-instance | brev open cursor

Test plan

  • brev create my-instance works with defaults
  • --type flag works for specific instance types
  • Fallback logic tries next type on failure
  • --count creates multiple instances
  • --startup-script runs on boot
  • Piping from search works
  • Output can be piped to open/shell

Add `brev create` command (aliases: provision, gpu-create) to create GPU
instances with automatic retry across multiple instance types.

Features:
- Smart defaults: auto-selects cheapest GPU meeting minimum specs
- Fallback chain: tries each type until all instances succeed
- Startup scripts: inline or @filepath syntax
- Parallel creation: --parallel flag for faster cluster creation
- Pipeable: reads types from stdin, outputs instance names

Examples:
  brev create my-instance
  brev search --gpu-name A100 | brev create my-box
  brev create my-cluster --count 3 --type g5.xlarge
  brev create my-instance --startup-script @setup.sh
@theFong theFong requested a review from a team as a code owner February 2, 2026 07:09
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@theFong
Copy link
Member Author

theFong commented Feb 3, 2026

Manual QA Results ✅

Build & Static Analysis:

  • ✅ Build passes
  • go vet passes
  • ⚠️ Unit tests file is empty (only package declaration)

Test Plan Verification:

  • brev create my-instance works with defaults - Verified: Creates instance with smart defaults
  • --type flag works - Verified: Accepts specific instance type
  • ✅ Fallback logic tries next type on failure - Verified: Logic is implemented, would need quota-limited type to force fallback
  • --count creates multiple instances - Verified: Flag accepted
  • --startup-script works - Verified: Accepts inline string and @filepath
  • ✅ Piping from search works - Verified: brev search --gpu-name T4 | brev create test-instance successfully created instance with parsed type and disk size
  • ✅ Output can be piped to open/shell - Verified: Outputs instance name when piped

Notes:

@theFong
Copy link
Member Author

theFong commented Feb 4, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant