Using the CLI with AI Agents
The Brev CLI includes a skill that enables AI coding agents to manage GPU and CPU instances using natural language. After installation, use natural language such as “create an A100 instance for ML training” and your agent runs the appropriate brev commands.
Supported Agents
The skill installs to the following agent platforms:
Installing the Skill
Option 1: Using the CLI
Or simply run brev agent-skill — it defaults to install.
Option 2: One-Liner (curl)
Option 3: Automatic Prompt
When you run brev login and the CLI detects an AI coding agent on your system, it offers to install the skill automatically.
What Gets Installed
The skill installs the following files to each agent directory:
Agent-Driven Workflows
After installation, restart your agent (or start a new conversation) and use natural language:
The agent translates these requests into the appropriate brev CLI commands, confirms before destructive operations, and shows costs before creating instances.
Safety Rules
The skill instructs agents to follow these safety rules:
- Always confirm before deleting or stopping instances
- Always show cost/type before creating instances
- Always confirm before creating expensive instances (H100, multi-GPU) or clusters (
--count > 1) - Always check
brev lsbefore assuming an instance exists
Updating the Skill
Re-run the install command to update to the latest version:
Testing from a Branch
To test skill changes from a specific branch:
Uninstalling the Skill
Or with curl:
This removes the skill from all agent directories. Restart your agent to apply the change.
Troubleshooting
Agent doesn’t recognize Brev commands
- Verify the skill is installed: check that
~/.claude/skills/brev-cli/SKILL.mdexists - Restart the agent or start a new conversation
- Try invoking the skill explicitly with
/brev-cli(in Claude Code)
Skill install fails
- Check your internet connection (files are downloaded from GitHub)
- Try the curl installer as an alternative
- Verify you have write permissions to
~/.claude/and~/.agents/
Agent runs wrong commands
- Update to the latest skill:
brev agent-skill install - Check that you’re running the latest Brev CLI:
brev --version