Instance Creation

View as Markdown

Create instances with automatic GPU type selection, fallback chains, startup scripts, and composable piping.

brev create

$brev create [name] [flags]

Aliases: provision, gpu-create, gpu-retry, gcreate

Flags

FlagShortDescription
--name-nInstance name.
--type-tComma-separated instance types to try (fallback chain)
--count-cNumber of instances to create (default: 1)
--parallel-pParallel creation attempts (default: 1)
--startup-script-sScript to run on boot (inline string or @filepath)
--timeoutSeconds to wait for ready (default: 300)
--detached-dDon’t wait for instance to be ready.
--dry-runShow matching instance types without creating.

Search Filter Flags

All search filter flags are also available on brev create:

FlagShortDescription
--gpu-name-gFilter by GPU name (partial match)
--providerFilter by cloud provider.
--min-vram-vMinimum VRAM per GPU (GB)
--min-total-vramMinimum total VRAM (GB)
--min-capabilityMinimum GPU compute capability.
--min-diskMinimum disk size (GB)
--max-boot-timeMaximum boot time (minutes)
--stoppableOnly stoppable instances.
--rebootableOnly rebootable instances.
--flex-portsOnly instances with configurable firewall.
--sortSort by: price, vram, boot-time, etc.
--descSort descending.

Smart Defaults

When you run brev create without specifying --type or any filter flags, the CLI applies these defaults:

  • 20 GB minimum total VRAM
  • 500 GB minimum disk
  • Compute 8.0+ (Ampere or newer)
  • < 7 min boot time
  • Sorted by price (cheapest first)
$# Uses smart defaults — picks the cheapest GPU matching the above criteria
$brev create my-instance

Specifying Instance Types

Single Type

$brev create my-instance --type g5.xlarge

Fallback Chain

Provide a comma-separated list of types. The CLI tries each in order until one succeeds:

$brev create my-instance --type g5.xlarge,g5.2xlarge,g5.4xlarge

Using Search Filters

Apply the same filters available in brev search to narrow the type selection:

$brev create my-instance --gpu-name A100 --min-vram 40

Pipe brev search output directly into brev create:

$brev search --gpu-name A100 | brev create my-instance

Startup Scripts

Run scripts or commands automatically when the instance boots.

Inline Script

$brev create my-instance -s 'pip install torch'

File Reference (@filepath Syntax)

Prefix a local file path with @ to use its contents as the startup script:

$brev create my-instance -s @setup.sh
$brev create my-instance -s @./scripts/install-deps.sh

Clusters

Create multiple instances at once with --count:

$brev create my-cluster --count 3 --type g5.xlarge

Dry Run

Preview matching instance types without actually creating anything:

$brev create my-instance --dry-run
$brev create my-instance --gpu-name A100 --dry-run

Detached Mode

Skip waiting for the instance to be ready:

$brev create my-instance --detached

Output Piping

brev create outputs the instance name to stdout, enabling chaining with other commands:

$# Create and open in an editor
$brev create my-instance | brev open cursor
$
$# Create and run a command
$brev create my-instance | brev exec "nvidia-smi"
$
$# Create and run a setup script
$brev create my-instance | brev exec @setup.sh
$
$# Full pipeline: search, create, open
$brev search --gpu-name A100 | brev create my-box | brev open cursor

Examples

$# Simple creation with smart defaults
$brev create my-instance
$
$# Specific type with startup script
$brev create my-instance --type g5.xlarge -s @setup.sh
$
$# High-VRAM GPU with fallback
$brev create training-box --gpu-name A100 --min-vram 40
$
$# Create 3-node cluster
$brev create my-cluster --count 3 --type g5.xlarge
$
$# Preview what would be created
$brev create my-instance --dry-run
$
$# Full pipeline: search → create → setup → open
$brev search --gpu-name A100 | brev create my-box | brev exec @setup.sh