CLI Cheatsheet

A comprehensive reference of bauplan commands and their functionality.

Installation and Configuration

Command

Description

pip install bauplan --upgrade

Install the latest version of bauplan

bauplan version

Show the version of the bauplan CLI

bauplan help

Show available commands or help for one command

bauplan config set api_key "your_bauplan_key"

Configure your API key

Branch Management

Command

Description

bauplan branch

List all available branches. Active branch marked with *

bauplan branch create <YOUR_USERNAME>.<BRANCH_NAME>

Create a new branch

bauplan checkout <YOUR_USERNAME>.<BRANCH_NAME>

Switch to specified branch

bauplan branch get <BRANCH_NAME>

Show all tables in specified branch

bauplan branch --all-zones

Show all open branches (not just user’s)

bauplan branch rm <YOUR_USERNAME>.<BRANCH_NAME>

Delete branch (only own branches)

bauplan branch merge <YOUR_USERNAME>.<BRANCH_NAME>

Merge branch into main (must be on main)

bauplan branch diff <BRANCH NAME>

Show differences between current and the specified branch.

Table Management and Import

Command

Description

bauplan table

List tables in active branch

bauplan table get bauplan.<TABLE_NAME>

Show table metadata in active branch

bauplan table create --name <TABLE_NAME> --search-uri '<URI>'

Create empty table from schema

bauplan table import --name <TABLE_NAME> --search-uri '<URI>'

Import data into existing table

bauplan table create-plan --name <TABLE_NAME> --search-uri '<URI>' --save-plan <FILE>

Generate table creation plan

bauplan table create-plan-apply --plan <FILE>

Apply table creation plan

bauplan table rm bauplan.<TABLE_NAME>

Delete branch (only own branches)

Pipeline Execution

Command

Description

bauplan run

Execute pipeline in active branch

bauplan run --dry-run

Execute pipeline in memory only

bauplan run --head

Execute and show table previews

bauplan run --id <RUN_ID>

Reproduce a previous run

bauplan run --strict

Execute with data contract enforcement

Query

Command

Description

bauplan query "<SQL_QUERY>"

Execute query in active branch

bauplan query --branch <YOUR_USERNAME>.<BRANCH_NAME> "<SQL_QUERY>"

Execute query in specified branch

bauplan query --branch <YOUR_USERNAME>.<BRANCH_NAME> -f <FILE.SQL>

Execute query from file in specified branch

Important

  • Always prefix branch names with your username (e.g., <YOUR_USERNAME>.<BRANCH_NAME>)

  • The --dry-run flag is required when:
    • Working in the main branch

    • Testing changes without materialization

  • Materialization is not allowed in the main branch