CLI reference
All RBS commands run on your branch server via the integrated terminal in your code editor or through the command palette. Commands execute on the server, not on your local machine.Global options
These options can be used with any RBS command:| Option | Description |
|---|---|
--help, -h | Show help for any command. |
--verbose, -v | Enable verbose output. |
--version | Print the RBS version. |
rbs build
Build one or more targets.
Syntax
Target patterns
| Pattern | Description | Example |
|---|---|---|
name | Target in current package (natural syntax). | rbs build hello |
:name | Target in current package (traditional). | rbs build :hello |
pkg name | Target in a sub-package (natural). | rbs build services/api server |
//pkg:name | Target in a sub-package (traditional). | rbs build //services/api:server |
//... | All targets in entire workspace. | rbs build //... |
:all | All targets in current package. | rbs build :all |
Examples
rbs run
Build and execute a single target.
Syntax
Examples
rbs test
Build and run test targets.
Syntax
Options
| Option | Description |
|---|---|
--test_tag_filters=TAGS | Filter tests by tags (e.g., unit, integration). |
Examples
Test output
Test results are displayed inline in your editor and stored on the server:rbs coverage
Run tests with code coverage analysis.
Syntax
Options
| Option | Description |
|---|---|
--format=FORMAT | Output format (text, html, json). Default: text. |
--threshold=N | Minimum coverage percentage required (fails if below). |
Examples
rbs workspace
Display workspace information including targets, configurations, and server status.
Syntax
Sample output
rbs ci
Run CI workflows.
Syntax
Options
| Option | Description |
|---|---|
--workflow=NAME | Run a specific workflow. |
--affected | Run only on targets affected by recent changes. |
--base=REF | Git reference for computing affected targets (default: HEAD~1). |
--distributed | Enable distributed execution across workers. |
--dry-run | Show execution plan without running. |
--verbose | Show detailed execution output. |
Examples
rbs infra
Manage infrastructure provisioning.
Syntax
Subcommands
| Subcommand | Description |
|---|---|
plan | Generate an execution plan for infrastructure changes. |
apply | Apply infrastructure changes. |
destroy | Destroy managed infrastructure. |
show | Display current infrastructure state. |
refresh | Update state from actual infrastructure. |
import | Import existing resources into state. |
output | Show output values. |
graph | Generate dependency graph. |
Options
| Option | Description |
|---|---|
--workspace=NAME | Use a specific infrastructure workspace (e.g., dev, prod). |
--auto-approve | Skip interactive approval for apply/destroy. |
Examples
rbs agent
Start the built-in AI coding agent — an interactive assistant that can read, edit, build, test, and deploy your codebase through natural language. See Coding agent for full documentation.
Syntax
Flags
| Flag | Description |
|---|---|
-m, --model | Model to use (auto-detects provider). |
-f, --files | Comma-separated list of context files. |
-s, --system | Custom system prompt. |
-n, --non-interactive | Run once without interactive mode. |
--full-docs | Enable full documentation access. |
Examples
rbs agent-builder
Build, serve, and test custom AI agents defined in your BUILD.rbs files. See Agent Builder SDK for full documentation.
Syntax
Subcommands
| Subcommand | Description |
|---|---|
serve | Start an agent system. |
test | Test an agent with events. |
list | List registered agent components. |
dag show | Display DAG workflow structure. |
dag validate | Validate a DAG workflow. |
dag export | Export DAG as Mermaid or DOT diagram. |
Examples
rbs distributed
Manage distributed build execution.
Syntax
Subcommands
| Subcommand | Description |
|---|---|
status | Show status of distributed workers. |
Examples
Exit codes
| Code | Description |
|---|---|
0 | Success. |
1 | Build or test failure. |
2 | Command-line usage error. |
3 | Workspace configuration error. |