Advanced Commands
Manage organizations, SSH keys, secrets, and perform advanced operations with the Brev CLI.
Organization Management
brev set
Switch your active organization context. All subsequent commands will operate within this organization.
brev login
Authenticate with Brev. Opens a browser window for login.
If you’re already logged in, brev login will refresh your credentials without requiring re-authentication.
brev logout
Clear your local authentication credentials.
SSH Key Management
Manage SSH keys for accessing your instances.
brev ssh-key
View and manage your SSH keys.
Brev automatically manages an SSH key at ~/.brev/brev.pem. You can add additional keys for team members or CI/CD systems.
Secrets Management
Store sensitive values like API keys that are injected into your instances as environment variables.
brev secret
Manage environment secrets for your instances.
When you create a secret, you’ll be prompted to enter the value securely. Secrets are:
- Encrypted at rest
- Injected as environment variables on instance start
- Available in both the host and container environments
Instance Operations
brev scale
Scale your instance to different GPU configurations.
Scaling requires stopping and restarting the instance. Your data persists, but running processes will be interrupted.
brev reset
Reset an instance to its initial state. This clears the container while preserving your persistent storage.
Use this when:
- Your container environment becomes corrupted
- You want to start fresh with a new container image
- You need to clear installed packages and return to the base environment
brev refresh
Sync your local SSH configuration with the latest instance data.
This command updates ~/.brev/ssh_config with current instance IP addresses and hostnames. Run this after:
- Creating a new instance
- Restarting an instance (IP may change)
- If SSH connections fail with “host not found”