CLI Brev pour instances GPU/CPU cloud

VérifiéPrudence

Gérer des instances GPU et CPU cloud avec le CLI Brev : création, recherche, SSH, transfert de fichiers et port forwarding pour les charges ML/AI.

Spar Skills Guide Bot
DevOpsIntermédiaire
11/09/2026
Claude Code
#gpu#cloud-compute#cli#instance-management#ml-infrastructure

Recommandé pour

Synthèse automatique

Fournit des workflows en ligne de commande pour rechercher, créer, connecter et gérer des instances cloud GPU/CPU Brev pour les charges ML et le calcul général.

Points forts

  • Propose des exemples copiables pour la recherche de GPU/CPU avec filtres, la création d’instances et les modes d’accès.
  • Inclut des options utiles comme --dry-run, les listes de types de secours et les scripts de démarrage.
  • Couvre l’accès distant interactif et non interactif, l’ouverture d’éditeurs, la copie de fichiers et le transfert de ports.
  • Cible explicitement les charges ML : entraînement, fine-tuning, inférence et traitements par lots.

Limites

  • Ne documente pas l’installation, l’authentification ni la configuration du compte Brev.
  • Les workflows d’organisation, de suppression et de maîtrise des coûts sont à peine esquissés.
  • L’extrait fourni s’arrête au milieu d’une commande, donc certains détails de référence sont incomplets.
Quand l'utiliser

À utiliser lorsqu’un utilisateur veut provisionner ou connecter des instances cloud GPU/CPU Brev pour des tâches ML ou de calcul général.

Quand l'éviter

À ne pas utiliser si la tâche ne concerne pas des instances cloud gérées par Brev ou si la CLI Brev n’est pas installée et configurée.

Analyse de sécurité

Prudence
Score qualité85/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.

Points d'attention
  • •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.
Comment cette analyse est faite

Exemples

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

Du fichier au premier essai

Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.

Consulter la source et ses fichiers annexes

Ce téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.

1. Télécharger le fichier

Télécharger SKILL.md

Depuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/brev-cli-for-gpu-cpu-cloud-instances-mtwgrta6/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.

Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.

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. Vérifier les prérequis

Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.

Outils déclarés par l’auteur (à vérifier dans votre agent) : Bash, Read, AskUserQuestion

Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.

Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.

3. Charger la skill

Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.

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 doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.

Installation officielle d’OpenSkills
openskills install './.skill-downloads/brev-cli-for-gpu-cpu-cloud-instances-mtwgrta6'

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

La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.

Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.

openskills sync

Mode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.

4. Faire un premier essai

Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :

Lis .skill-downloads/brev-cli-for-gpu-cpu-cloud-instances-mtwgrta6/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.

Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.

Skills similaires