CLI Reference

View as Markdown

The Brev CLI provides full control over your GPU and CPU instances from the command line. Search for hardware, create instances, connect via shell or editor, and chain commands together with composable pipes.

SSH is fully managed: The CLI automatically handles SSH keys, config files, and IP addresses. Just run ssh my-instance or brev shell my-instance to connect. There is no manual configuration needed.

First Time?

1

Install the CLI

Follow the installation instructions for your platform.

2

Login

Run brev login to authenticate. This sets up your SSH keys automatically.

3

Create or sync instances

Run brev start https://github.com/user/repo.git to create an instance, or brev refresh to sync instances from the web console.

4

Connect

Run brev shell my-instance or ssh my-instance to connect.

Quick Start

$# Get help on any command
$brev --help
$brev <command> --help
$
$# Check CLI version
$brev --version

Command Reference

Commands organized by what you want to do:

Getting Started

CommandDescription
loginAuthenticate with your Brev account.
logoutRemove stored credentials.
ssh-keyDisplay your SSH public key.

Search & Create

CommandDescription
searchSearch GPU and CPU instance types with filters.
createCreate instances with smart defaults and fallback chains.

Managing Instances

CommandDescription
lsList instances in current organization (alias: list)
startStart stopped instances.
stopStop running instances (supports --all)
deleteDelete an instance permanently
refreshSync instances from web console

Connecting

CommandDescription
shellOpen interactive SSH shell
execRun commands on instances non-interactively
copyCopy files to/from instances (aliases: cp, scp)
openOpen instance in VS Code, Cursor, Windsurf, or terminal
port-forwardForward remote ports to localhost

Organizations

CommandDescription
org lsList your organizations.
setSwitch active organization.
inviteGenerate an invite link.

Agent Integration

CommandDescription
agent-skillInstall/uninstall the Brev skill for AI coding agents.

Detailed Documentation