Skip to content

Commands Overview

Bruin provides a comprehensive CLI for managing your data pipelines. Commands can be executed in multiple ways:

  • Terminal: Direct CLI usage via bruin <command>
  • VS Code Extension: Visual interface with integrated command execution
  • AI Agents: Programmatic access via Bruin MCP

Getting Help

bash
# List all available commands
bruin --help

# Get help for a specific command
bruin run --help
bruin validate --help

Command Reference

Pipeline Execution

CommandDescription
runExecute pipelines or individual assets
validateCheck pipeline configuration and syntax without executing

Project Management

CommandDescription
initCreate a new Bruin project from a template
cleanRemove temporary files and build artifacts
formatFormat asset files for consistency

Connections & Environments

CommandDescription
connectionsList, add, delete, and test connections
environmentsManage deployment environments

Development & Debugging

CommandDescription
renderPreview rendered Jinja templates
lineageVisualize asset dependencies
queryExecute ad-hoc queries against connections
data-diffCompare data between connections

Asset Operations

CommandDescription
importImport existing database tables as Bruin assets
patchApply patches to asset definitions
ai-enhanceEnhance asset metadata using AI

Common Workflows

Running a Pipeline

bash
# Run the pipeline in the current directory
bruin run

# Run a specific pipeline
bruin run ./pipelines/analytics/

# Run a specific asset
bruin run ./pipelines/analytics/assets/daily_summary.sql

# Run with a specific environment
bruin run --environment production

# Run for a specific date range
bruin run --start-date 2024-01-01 --end-date 2024-01-31

Validating Before Running

bash
# Validate pipeline syntax and configuration
bruin validate

# Validate a specific pipeline
bruin validate ./pipelines/analytics/

Creating a New Project

bash
# Initialize with the default template
bruin init default my-project

# Initialize with a specific template
bruin init chess my-chess-project

Testing Connections

bash
# List all configured connections
bruin connections list

# Test a specific connection
bruin connections ping my-postgres-connection

Debugging Templates

bash
# Render a SQL asset to see the final query
bruin render ./assets/my_query.sql

# Render with specific date parameters
bruin render ./assets/my_query.sql --start-date 2024-01-01 --end-date 2024-01-02

Global Flags

These flags work with most commands:

FlagDescription
--debugEnable debug logging
--environmentSpecify the environment to use
--config-filePath to a custom .bruin.yml file
--helpShow help for the command

VS Code Extension

The Bruin VS Code Extension provides a visual interface for many CLI commands:

  • Run pipelines and assets with a single click
  • View real-time execution logs
  • Explore asset lineage graphically
  • Preview rendered queries

Bruin MCP (AI Agent Integration)

Bruin MCP enables AI agents and tools to interact with Bruin programmatically. This allows:

  • Natural language pipeline execution
  • Automated pipeline management
  • Integration with AI-powered development workflows