The semantic engine for MCP clients. Define metrics once, query from anywhere. Docs · Getting Started · Changelog · Discord · Bonnard is an agent-native semantic layer CLI. Deploy an MCP server and governed analytics API in minutes -for AI agents, BI tools, and data teams. Define metrics and dimensions in YAML, validate locally, and ship to production. Works with Snowfl
Add this skill
npx mdskills install meal-inc/bonnard-cliExcellent README documenting a powerful semantic layer CLI with strong agent integrations
1<p align="center">2 <a href="https://www.bonnard.dev">3 <picture>4 <source media="(prefers-color-scheme: dark)" srcset="./assets/banner-dark.png" />5 <source media="(prefers-color-scheme: light)" srcset="./assets/banner-light.png" />6 <img alt="Bonnard -the semantic engine for MCP clients, AI agents, and data teams" src="./assets/banner-light.png" width="100%" />7 </picture>8 </a>9</p>1011<p align="center">12 <strong>The semantic engine for MCP clients. Define metrics once, query from anywhere.</strong>13</p>1415<p align="center">16 <a href="https://www.npmjs.com/package/@bonnard/cli"><img src="https://img.shields.io/npm/v/@bonnard/cli?style=flat-square&color=0891b2" alt="npm version" /></a>17 <a href="https://github.com/meal-inc/bonnard-cli/blob/main/LICENSE"><img src="https://img.shields.io/github/license/meal-inc/bonnard-cli?style=flat-square" alt="MIT License" /></a>18 <a href="https://discord.com/invite/RQuvjGRz"><img src="https://img.shields.io/badge/Discord-Join%20us-5865F2?style=flat-square&logo=discord&logoColor=white" alt="Discord" /></a>19</p>2021<p align="center">22 <a href="https://docs.bonnard.dev/docs/">Docs</a> ·23 <a href="https://docs.bonnard.dev/docs/getting-started">Getting Started</a> ·24 <a href="https://docs.bonnard.dev/docs/changelog">Changelog</a> ·25 <a href="https://discord.com/invite/RQuvjGRz">Discord</a> ·26 <a href="https://www.bonnard.dev">Website</a>27</p>2829---3031Bonnard is an agent-native semantic layer CLI. Deploy an MCP server and governed analytics API in minutes -for AI agents, BI tools, and data teams. Define metrics and dimensions in YAML, validate locally, and ship to production. Works with Snowflake, BigQuery, Databricks, and PostgreSQL. Ships with native integrations for Claude Code, Cursor, and Codex. Built with TypeScript.3233## Why Bonnard?3435Most semantic layers were built for dashboards and retrofitted for AI. Bonnard was built the other way around -agent-native from day one with Model Context Protocol (MCP) as a core feature, not a plugin. One CLI takes you from an empty directory to a production semantic layer serving AI agents, BI tools, and human analysts through a single governed API.3637<p align="center">38 <img src="./assets/architecture.png" alt="Bonnard architecture -data sources flow through the semantic layer to AI agents, BI tools, and MCP clients" width="100%" />39</p>4041## Quick Start4243No install required. Run directly with npx:4445```bash46npx @bonnard/cli init47```4849Or install globally:5051```bash52npm install -g @bonnard/cli53```5455Then follow the setup flow:5657```bash58bon init # Scaffold project + agent configs59bon datasource add # Connect your warehouse60bon validate # Check your models locally61bon login # Authenticate62bon deploy # Ship it63```6465No warehouse yet? Start exploring with a full retail demo dataset:6667```bash68bon datasource add --demo69```7071Requires Node.js 20+.7273## Agent-Native from Day One7475When you run `bon init`, Bonnard generates context files so AI coding agents understand your semantic layer from the first prompt:7677```78you@work my-project % bon init7980Initialised Bonnard project81Core files:82 bon.yaml83 bonnard/cubes/84 bonnard/views/85Agent support:86 .claude/rules/bonnard.md87 .claude/skills/bonnard-get-started/88 .cursor/rules/bonnard.mdc89 AGENTS.md90```9192| Agent | What gets generated |93| --- | --- |94| **Claude Code** | `.claude/rules/bonnard.md` + skill templates in `.claude/skills/` |95| **Cursor** | `.cursor/rules/bonnard.mdc` with frontmatter configuration |96| **Codex** | `AGENTS.md` + skills directory |9798Set up your MCP server so agents can query your semantic layer directly:99100```bash101bon mcp # Show MCP server setup instructions102bon mcp test # Verify the connection103```104105## Auto-Detected from Your Project106107<p align="center">108 <img src="./assets/datasources.png" alt="Auto-detected warehouses and data tools -Snowflake, BigQuery, PostgreSQL, Databricks, DuckDB, dbt, Dagster, Prefect, Airflow, Looker, Cube, Evidence, SQLMesh, Soda, Great Expectations" width="100%" />109</p>110111Bonnard automatically detects your warehouses and data tools. Point it at your project and it discovers schemas, tables, and relationships.112113- **Snowflake** -full support including Snowpark114- **Google BigQuery** -native integration115- **Databricks** -SQL warehouses and Unity Catalog116- **PostgreSQL** -including cloud-hosted variants (Supabase, Neon, RDS)117- **DuckDB** -local development and testing118- **dbt** -model and profile import119- **Dagster, Prefect, Airflow** -orchestration tools120- **Looker, Cube, Evidence** -existing BI layers121- **SQLMesh, Soda, Great Expectations** -data quality and transformation122123## Querying124125Query your semantic layer from the terminal using JSON or SQL syntax:126127```bash128# JSON query129bon query --measures revenue,order_count --dimensions product_category --time-dimension created_at130131# SQL query132bon query --sql "SELECT product_category, MEASURE(revenue) FROM orders GROUP BY 1"133```134135Agents connected via MCP can run the same queries programmatically, with full access to your governed metric definitions.136137## Project Structure138139```140my-project/141├── bon.yaml # Project configuration142├── bonnard/143│ ├── cubes/ # Metric and dimension definitions144│ └── views/ # Curated query interfaces145├── .bon/ # Local credentials (gitignored)146├── .claude/ # Claude Code agent context147├── .cursor/ # Cursor agent context148└── AGENTS.md # Codex agent context149```150151## CI/CD152153Deploy from your pipeline with the `--ci` flag for non-interactive mode:154155```bash156bon deploy --ci157```158159Handles automatic datasource synchronisation and skips interactive prompts. Fits into GitHub Actions, GitLab CI, or any pipeline that runs Node.js.160161## Commands162163| Command | Description |164| --- | --- |165| `bon init` | Scaffold a new project with agent configs |166| `bon datasource add` | Connect a data source (or `--demo` for sample data) |167| `bon datasource add --from-dbt` | Import from dbt profiles |168| `bon datasource list` | List connected data sources |169| `bon validate` | Validate models locally before deploying |170| `bon deploy` | Deploy semantic layer to production |171| `bon deployments` | List active deployments |172| `bon diff` | Preview changes before deploying |173| `bon annotate` | Add metadata and descriptions to models |174| `bon query` | Run queries from the terminal (JSON or SQL) |175| `bon mcp` | Show MCP server setup instructions |176| `bon mcp test` | Test MCP connection |177| `bon dashboard dev` | Preview a markdown dashboard locally with live reload |178| `bon dashboard deploy` | Deploy a markdown or HTML dashboard |179| `bon dashboard list` | List deployed dashboards |180| `bon dashboard remove` | Remove a deployed dashboard |181| `bon dashboard open` | Open a dashboard in the browser |182| `bon pull` | Download deployed models to local project |183| `bon keys list` / `create` / `revoke` | Manage API keys |184| `bon docs` | Browse or search documentation from the CLI |185| `bon login` / `bon logout` | Manage authentication |186| `bon whoami` | Check current session |187188For the full CLI reference, see the [documentation](https://docs.bonnard.dev/docs/cli-reference).189190## Documentation191192- [Getting Started](https://docs.bonnard.dev/docs/getting-started) -from zero to deployed in minutes193- [CLI Reference](https://docs.bonnard.dev/docs/cli-reference) -every command, flag, and option194- [Modeling Guide](https://docs.bonnard.dev/docs/modeling) -cubes, views, metrics, and dimensions195- [Querying](https://docs.bonnard.dev/docs/querying) -JSON and SQL query syntax196- [Changelog](https://docs.bonnard.dev/docs/changelog) -what shipped and when197198## Community199200- [Discord](https://discord.com/invite/RQuvjGRz) -ask questions, share feedback, connect with the team201- [GitHub Issues](https://github.com/meal-inc/bonnard-cli/issues) -bug reports and feature requests202- [LinkedIn](https://www.linkedin.com/company/bonnarddev/) -follow for updates203- [Website](https://www.bonnard.dev) -learn more about Bonnard204205Contributions are welcome. If you find a bug or have an idea, open an issue or submit a pull request.206207## License208209[MIT](./LICENSE)210
Full transparency — inspect the skill content before installing.