Brev CLI for GPU/CPU Cloud Instances

VerifiedCaution

Manage GPU and CPU cloud instances with the Brev CLI: creation, search, SSH, file transfer, and port forwarding for ML/AI workloads.

Sby Skills Guide Bot
DevOpsIntermediate
9/11/2026
Claude Code
#gpu#cloud-compute#cli#instance-management#ml-infrastructure

Recommended for

Automated summary

Provides command-line workflows for searching, creating, connecting to, and managing Brev GPU/CPU cloud instances for ML and general compute.

Strengths

  • Offers copy-paste examples for filtered GPU/CPU search, instance creation, and access patterns.
  • Includes useful options such as --dry-run, fallback type lists, and startup scripts.
  • Covers interactive and non-interactive remote access, editor opening, file copying, and port forwarding.
  • Explicitly targets ML workloads including training, fine-tuning, inference, and batch jobs.

Limitations

  • Does not document installation, authentication, or Brev account setup.
  • Organization, deletion, and cost-control workflows are only briefly referenced.
  • The provided excerpt ends mid-command, so parts of the command reference are missing.
When to use it

Use when a user wants to provision or connect to Brev cloud GPU/CPU instances for ML or general compute tasks.

When not to use it

Do not use when the task does not involve Brev-managed cloud instances or when the Brev CLI is not installed and configured.

Security analysis

Caution
Quality score85/100

The skill is a legitimate cloud-management guide using Bash and network tools, not an exfiltration or local-destruction payload. However, it documents destructive and high-impact operations (bulk delete/stop, expensive multi-instance creation, public ports, remote script execution) and some examples conflict with its own confirmation rules, so it warrants caution rather than a safe rating.

Findings
  • •Provides Bash-driven commands for cloud instance lifecycle operations including create, stop, delete, exec, copy, and public port exposure; these are powerful and can incur cost or delete/expose resources.
  • •The 'Pipeable Workflows' examples include bulk stop/delete of all RUNNING/STOPPED instances and pattern-based stopping, which conflicts with the later requirement to confirm each destructive action explicitly.
  • •`brev exec @setup.sh`, `--startup-script @setup.sh`, and `brev copy` allow arbitrary remote code execution and file transfer on user-controlled cloud instances; legitimate but requires careful scoping.
  • •`brev ports create ... --public` can expose instance services to the internet, and `brev feedback` proactively sends diagnostics to a third party (warns against secrets but may still transmit sensitive issue text).
  • •Skill drives a full cloud-compute CLI via Bash: creating, stopping, and deleting remote instances, port forwarding, and file copy — powerful but legitimate for the stated purpose.
  • •Bulk destructive pipelines such as `brev ls | awk '/STOPPED/ {print $1}' | brev delete` and `... | brev stop` execute deletion/stop across many instances with no per-instance confirmation, which contradicts the skill's own 'Safety Rules - CRITICAL' requiring explicit user confirmation before delete/stop.
  • •`brev create --startup-script` and `brev exec @script.sh` execute arbitrary user/local code on remote machines (expected remote-execution surface, but worth noting).
  • •`brev feedback` sends text to a third-party vendor endpoint; the skill does warn against including secrets, but an agent could still transmit operational details.
How this analysis is made

Examples

Find and create a GPU instance
Search for an H100 GPU with at least 80 GB VRAM sorted by price, then create a Brev instance called llm-train using the cheapest match.
Connect and inspect a remote GPU
SSH into my Brev instance named experiment-1 and run nvidia-smi.
Create a CPU batch instance
Create a CPU-only Brev instance with 16 vCPUs and 64 GB RAM for a batch processing job, and open it in VS Code.

name: brev-cli description: Manage GPU and CPU cloud instances with the Brev CLI for ML workloads and general compute. Use when users want to create instances, search for GPUs or CPUs, SSH into instances, open editors, copy files, port forward, manage organizations, or work with cloud compute. Supports fine-tuning, reinforcement learning, training, inference, batch processing, and other ML/AI workloads. Trigger keywords - brev, gpu, cpu, instance, create instance, ssh, vram, vcpu, A100, H100, cloud gpu, cloud cpu, remote machine, finetune, fine-tune, RL, RLHF, training, inference, deploy model, serve model, batch job. allowed-tools: Bash, Read, AskUserQuestion argument-hint: "[create|search|shell|exec|open|ls|delete] [instance-name]"

<!-- Token Budget: - Level 1 (YAML): ~100 tokens - Level 2 (This file): ~1900 tokens (target <2000) - Level 3 (prompts/, reference/): Loaded on demand -->

Brev CLI

Manage GPU and CPU cloud instances from the command line. Create, search, connect, and manage remote machines.

When to Use

Use this skill when users want to:

  • Create GPU or CPU instances (with smart defaults or specific types)
  • Search for available GPU types (A100, H100, L40S, etc.)
  • Search for CPU-only instance types (no GPU)
  • SSH into instances or run commands remotely
  • Open editors (VS Code, Cursor, Windsurf) on remote instances
  • Copy files to/from instances
  • Port forward from remote to local
  • Manage organizations and instances

Trigger Keywords: brev, gpu, cpu, instance, create instance, ssh, vram, vcpu, A100, H100, cloud gpu, cloud cpu, remote machine, shell

Quick Start

# Search for GPUs (sorted by price)
brev search

# Search for CPU-only instances
brev search cpu

# Create an instance with smart defaults
brev create my-instance

# Create with specific type
brev create my-instance --type g5.xlarge

# List your instances
brev ls

# List external nodes (a separate list from `brev ls`)
brev ls nodes

# SSH into an instance (interactive)
brev shell my-instance

# Run a command on an instance (non-interactive)
brev exec my-instance "nvidia-smi"

# Open in VS Code/Cursor
brev open my-instance code
brev open my-instance cursor

Core Commands

Search GPUs

# All available GPUs (default)
brev search
brev search gpu

# GPU search with wide mode (shows RAM and ARCH columns)
brev search gpu --wide

# Filter by GPU name
brev search --gpu-name A100
brev search --gpu-name H100

# Filter by VRAM, sort by price
brev search --min-vram 40 --sort price

# Filter by boot time
brev search --max-boot-time 5 --sort price

# Filter by instance features
brev search --stoppable --min-total-vram 40 --sort price

Search CPUs

# All available CPU-only instances
brev search cpu

# Filter by provider
brev search cpu --provider aws

# Filter by minimum RAM
brev search cpu --min-ram 64

# Filter by architecture
brev search cpu --arch arm64

# Filter by vCPUs
brev search cpu --min-vcpu 16

# Sort by price
brev search cpu --sort price

# JSON output
brev search cpu --json

CPU search shows: TYPE, PROVIDER, VCPUs, RAM, ARCH, DISK, $/GB/MO, BOOT, FEATURES, $/HR

Create Instances

# Smart defaults (cheapest matching GPU)
brev create my-instance

# Specific type
brev create my-instance --type g5.xlarge

# Multiple types (fallback chain)
brev create my-instance --type g5.xlarge,g5.2xlarge

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

# Use search filters directly on create
brev create my-instance --gpu-name A100 --min-vram 40

# Multiple instances
brev create my-cluster --count 3

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

# Dry run (preview matching types without creating)
brev create my-instance --dry-run

Instance Access

# SSH into instance (interactive shell)
brev shell my-instance

# Run command on instance (non-interactive)
brev exec my-instance "nvidia-smi"
brev exec my-instance "python train.py"

# Run a local script on the instance (@ prefix reads local file)
brev exec my-instance @setup.sh
brev exec my-instance @/path/to/script.sh

# Run on multiple instances
brev exec instance1 instance2 instance3 "nvidia-smi"

# Open in editor
brev open my-instance           # default editor
brev open my-instance code      # VS Code
brev open my-instance cursor    # Cursor
brev open my-instance windsurf  # Windsurf
brev open my-instance terminal  # Terminal window
brev open my-instance tmux      # Terminal + tmux

# Copy files
brev copy ./local-file my-instance:/remote/path/
brev copy my-instance:/remote/file ./local-path/

# Port forward
brev port-forward my-instance -p 8080:8080

# List Brev-managed HTTP and network ports for an instance or external node
brev ports ls my-instance
brev ports ls my-node --json

# Create a public port (TCP by default)
brev ports create my-instance 8080
brev ports create my-node 53 --protocol udp --allow 203.0.113.10/32
brev ports create my-instance 3000 --protocol http --public
brev ports create my-instance 8888 --protocol http --authorize me@example.com

# Update one mapping interactively or by exact ID
brev ports update my-instance --destination-port 8081
brev ports update my-instance --id nport-abc123 --allow 203.0.113.10/32
brev ports update my-instance --id nport-abc123 --public

# Close one port interactively or by exact ID
brev ports close my-instance
brev ports close my-instance --id nport-abc123 --approve

Listing Instances and Nodes

brev ls covers two separate namespaces. External nodes never appear in brev ls, so check brev ls nodes before concluding a machine doesn't exist.

brev ls              # cloud instances
brev ls instances    # same as above, explicit
brev ls nodes        # external nodes only (machines registered to the org)
brev ls orgs         # organizations
brev ls --json       # machine-readable
brev ls nodes --json

| | brev ls | brev ls nodes | |---|---|---| | Status values | RUNNING / STOPPED | Connected / Disconnected | | Columns | NAME, STATUS, BUILD, SHELL, ID, MACHINE, GPU | NAME, STATUS | | stop / start / delete | yes | no — Brev doesn't manage their lifecycle |

The two --json shapes differ: brev ls nodes --json is a top-level array, while brev ls --json wraps rows in .workspaces.

brev ls nodes --json | jq -r '.[].name'
brev ls       --json | jq -r '.workspaces[].name'

# Names of nodes that are currently connected
brev ls nodes --json | jq -r '.[] | select(.status=="Connected") | .name'

Instance Management

# List instances
brev ls
brev ls --json

# Delete instance
brev delete my-instance

# Stop/start (if supported)
brev stop my-instance
brev start my-instance

# Reset (recover from errors)
brev reset my-instance

Pipeable Workflows

# Stop all running instances
brev ls | awk '/RUNNING/ {print $1}' | brev stop

# Delete all stopped instances
brev ls | awk '/STOPPED/ {print $1}' | brev delete

# Start all stopped instances
brev ls | awk '/STOPPED/ {print $1}' | brev start

# Stop instances matching pattern
brev ls | grep "test-" | awk '{print $1}' | brev stop

# Run command on all running instances
brev ls | awk '/RUNNING/ {print $1}' | brev exec "nvidia-smi"

# Create and run setup
brev search --gpu-name A100 | brev create my-box | brev exec @setup.sh

# Create and open in one command
brev search --gpu-name A100 | brev create my-box | brev open cursor

Organizations

# List orgs
brev org ls

# Set active org
brev org set my-org
brev set my-org  # alias

# Generate invite link
brev invite

Common Workflows

  1. Quick GPU Session (prompts/quick-session.md)

    • Search → Create → Open editor
  2. ML Training Setup (prompts/ml-training.md)

    • Find high-VRAM GPU → Create with startup script → Copy data → Run training
  3. Instance Cleanup (prompts/cleanup.md)

    • List instances → Identify unused → Delete

Safety Rules - CRITICAL

NEVER do these without explicit user confirmation:

  • Delete instances (brev delete)
  • Stop running instances (brev stop)
  • Create multiple instances (--count > 1)
  • Create expensive instances (H100, multi-GPU)

ALWAYS do these:

  • Show instance cost/type before creating
  • Confirm instance name before deletion
  • Check brev ls before assuming instance exists

Feedback

If you get stuck, encounter bugs, can't achieve what you're trying to do, or have ideas for improvements, send feedback to the Brev team:

brev feedback "description of issue or suggestion"

IMPORTANT: Never include secrets, passwords, API keys, or sensitive information in feedback.

Do this proactively when:

  • A brev command fails unexpectedly or returns confusing errors
  • You can't figure out how to accomplish a task with the available commands
  • You notice missing features or rough edges
  • A workflow feels harder than it should be

Troubleshooting

"Instance not found":

  • Run brev ls to see available instances
  • Run brev ls nodes — external nodes are a separate list and never show up in brev ls
  • Check if you're in the correct org: brev org ls

"Failed to create instance":

  • Try a different instance type: brev search --sort price
  • Check quota/credits with org admin

SSH connection fails:

  • Run brev refresh to update SSH config
  • Ensure instance is running: brev ls

Editor won't open:

  • Verify editor is in PATH: which code / which cursor
  • Set default: brev open --set-default code

References

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/brev-cli-for-gpu-cpu-cloud-instances-mtwgrta6/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/brev-cli-for-gpu-cpu-cloud-instances-mtwgrta6' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/brev-cli-for-gpu-cpu-cloud-instances-mtwgrta6/download' --output '.skill-downloads/brev-cli-for-gpu-cpu-cloud-instances-mtwgrta6/SKILL.md.part' && mv '.skill-downloads/brev-cli-for-gpu-cpu-cloud-instances-mtwgrta6/SKILL.md.part' '.skill-downloads/brev-cli-for-gpu-cpu-cloud-instances-mtwgrta6/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Tools declared by the author (check availability in your agent): Bash, Read, AskUserQuestion

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/brev-cli-for-gpu-cpu-cloud-instances-mtwgrta6/SKILL.md' && test -s '.skill-downloads/brev-cli-for-gpu-cpu-cloud-instances-mtwgrta6/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/brev-cli' && cp -R '.skill-downloads/brev-cli-for-gpu-cpu-cloud-instances-mtwgrta6' '.claude/skills/brev-cli'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/brev-cli-for-gpu-cpu-cloud-instances-mtwgrta6'

openskills read 'brev-cli-for-gpu-cpu-cloud-instances-mtwgrta6'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/brev-cli-for-gpu-cpu-cloud-instances-mtwgrta6/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills