Init Command
Overview
The bruin init command bootstraps a new Bruin pipeline from a predefined template. It automatically sets up the folder structure, initializes configuration files, and optionally creates a new Git repository.
You can use it to start a new data pipeline project quickly, or to add a new pipeline inside an existing repository.
Usage
bruin init [template] [folder] [--in-place]Examples
# Start an interactive prompt to choose a template
bruin init
# Create a pipeline from the "default" template in a new folder
bruin init default ecommerce-pipeline
# Create a pipeline in the current directory (no parent folder)
bruin init default --in-place
# Create the self-healing DuckDB demo pipeline
bruin init self-heal-demoHow It Works
When you run bruin init, it:
- Lists available templates from Bruin’s internal template registry. You can interactively select one via a terminal UI.
- Copies all template files (e.g.
.asset.yml,.sql,.py) into the target folder. - Merges any template-level
.bruin.ymlconfiguration into your existing (or newly created) root.bruin.yml. - Optionally initializes a Git repository if none exists.
- Outputs next steps, such as validating or running your new pipeline.
Folder Structure
bruin init keeps your connection config (.bruin.yml) at the project root and places pipeline files in a named pipeline folder. .bruin.yml is never written inside the pipeline folder.
For a brand-new project (no existing Git repo), Bruin creates a bruin/ root:
bruin/ # project root, created by bruin init
├─ .bruin.yml # environments & connections
└─ my-pipeline/ # your pipeline
├─ pipeline.yml # defines the pipeline metadata
└─ assets/ # contains all assets for this pipeline
├─ raw.orders.asset.yml
├─ stg.orders.sql
└─ mart.sales_daily.sqlWhen you run bruin init inside an existing Git repository, no bruin/ wrapper is created: the pipeline folder is created in your current directory, and .bruin.yml is placed at the repository root — which may be several levels above the pipeline folder. Use --in-place in a fresh project to skip the bruin/ wrapper and use the current directory instead.
Behavior Details
Template Selection
- If no template is passed, Bruin opens an interactive terminal picker built with Bubble Tea.
- Templates are loaded from the internal
templatesdirectory.
Git Initialization
If Bruin detects no existing .git repository:
- A new Git repository is created (via
git init). - The pipeline is placed under
bruin/unless--in-placeis used.
Configuration Merge
If the selected template contains its own .bruin.yml, Bruin merges:
- Environment connections
- Secrets
- Default settings
into the existing .bruin.yml at your project root. This ensures shared environments (like dev, prod, etc.) stay consistent across pipelines.
Arguments
template
Name of the template to use. If omitted, an interactive selector appears.
- Type:
string - Default:
default - Required:
false
folder
Name of the folder where the pipeline will be created.
- Type:
string - Default:
bruin-pipeline(when using default template), template name (when using other templates) - Required:
false
Flags
in-place
Initialize the pipeline directly in the current folder, instead of creating a bruin/ directory.
- Type:
boolean - Default:
false
Example Output
Initializing the default template
When you run bruin init, you'll see a list of available templates and a prompt to select one:
$ bruin init
Please select a template below:
[x] default
[ ] athena
[ ] clickhouse
[ ] duckdb
[ ] chess
[ ] python
A new 'default' pipeline created successfully in folder 'bruin-pipeline'.
Config: /Users/me/my-repo/.bruin.yml
Pipeline: /Users/me/my-repo/deep/nested/bruin-pipeline
Created .bruin.yml at /Users/me/my-repo/.bruin.yml.
This is your Git repo root, so it may sit several levels above the pipeline folder.
Next steps:
1. Add your connection credentials to /Users/me/my-repo/.bruin.yml
2. Run: bruin validate bruin-pipeline
3. Run: bruin run bruin-pipelineThe summary always prints the resolved .bruin.yml path, so you never have to guess where it landed (see Folder Structure). If a .bruin.yml was already there, Bruin says whether it merged the template's configuration into it:
Using existing .bruin.yml at /Users/me/my-repo/.bruin.yml (merged template config).or left it as it was, which happens for templates that ship no .bruin.yml:
Using existing .bruin.yml at /Users/me/my-repo/.bruin.yml (left unchanged).Initializing a Shopify template
bruin init shopify-clickhouseThe shopify-clickhouse template creates raw Shopify ingestion assets, conformed commerce models, and ClickHouse reporting marts. Configure the generated pipeline with your Shopify and ClickHouse connections before running it.
Output

Notes
- Traversing up/down the filesystem (e.g.,
../pipeline) is not allowed for safety. .bruin.ymlis automatically created or updated at your project root during initialization — the Git repository root when you are inside an existing repo, or a newbruin/folder for a fresh project.- The command is safe to run multiple times — Bruin intelligently merges existing configuration.