*** title: Search & Discovery description: >- Find GPU and CPU instance types with filtering, sorting, and structured output using the Brev CLI. ------------------- Search for available instance types across cloud providers, filter by hardware specs, and pipe results directly into `brev create`. ## brev search ```bash brev search [gpu|cpu] [flags] ``` **Aliases:** `gpu-search`, `gpu`, `gpus`, `gpu-list` The `search` command has two subcommands: * `brev search` or `brev search gpu` — GPU instances (default) * `brev search cpu` — CPU-only instances ## GPU Search Search for GPU instance types with filtering by GPU model, VRAM, compute capability, and more. ```bash brev search [flags] brev search gpu [flags] ``` ### GPU Flags | Flag | Short | Description | | ------------------ | ----- | -------------------------------------------------------------------------------- | | `--gpu-name` | `-g` | Filter by GPU name (case-insensitive, partial match) | | `--provider` | `-p` | Filter by cloud provider. | | `--min-vram` | `-v` | Minimum VRAM per GPU (GB) | | `--min-total-vram` | `-t` | Minimum total VRAM across all GPUs (GB) | | `--min-capability` | `-c` | Minimum GPU compute capability. | | `--min-disk` | | Minimum disk size (GB) | | `--max-boot-time` | | Maximum boot time (minutes) | | `--stoppable` | | Only stoppable instances. | | `--rebootable` | | Only rebootable instances. | | `--flex-ports` | | Only instances with configurable firewall. | | `--sort` | `-s` | Sort by: `price`, `gpu-count`, `vram`, `total-vram`, `vcpu`, `disk`, `boot-time` | | `--desc` | `-d` | Sort descending. | | `--json` | | Output as JSON. | | `--wide` | `-w` | Show extra columns (RAM, ARCH) | ### GPU Examples ```bash # List all available GPUs (sorted by price) brev search # Wide mode with extra columns brev search gpu --wide # Filter by GPU model brev search --gpu-name A100 brev search --gpu-name H100 # Filter by VRAM brev search --min-vram 40 --sort price # Fast-booting GPUs brev search --max-boot-time 3 --sort price # Stoppable instances with minimum VRAM brev search --stoppable --min-total-vram 40 --sort price ``` ## CPU Search Search for CPU-only instance types (no GPU). ```bash brev search cpu [flags] ``` ### CPU Flags | Flag | Short | Description | | ----------------- | ----- | ----------------------------------------------------------------- | | `--provider` | `-p` | Filter by cloud provider. | | `--arch` | | Filter by architecture (`x86_64`, `arm64`) | | `--min-ram` | | Minimum RAM in GB. | | `--min-disk` | | Minimum disk size (GB) | | `--min-vcpu` | | Minimum number of vCPUs. | | `--max-boot-time` | | Maximum boot time (minutes) | | `--stoppable` | | Only stoppable instances. | | `--rebootable` | | Only rebootable instances. | | `--flex-ports` | | Only instances with configurable firewall. | | `--sort` | `-s` | Sort by: `price`, `vcpu`, `type`, `provider`, `disk`, `boot-time` | | `--desc` | `-d` | Sort descending. | | `--json` | | Output as JSON. | ### CPU Examples ```bash # All CPU instances brev search cpu # AWS CPU instances brev search cpu --provider aws # High-memory instances brev search cpu --min-ram 64 --sort price # ARM architecture brev search cpu --arch arm64 # Many-core instances brev search cpu --min-vcpu 16 --sort price # Pipe to create brev search cpu --min-ram 64 | brev create my-cpu-box ``` ## Compute Capability Reference GPU compute capability indicates the architecture generation. Use `--min-capability` to filter. | Capability | Architecture | GPUs | | ---------- | ------------ | -------------- | | 7.0 | Volta | V100 | | 7.5 | Turing | T4, RTX 20xx | | 8.0 | Ampere | A100, A10, A30 | | 8.6 | Ampere | RTX 30xx, A40 | | 8.9 | Ada Lovelace | L40, RTX 40xx | | 9.0 | Hopper | H100 | ```bash # Ampere or newer brev search --min-capability 8.0 # Hopper only brev search --min-capability 9.0 ``` ## Output Formats ### Table Output (Default) When run interactively, `brev search` displays a formatted table: ``` TYPE GPU COUNT VRAM TOTAL $/HR BOOT FEATURES g5.xlarge A10G 1 24GB 24GB $1.00 2m S R P g5.2xlarge A10G 1 24GB 24GB $1.20 2m S R P p4d.24xlarge A100 8 40GB 320GB $32.77 5m S R ``` ### Features Column | Code | Meaning | | ----- | ----------------------------------------------- | | **S** | Stoppable — can stop/restart without data loss. | | **R** | Rebootable — can reboot the instance. | | **P** | Flex Ports — can modify firewall rules. | ### JSON Output Use `--json` for structured output. Process results with `jq`: ```bash brev search --json | jq '.[] | {type, gpu_name, price}' ``` ### Piped Output When stdout is piped to another command, `brev search` outputs instance type names only (one per line), enabling direct chaining with `brev create`: ```bash brev search --gpu-name A100 | brev create my-instance ``` ## Common Filter Recipes ### Development (Fast and Cheap) ```bash brev search --max-boot-time 3 --sort price ``` ### ML Training (High VRAM) ```bash brev search --min-vram 40 --sort price ``` ### Large Model Training ```bash brev search --min-total-vram 80 --sort price ``` ### Production (Fast and Reliable) ```bash brev search --gpu-name A100 --max-boot-time 5 --sort price ``` ### Budget Conscious ```bash brev search --min-vram 16 --sort price | head -5 ``` ### Latest Architecture ```bash brev search --min-capability 9.0 --sort price ```