Skip to main content

DBT Intergraion

Wren AI Cloud offers a command-line tool to import and synchronize your dbt projects.

plan support

DBT Integration is only available in Essential/ Business Plan and above


Installation

Download

Download the appropriate binary for your operating system from: Available platforms:

Install

macOS / Linux:

Download the appropriate archive for your system For example, macOS Apple Silicon

wget https://assets.getwren.ai/wren_cli/latest/macos/wren-darwin-arm64.tar.gz
  • Extract
tar -xzf wren-darwin-arm64.tar.gz
  • Change permission
chmod +x wren-darwin-arm64
  • Add to your PATH
sudo mv wren-darwin-arm64 /usr/local/bin/wren

Windows:

  1. Download wren-windows.zip
  2. Extract the archive
  3. Add the extracted directory to your system PATH, or run the executable directly

Prerequisites

  1. Build your dbt project
dbt build
  1. Generate dbt documentation
dbt docs generate

This creates the required catalog.json and manifest.json files in your target/ directory.

  1. Verify profiles.yml Make sure your profiles.yml is located in The dbt project directory

Currently supported databases:

  • PostgreSQL

Wren CLI Authentication

Before creating or updating projects, authenticate with Wren AI Cloud.

Login

wren auth login

You will be prompted for:

  • Organization ID: Your Wren AI organization identifier
  • API Key: Your authentication token
  • API Endpoint: (Optional) Defaults to https://getwren.ai/api/

Credentials are stored in ~/.wrenai/wrenrc.yaml.

Status

Check login status

wren auth status

Logout

Remove the login information stored in ~/.wrenai/wrenrc.yaml.

wren auth logout

Wren CLI DBT Commands

Create a new Wren AI project Import an existing dbt project into Wren AI Cloud.

Create a Wren AI project from a dbt project

wren dbt create

You will be prompted for:

Path to your dbt project Project display name

The CLI will:

  • Locate and parse profiles.yml
  • Read catalog.json and manifest.json from the target/ directory
  • Build a Wren MDL (Model Definition Language)
  • Create the project in Wren AI Cloud
  • Save project configuration to .wrenconfig in your dbt project directory

Update an existing Wren AI project

Synchronize your linked Wren AI project (referenced in .wrenconfig) with the latest changes from your dbt models.

wren dbt update --dbt-path /path/to/dbt-project

Update project without confirmation prompt

wren dbt update --dbt-path /path/to/dbt-project --yes 
warning

This command will replace the current MDL in your Wren AI project with the updated dbt models. Any manual changes made in Wren AI will be lost.