Guide
Operate Bruin Cloud From the Terminal
Use the bruin cloud command to run Bruin Cloud from your CLI. Authenticate with a team API token, inspect pipelines and runs, diagnose failures, trigger runs and backfills, chat with agents, and track warehouse cost - without opening the dashboard.
What
You already run pipelines in Bruin Cloud. This guide moves the day-to-day operations into your terminal with the bruin cloud command, so you can check status, diagnose failures, trigger backfills, and talk to your agents without switching to the dashboard.
By the end you will be able to:
- Authenticate the CLI with a team API token, then list teams and projects
- Inspect pipelines, runs, and asset instances, and read them as
plaintext orjson - Diagnose a failed run in one command, read the failing logs, and rerun only what failed
- Trigger runs and split a date range into a backfill of batched runs
- Chat with a Bruin Cloud AI agent and explore warehouse cost, all from the shell
Everything here talks to the same Bruin Cloud you already use. The CLI is a second door into it, not a separate system - a run you trigger from the terminal shows up on the pipeline page, and a token you revoke in the UI stops working immediately.
How
The bruin cloud command groups its subcommands by object: teams, projects, pipelines, runs, instances, backfills, agents, and cost. Almost every command takes a --project-id, so the first step is getting authenticated and finding your IDs. After that each step follows a real operating loop: look at what ran, figure out why it broke, run it again, and ask an agent when you want a second opinion.
Two things are worth knowing up front. Add --output json (or -o json) to any command to get machine-readable output for scripts and CI. And the CLI resolves your API token in a fixed order - the --api-key flag first, then the BRUIN_CLOUD_API_KEY environment variable, then a bruin connection in .bruin.yml - so you can keep credentials out of your shell history once you settle on a setup.
Before you start
- An active Bruin Cloud account with at least one project and an enabled pipeline
- The Bruin CLI installed and on your
PATH - Permission to create an API token in your team (Team Settings → Team Access → API Tokens)
Guide overview
- 1Connect the CLI to Bruin CloudCreate a team API token, point the CLI at it, find your project ID, and switch any command to JSON output.
- 2Inspect Pipelines, Runs, and AssetsList pipelines and validation errors, watch recent runs, filter by status, open a run, and drill into its assets.
- 3Diagnose and Recover From FailuresDiagnose the latest failure, read the failing logs, rerun only the failed assets, and mark a run when you fix it elsewhere.
- 4Trigger Runs and BackfillsTrigger a run, scope it to specific assets and downstream, force a full refresh with variables, and split a date range into a batched backfill.
- 5Chat With Agents and Track CostSend a question to a Bruin Cloud agent, continue and export the thread, and explore warehouse cost by pipeline or asset.
Get help & contribute