Skip to main content

CLI Cheatsheet

A comprehensive reference of bauplan commands and their functionality.

Installation and Configuration

CommandDescription
pip install bauplan --upgradeInstall the latest version of bauplan
bauplan versionShow the version of the bauplan CLI
bauplan helpShow available commands or help for one command
bauplan config set api_key "your_bauplan_key"Configure your API key
bauplan infoDisplay current profile, active branch, user details, client/server versions and available runners

Branch Management

CommandDescription
bauplan branchList 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-zonesShow 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.

Namespace Management

CommandDescription
bauplan namespace create <NAMESPACE_NAME>Create a new namespace in current branch
bauplan table --namespace <NAMESPACE_NAME>List all tables in a namespace

Table Management and Import

CommandDescription
bauplan tableList tables in active branch
bauplan table get <NAMESPACE_NAME>.<TABLE_NAME>Show table metadata in active branch
bauplan table create --name <NAMESPACE_NAME>.<TABLE_NAME> --search-uri 's3://your-bucket/path/*.parquet'Create empty table from schema
bauplan table create --name <NAMESPACE_NAME>.<TABLE_NAME> --search-uri <URI> --partitioned-by "<PARTITION_SPEC>"Create partitioned table
bauplan table import --name <NAMESPACE_NAME>.<TABLE_NAME> --search-uri <URI>Import data into existing table
bauplan table create-plan --name <NAMESPACE_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 <NAMESPACE_NAME>.<TABLE_NAME>Delete table from current branch
note

The URI should be an S3 path, for example: 's3://your-bucket/path/*.parquet'

Parameters and Secrets

CommandDescription
bauplan parameter set --name <PARAM_NAME> --value <VALUE> --type secretSet a secret parameter
bauplan parameter set --name <PARAM_NAME> --value <VALUE>Set a regular parameter

Pipeline and Job Execution

CommandDescription
bauplan runExecute pipeline in active branch
bauplan run --dry-runExecute pipeline in memory only
bauplan run --headExecute and show table previews
bauplan run --id <RUN_ID>Reproduce a previous run
bauplan run --strictExecute with data contract enforcement
bauplan run --detachSubmit job for detached execution
bauplan job get <JOB_ID>Get status of a detached job
bauplan job lsList recent jobs (last 24 hours)
bauplan job logs <JOB_ID>Get logs from a detached job
bauplan job stop <JOB_ID>Cancel a running detached job

Query

CommandDescription
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 with specified namespace
bauplan query -f <FILE.SQL>Execute query from file
bauplan query --no-trunc "<SQL_QUERY>"Execute query without truncating output
note
  • 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
  • Detached runs logs are persisted for 24 hours
  • Branch names must follow the format username.branchname except for the main branch