Bonnard Docs

Getting Started

Set up Bonnard and build your first semantic layer in minutes.

What is Bonnard?

Bonnard is a semantic layer platform that sits between your data warehouse and your consumers (BI tools, AI agents, applications). You define your metrics and dimensions once in YAML, then query them through a consistent API.

Prerequisites

Install the CLI

npm install -g @bonnard/cli

Verify the installation:

bon --version

Log in

Authenticate with your Bonnard account:

bon login

This opens your browser to complete authentication. Once done, verify with:

bon whoami

Initialize a project

Navigate to your project directory and run:

bon init

This creates the project structure:

my-project/
├── bon.yaml              # Project configuration
├── bonnard/
│   ├── cubes/            # Cube definitions (measures + dimensions)
│   └── views/            # View definitions (curated interfaces)
└── .bon/                 # Local config (gitignored)
    └── datasources.yaml

If you have an existing dbt project, bon init will detect it and set up your agent context accordingly.

Connect a data source

Add your warehouse connection:

bon datasource add

Follow the interactive prompts to configure your connection. If you use dbt, you can import from your profiles:

bon datasource add --from-dbt

Test the connection:

bon datasource test

Create your first cube

Create a file at bonnard/cubes/orders.yaml:

cubes:
  - name: orders
    sql_table: public.orders

    measures:
      - name: count
        type: count

      - name: total_revenue
        type: sum
        sql: amount

    dimensions:
      - name: id
        type: number
        sql: id
        primary_key: true

      - name: status
        type: string
        sql: status

      - name: created_at
        type: time
        sql: created_at

Validate

Check your cubes and views for errors:

bon validate

Deploy

Push your semantic layer to Bonnard:

bon deploy

Query

Test your deployed semantic layer:

bon query --measures orders.count --dimensions orders.status

Next steps

  • Learn about cubes — measures, dimensions, joins
  • Learn about views — curated interfaces for consumers
  • Set up MCP — connect AI agents to your semantic layer
  • Read the full workflow guide — validate, deploy, query