> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/brev/llms.txt.
> For full documentation content, see https://docs.nvidia.com/brev/llms-full.txt.

# CLI Reference

> Complete reference for the NVIDIA Brev CLI. Search for GPUs, create instances, connect, and automate workflows from your terminal.

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.

<Callout intent="success">
  **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.
</Callout>

## First Time?

<Steps>
  <Step title="Install the CLI">
    Follow the [installation instructions](/cli/getting-started#installation) for your platform.
  </Step>

  <Step title="Login">
    Run `brev login` to authenticate. This sets up your SSH keys automatically.
  </Step>

  <Step title="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.
  </Step>

  <Step title="Connect">
    Run `brev shell my-instance` or `ssh my-instance` to connect.
  </Step>
</Steps>

## Quick Start

```bash
# 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

| Command   | Description                          |
| --------- | ------------------------------------ |
| `login`   | Authenticate with your Brev account. |
| `logout`  | Remove stored credentials.           |
| `ssh-key` | Display your SSH public key.         |

### Search & Create

| Command  | Description                                               |
| -------- | --------------------------------------------------------- |
| `search` | Search GPU and CPU instance types with filters.           |
| `create` | Create instances with smart defaults and fallback chains. |

### Managing Instances

| Command   | Description                                            |
| --------- | ------------------------------------------------------ |
| `ls`      | List instances in current organization (alias: `list`) |
| `start`   | Start stopped instances.                               |
| `stop`    | Stop running instances (supports `--all`)              |
| `delete`  | Delete an instance permanently                         |
| `refresh` | Sync instances from web console                        |

### Connecting

| Command        | Description                                             |
| -------------- | ------------------------------------------------------- |
| `shell`        | Open interactive SSH shell                              |
| `exec`         | Run commands on instances non-interactively             |
| `copy`         | Copy files to/from instances (aliases: `cp`, `scp`)     |
| `open`         | Open instance in VS Code, Cursor, Windsurf, or terminal |
| `port-forward` | Forward remote ports to localhost                       |

### Organizations

| Command  | Description                 |
| -------- | --------------------------- |
| `org ls` | List your organizations.    |
| `set`    | Switch active organization. |
| `invite` | Generate an invite link.    |

### Agent Integration

| Command       | Description                                            |
| ------------- | ------------------------------------------------------ |
| `agent-skill` | Install/uninstall the Brev skill for AI coding agents. |

## Detailed Documentation

<CardGroup cols={2}>
  <Card title="Getting Started" icon="play" href="/cli/getting-started">
    Installation, authentication, and basic configuration.
  </Card>

  <Card title="Instance Creation" icon="plus" href="/cli/instance-creation">
    Create instances with smart defaults, fallback chains, and startup scripts.
  </Card>

  <Card title="Instance Management" icon="server" href="/cli/instance-management">
    List, start, stop, delete, reset, and refresh commands.
  </Card>

  <Card title="Connectivity" icon="plug" href="/cli/connectivity">
    Shell, exec, copy, editor access, and port forwarding.
  </Card>

  <Card title="Search & Discovery" icon="magnifying-glass" href="/cli/search-discovery">
    Find GPU and CPU instance types with powerful filtering and sorting.
  </Card>

  <Card title="Composable Workflows" icon="diagram-project" href="/cli/composable-workflows">
    Chain commands with pipes for powerful automation.
  </Card>

  <Card title="Advanced Commands" icon="gear" href="/cli/advanced-commands">
    Additional commands: org, reset, create, secret, invite, copy, status.
  </Card>
</CardGroup>