@bonnard/cli 0.2.7 → 0.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +10 -8
- package/dist/bin/bon.mjs +3 -3
- package/dist/docs/topics/cli.md +16 -0
- package/dist/docs/topics/dashboards.components.md +102 -12
- package/dist/docs/topics/dashboards.examples.md +163 -6
- package/dist/docs/topics/dashboards.inputs.md +179 -0
- package/dist/docs/topics/dashboards.md +39 -5
- package/dist/docs/topics/dashboards.queries.md +7 -5
- package/dist/docs/topics/views.md +1 -1
- package/dist/templates/claude/skills/bonnard-design-guide/SKILL.md +5 -4
- package/dist/templates/cursor/rules/bonnard-design-guide.mdc +5 -4
- package/package.json +7 -2
- package/dist/docs/topics/features.catalog.md +0 -31
- package/dist/docs/topics/features.cli.md +0 -59
- package/dist/docs/topics/features.context-graph.md +0 -18
- package/dist/docs/topics/features.governance.md +0 -83
- package/dist/docs/topics/features.mcp.md +0 -48
- package/dist/docs/topics/features.md +0 -15
- package/dist/docs/topics/features.sdk.md +0 -53
- package/dist/docs/topics/features.semantic-layer.md +0 -56
- package/dist/docs/topics/features.slack-teams.md +0 -18
- package/dist/docs/topics/workflow.deploy.md +0 -193
- package/dist/docs/topics/workflow.mcp.md +0 -179
- package/dist/docs/topics/workflow.md +0 -165
- package/dist/docs/topics/workflow.query.md +0 -198
- package/dist/docs/topics/workflow.validate.md +0 -125
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Dashboards
|
|
2
2
|
|
|
3
3
|
> Build interactive dashboards from markdown with embedded semantic layer queries.
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
Dashboards
|
|
7
|
+
Dashboards let your team track key metrics without leaving the Bonnard app. Define queries once in markdown, deploy them, and every viewer gets live, governed data — no separate BI tool needed. Filters, formatting, and layout are all declared in the same file.
|
|
8
|
+
|
|
9
|
+
A dashboard is a markdown file with YAML frontmatter, query blocks, and chart components. Write it as a `.md` file, deploy with `bon dashboard deploy`, and view it in the Bonnard web app.
|
|
8
10
|
|
|
9
11
|
## Format
|
|
10
12
|
|
|
@@ -60,6 +62,8 @@ slug: revenue-dashboard # Optional (derived from title if omitted)
|
|
|
60
62
|
|
|
61
63
|
## Deployment
|
|
62
64
|
|
|
65
|
+
Deploy from the command line or via MCP tools. Each deploy auto-versions the dashboard so you can roll back if needed.
|
|
66
|
+
|
|
63
67
|
```bash
|
|
64
68
|
# Deploy a single dashboard
|
|
65
69
|
bon dashboard deploy revenue.md
|
|
@@ -76,8 +80,38 @@ bon dashboard remove revenue-dashboard
|
|
|
76
80
|
|
|
77
81
|
Via MCP tools, agents can use `deploy_dashboard` with the markdown content as a string.
|
|
78
82
|
|
|
83
|
+
## Versioning
|
|
84
|
+
|
|
85
|
+
Every deployment auto-increments the version number and saves a snapshot. You can view version history and restore previous versions:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# Via MCP tools:
|
|
89
|
+
# get_dashboard with version parameter to fetch a specific version
|
|
90
|
+
# deploy_dashboard with slug + restore_version to roll back
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Restoring a version creates a new version (e.g. restoring v2 from v5 creates v6 with v2's content). Version history is never deleted — only `remove_dashboard` deletes all history.
|
|
94
|
+
|
|
95
|
+
## Sharing
|
|
96
|
+
|
|
97
|
+
Dashboard viewers include a **Share** menu in the header with:
|
|
98
|
+
|
|
99
|
+
- **Copy link** — copies the current URL including any active filter state
|
|
100
|
+
- **Print to PDF** — opens the browser print dialog for PDF export
|
|
101
|
+
|
|
102
|
+
Filter state (DateRange presets, Dropdown selections) is encoded in URL query params, so shared links preserve the exact filtered view the sender was looking at.
|
|
103
|
+
|
|
104
|
+
## Governance
|
|
105
|
+
|
|
106
|
+
Dashboard queries respect the same governance policies as all other queries. When a user views a dashboard:
|
|
107
|
+
|
|
108
|
+
- **View-level access** — users only see data from views their governance groups allow
|
|
109
|
+
- **Row-level filtering** — user attributes (e.g. region, department) automatically filter query results
|
|
110
|
+
- All org members see the same dashboard list, but may see different data depending on their governance context
|
|
111
|
+
|
|
79
112
|
## See Also
|
|
80
113
|
|
|
81
|
-
- dashboards.queries
|
|
82
|
-
- dashboards.components
|
|
83
|
-
- dashboards.
|
|
114
|
+
- [Queries](dashboards.queries) — query syntax and properties
|
|
115
|
+
- [Components](dashboards.components) — chart and display components
|
|
116
|
+
- [Inputs](dashboards.inputs) — interactive filters
|
|
117
|
+
- [Examples](dashboards.examples) — complete dashboard examples
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Queries
|
|
2
2
|
|
|
3
3
|
> Define data queries in dashboard markdown using YAML code fences.
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Each query fetches data from your semantic layer and makes it available to chart components. Queries use the same measures and dimensions defined in your cubes and views — field names stay consistent whether you're querying from a dashboard, MCP, or the API.
|
|
8
|
+
|
|
9
|
+
Query blocks have a unique name and map to a `QueryOptions` shape. Components reference them using `data={query_name}`. Field names are unqualified — use `count` not `orders.count` — because the `cube` property provides the context.
|
|
8
10
|
|
|
9
11
|
## Syntax
|
|
10
12
|
|
|
@@ -112,6 +114,6 @@ filters:
|
|
|
112
114
|
|
|
113
115
|
## See Also
|
|
114
116
|
|
|
115
|
-
- dashboards.components
|
|
116
|
-
- dashboards
|
|
117
|
-
-
|
|
117
|
+
- [Components](dashboards.components) — chart and display components
|
|
118
|
+
- [Dashboards](dashboards) — overview and deployment
|
|
119
|
+
- [Querying](querying) — query format reference
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
Views are facades that expose selected measures and dimensions from one or more cubes. They define which data is available to consumers, control join paths, and organize members into logical groups.
|
|
8
8
|
|
|
9
|
-
**Views should represent how a team thinks about data**, not mirror your warehouse tables. Name views by what they answer (`sales_pipeline`, `customer_insights`) rather than what table they wrap (`orders_view`, `users_view`).
|
|
9
|
+
**Views should represent how a team thinks about data**, not mirror your warehouse tables. Name views by what they answer (`sales_pipeline`, `customer_insights`) rather than what table they wrap (`orders_view`, `users_view`). Build as many views as your audiences need, but make each one purposeful — governance policies control which views each user or role can access.
|
|
10
10
|
|
|
11
11
|
## Example
|
|
12
12
|
|
|
@@ -30,10 +30,11 @@ If you have a BI tool (Metabase, Looker, Tableau), your top dashboards
|
|
|
30
30
|
by view count are the best source of real questions. If not, ask each team:
|
|
31
31
|
"What 3 numbers do you check every week?"
|
|
32
32
|
|
|
33
|
-
**Why this matters:** A semantic layer built from questions
|
|
34
|
-
views. One built from tables
|
|
35
|
-
between.
|
|
36
|
-
|
|
33
|
+
**Why this matters:** A semantic layer built from questions produces focused,
|
|
34
|
+
audience-scoped views. One built from tables produces generic views that agents
|
|
35
|
+
struggle to choose between. Governance policies control which views each user
|
|
36
|
+
or role can access, so build as many views as your audiences need — but make
|
|
37
|
+
each one purposeful with clear descriptions.
|
|
37
38
|
|
|
38
39
|
## Principle 2: Views Are for Audiences, Not Tables
|
|
39
40
|
|
|
@@ -29,10 +29,11 @@ If you have a BI tool (Metabase, Looker, Tableau), your top dashboards
|
|
|
29
29
|
by view count are the best source of real questions. If not, ask each team:
|
|
30
30
|
"What 3 numbers do you check every week?"
|
|
31
31
|
|
|
32
|
-
**Why this matters:** A semantic layer built from questions
|
|
33
|
-
views. One built from tables
|
|
34
|
-
between.
|
|
35
|
-
|
|
32
|
+
**Why this matters:** A semantic layer built from questions produces focused,
|
|
33
|
+
audience-scoped views. One built from tables produces generic views that agents
|
|
34
|
+
struggle to choose between. Governance policies control which views each user
|
|
35
|
+
or role can access, so build as many views as your audiences need — but make
|
|
36
|
+
each one purposeful with clear descriptions.
|
|
36
37
|
|
|
37
38
|
## Principle 2: Views Are for Audiences, Not Tables
|
|
38
39
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bonnard/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"bon": "./dist/bin/bon.mjs"
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"scripts": {
|
|
12
|
-
"build": "tsdown src/bin/bon.ts --format esm --out-dir dist/bin && cp -r src/templates dist/ && mkdir -p dist/docs/topics dist/docs/schemas && cp
|
|
12
|
+
"build": "tsdown src/bin/bon.ts --format esm --out-dir dist/bin && cp -r src/templates dist/ && mkdir -p dist/docs/topics dist/docs/schemas && cp ./content/index.md dist/docs/_index.md && cp ./content/overview.md ./content/getting-started.md dist/docs/topics/ && cp ./content/modeling/*.md dist/docs/topics/ && cp ./content/dashboards/*.md dist/docs/topics/",
|
|
13
13
|
"dev": "tsdown src/bin/bon.ts --format esm --out-dir dist/bin --watch",
|
|
14
14
|
"test": "vitest run"
|
|
15
15
|
},
|
|
@@ -27,6 +27,11 @@
|
|
|
27
27
|
"tsdown": "^0.20.1",
|
|
28
28
|
"vitest": "^2.0.0"
|
|
29
29
|
},
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "https://github.com/meal-inc/bonnard-cli.git"
|
|
33
|
+
},
|
|
34
|
+
"license": "MIT",
|
|
30
35
|
"engines": {
|
|
31
36
|
"node": ">=20.0.0"
|
|
32
37
|
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# Catalog
|
|
2
|
-
|
|
3
|
-
> Browse and understand your data model — no code required.
|
|
4
|
-
|
|
5
|
-
The Bonnard catalog gives everyone on your team a live view of your semantic layer. Browse cubes, views, measures, and dimensions from the browser. Understand what data is available before writing a single query.
|
|
6
|
-
|
|
7
|
-
## What you can explore
|
|
8
|
-
|
|
9
|
-
- **Cubes and Views** — See every deployed source with field counts at a glance
|
|
10
|
-
- **Measures** — Aggregation type, SQL expression, format (currency, percentage), and description
|
|
11
|
-
- **Dimensions** — Data type, time granularity options, and custom metadata
|
|
12
|
-
- **Segments** — Pre-defined filters available for queries
|
|
13
|
-
|
|
14
|
-
## Field-level detail
|
|
15
|
-
|
|
16
|
-
Click any field to see exactly how it's calculated:
|
|
17
|
-
|
|
18
|
-
- **SQL expression** — The underlying query logic
|
|
19
|
-
- **Type and format** — How the field is aggregated and displayed
|
|
20
|
-
- **Origin cube** — Which cube a view field traces back to
|
|
21
|
-
- **Referenced fields** — Dependencies this field relies on
|
|
22
|
-
- **Custom metadata** — Tags, labels, and annotations set by your data team
|
|
23
|
-
|
|
24
|
-
## Built for business users
|
|
25
|
-
|
|
26
|
-
The catalog is designed for anyone who needs to understand the data, not just engineers. No YAML, no terminal, no warehouse credentials. Browse the schema, read descriptions, and know exactly what to ask your AI agent for.
|
|
27
|
-
|
|
28
|
-
## See Also
|
|
29
|
-
|
|
30
|
-
- [views](views) — How to create curated views for your team
|
|
31
|
-
- [cubes.public](cubes.public) — Control which cubes are visible
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
# CLI
|
|
2
|
-
|
|
3
|
-
> Built for agent-first development by data engineers.
|
|
4
|
-
|
|
5
|
-
The Bonnard CLI (`bon`) takes you from zero to a deployed semantic layer in minutes. Initialize a project, connect your warehouse, define metrics in YAML, validate locally, and deploy — all from your terminal or your AI coding agent.
|
|
6
|
-
|
|
7
|
-
## Agent-ready from the start
|
|
8
|
-
|
|
9
|
-
`bon init` generates context files for your AI coding tools automatically:
|
|
10
|
-
|
|
11
|
-
- **Claude Code** — `.claude/rules/` + get-started skill
|
|
12
|
-
- **Cursor** — `.cursor/rules/` with auto-apply frontmatter
|
|
13
|
-
- **Codex** — `AGENTS.md` + skills folder
|
|
14
|
-
|
|
15
|
-
Your agent understands Bonnard's modeling language from the first prompt.
|
|
16
|
-
|
|
17
|
-
## Key commands
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
bon init # Scaffold project + agent context
|
|
21
|
-
bon datasource add --demo # Add a demo warehouse instantly
|
|
22
|
-
bon datasource add --from-dbt # Import connections from dbt
|
|
23
|
-
bon validate # Check YAML syntax
|
|
24
|
-
bon deploy -m "description" # Ship to production (message required)
|
|
25
|
-
bon query '{"measures":["orders.count"]}' # Test your semantic layer
|
|
26
|
-
bon deployments # List deployment history
|
|
27
|
-
bon diff <id> # View changes in a deployment
|
|
28
|
-
bon annotate <id> --data '{...}' # Add context to deployment changes
|
|
29
|
-
bon mcp # Get MCP setup instructions
|
|
30
|
-
bon docs cubes.measures # Read modeling docs in terminal
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## CI/CD ready
|
|
34
|
-
|
|
35
|
-
Deploy from GitHub Actions, GitLab CI, or any pipeline:
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
bon deploy --ci -m "CI deploy"
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
Non-interactive mode. Datasources are synced automatically. Fails fast if anything is misconfigured.
|
|
42
|
-
|
|
43
|
-
## Deployment versioning
|
|
44
|
-
|
|
45
|
-
Every deploy creates a versioned deployment with automatic change detection — added, modified, removed, and breaking changes are flagged. Review history with `bon deployments`, inspect changes with `bon diff`, and add context with `bon annotate`.
|
|
46
|
-
|
|
47
|
-
## Built-in documentation
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
bon docs cubes.measures # Read modeling docs in your terminal
|
|
51
|
-
bon docs --search "joins" # Search across all topics
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
No context-switching. Learn and build in the same workflow.
|
|
55
|
-
|
|
56
|
-
## See Also
|
|
57
|
-
|
|
58
|
-
- [workflow.deploy](workflow.deploy) — Deployment details
|
|
59
|
-
- [workflow.validate](workflow.validate) — Validation reference
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# Context Graph (Coming Soon)
|
|
2
|
-
|
|
3
|
-
> Visualize how your metrics connect. Coming soon.
|
|
4
|
-
|
|
5
|
-
The Business Context Graph will provide an interactive visual map of your entire semantic layer — cubes, views, joins, and field dependencies — so you can understand impact before making changes.
|
|
6
|
-
|
|
7
|
-
## Planned capabilities
|
|
8
|
-
|
|
9
|
-
- **Relationship visualization** — See how cubes connect through joins and shared dimensions
|
|
10
|
-
- **Impact analysis** — Understand which views and measures are affected when you change a cube
|
|
11
|
-
- **Field lineage** — Trace any metric back through its dependencies to the source table
|
|
12
|
-
- **Search and filter** — Navigate large models by searching for specific fields or cubes
|
|
13
|
-
|
|
14
|
-
## Why it matters
|
|
15
|
-
|
|
16
|
-
As your semantic layer grows, understanding the relationships between dozens of cubes and hundreds of fields becomes critical. The Context Graph gives your team a shared mental model of how metrics are defined and connected — reducing errors and speeding up development.
|
|
17
|
-
|
|
18
|
-
Interested in early access? Reach out at [hello@bonnard.dev](mailto:hello@bonnard.dev).
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
# Governance
|
|
2
|
-
|
|
3
|
-
> Control who can see which views, columns, and rows in your semantic layer.
|
|
4
|
-
|
|
5
|
-
Bonnard provides admin-managed data governance — control which views, columns, and rows each group of users can access. Policies are configured in the web UI and enforced automatically across MCP queries and the API. Changes take effect within one minute.
|
|
6
|
-
|
|
7
|
-
## How It Works
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
Admin configures in web UI:
|
|
11
|
-
Groups → Views → Field/Row restrictions
|
|
12
|
-
|
|
13
|
-
Enforced automatically:
|
|
14
|
-
MCP queries + API → only see what policies allow
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
Governance uses **groups** as the unit of access. Each group has a set of **policies** that define which views its members can see, and optionally restrict specific columns or rows within those views.
|
|
18
|
-
|
|
19
|
-
## Groups
|
|
20
|
-
|
|
21
|
-
Groups represent teams or roles in your organization — "Sales Team", "Finance", "Executive". Create and manage groups from the **Governance** page in the Bonnard dashboard.
|
|
22
|
-
|
|
23
|
-
Each group has:
|
|
24
|
-
- **Name** and optional description
|
|
25
|
-
- **Color** for visual identification
|
|
26
|
-
- **View access** — which views the group can query
|
|
27
|
-
- **Members** — which users belong to the group
|
|
28
|
-
|
|
29
|
-
Users can belong to multiple groups. Their effective access is the **union** of all group policies.
|
|
30
|
-
|
|
31
|
-
## View-Level Access (Level 1)
|
|
32
|
-
|
|
33
|
-
The simplest control: toggle which views a group can see. Unchecked views are completely invisible to group members — they won't appear in `explore_schema` or be queryable.
|
|
34
|
-
|
|
35
|
-
From the group detail page, check the views you want to grant access to and click **Save changes**. New policies default to "All fields" with no row filters.
|
|
36
|
-
|
|
37
|
-
## Field-Level Access (Level 2)
|
|
38
|
-
|
|
39
|
-
Fine-tune which measures and dimensions a group can see within a view. Click the gear icon on any granted view to open the fine-tune dialog.
|
|
40
|
-
|
|
41
|
-
Three modes:
|
|
42
|
-
- **All fields** — full access to every measure and dimension (default)
|
|
43
|
-
- **Only these** — whitelist specific fields; everything else is hidden
|
|
44
|
-
- **All except** — blacklist specific fields; everything else is visible
|
|
45
|
-
|
|
46
|
-
Hidden fields are removed from the schema — they don't appear in `explore_schema` and can't be used in queries.
|
|
47
|
-
|
|
48
|
-
## Row-Level Filters (Level 2)
|
|
49
|
-
|
|
50
|
-
Restrict which rows a group can see. Add row filters in the fine-tune dialog to limit data by dimension values.
|
|
51
|
-
|
|
52
|
-
For example, filter `traffic_source` to `equals B2B, Organic` so the group only sees rows where traffic_source is B2B or Organic. Multiple values in a single filter are OR'd (any match). Multiple separate filters are AND'd (all must match).
|
|
53
|
-
|
|
54
|
-
Row filters are applied server-side on every query — users cannot bypass them.
|
|
55
|
-
|
|
56
|
-
## Members
|
|
57
|
-
|
|
58
|
-
Assign users to groups from the **Members** tab. Each user shows which groups they belong to and a preview of their effective access (which views they can query, any field or row restrictions).
|
|
59
|
-
|
|
60
|
-
Users without any group assignment see nothing — they must be added to at least one group to query governed views.
|
|
61
|
-
|
|
62
|
-
## How Policies Are Enforced
|
|
63
|
-
|
|
64
|
-
Policies configured in the web UI are stored in Supabase and injected into the query engine at runtime. When a user queries via MCP or the API:
|
|
65
|
-
|
|
66
|
-
1. Their JWT is enriched with group memberships
|
|
67
|
-
2. The query engine loads policies for those groups
|
|
68
|
-
3. View visibility, field restrictions, and row filters are applied automatically
|
|
69
|
-
4. The user only sees data their policies allow
|
|
70
|
-
|
|
71
|
-
No YAML changes are needed — governance is fully managed through the dashboard.
|
|
72
|
-
|
|
73
|
-
## Best Practices
|
|
74
|
-
|
|
75
|
-
1. **Start with broad access, then restrict** — give groups all views first, then fine-tune as needed
|
|
76
|
-
2. **Use groups for teams, not individuals** — easier to manage and audit
|
|
77
|
-
3. **Test with MCP** — after changing policies, query via MCP to verify the restrictions work as expected
|
|
78
|
-
4. **Review after schema deploys** — new views need to be added to group policies to become visible
|
|
79
|
-
|
|
80
|
-
## See Also
|
|
81
|
-
|
|
82
|
-
- [features.mcp](features.mcp) — How AI agents query your semantic layer
|
|
83
|
-
- [views](views) — Creating curated data views
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
# MCP
|
|
2
|
-
|
|
3
|
-
> Connect your preferred AI agent to your semantic layer.
|
|
4
|
-
|
|
5
|
-
Bonnard exposes your semantic layer as a remote MCP server. Add one URL to your agent platform and it can explore your data model, run queries, and render charts — all through the Model Context Protocol.
|
|
6
|
-
|
|
7
|
-

|
|
8
|
-
|
|
9
|
-
## Connect your agent
|
|
10
|
-
|
|
11
|
-
Bonnard works with any MCP-compatible client:
|
|
12
|
-
|
|
13
|
-
- **Claude Desktop** — Add as a custom connector
|
|
14
|
-
- **ChatGPT** — Add via Settings > Apps (Pro/Plus)
|
|
15
|
-
- **Cursor** — Add via Settings > MCP or `.cursor/mcp.json`
|
|
16
|
-
- **Microsoft Copilot Studio** — Add as an MCP tool with OAuth 2.0 authentication
|
|
17
|
-
- **VS Code / GitHub Copilot** — Add via Command Palette or `.vscode/mcp.json`
|
|
18
|
-
- **Claude Code** — Add via `claude mcp add` or `.mcp.json`
|
|
19
|
-
- **Windsurf** — Add via MCP config
|
|
20
|
-
- **Gemini CLI** — Add via `.gemini/settings.json`
|
|
21
|
-
|
|
22
|
-
One URL for all of them:
|
|
23
|
-
|
|
24
|
-
```
|
|
25
|
-
https://mcp.bonnard.dev/mcp
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
On first use, your browser opens to sign in — the agent receives a 30-day token automatically. No API keys, no config files, no secrets to rotate.
|
|
29
|
-
|
|
30
|
-
## Tools your agent gets
|
|
31
|
-
|
|
32
|
-
| Tool | What it does |
|
|
33
|
-
|------|-------------|
|
|
34
|
-
| `explore_schema` | Browse cubes, views, and fields — or search by keyword |
|
|
35
|
-
| `query` | Run structured queries with measures, dimensions, filters, and time grouping |
|
|
36
|
-
| `sql_query` | Execute raw SQL for complex analysis (CTEs, UNIONs, custom calculations) |
|
|
37
|
-
| `describe_field` | Inspect any field's SQL definition, type, format, and dependencies |
|
|
38
|
-
| `visualize` | Render line, bar, pie, and KPI charts directly inside the conversation |
|
|
39
|
-
|
|
40
|
-
## Charts in chat
|
|
41
|
-
|
|
42
|
-
The `visualize` tool renders interactive charts inline — auto-detected from your query shape. Charts support dark mode, currency and percentage formatting, and multi-series data.
|
|
43
|
-
|
|
44
|
-
Ask "show me revenue by region this quarter" and get a formatted chart in your conversation, not a data dump.
|
|
45
|
-
|
|
46
|
-
## See Also
|
|
47
|
-
|
|
48
|
-
- [workflow.mcp](workflow.mcp) — Step-by-step setup for each platform
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# Features
|
|
2
|
-
|
|
3
|
-
> Everything you need to define, deploy, and query your semantic layer.
|
|
4
|
-
|
|
5
|
-
Bonnard is a semantic layer platform built for AI-first analytics. Define your metrics once in YAML, deploy in seconds, and query from anywhere — your IDE, your AI agent, or your own apps.
|
|
6
|
-
|
|
7
|
-
- **[MCP](features.mcp)** — Connect your preferred AI agent to your semantic layer
|
|
8
|
-
- **[CLI](features.cli)** — Agent-first development workflow for data engineers
|
|
9
|
-
- **[Semantic Layer](features.semantic-layer)** — Hosted, queryable metrics layer across all your warehouses
|
|
10
|
-
- **[Catalog](features.catalog)** — Browse and understand your data model from the browser
|
|
11
|
-
- **[SDK](features.sdk)** — Build custom data apps on top of Bonnard
|
|
12
|
-
- **[Governance](features.governance)** — User and group-level permissions for your data
|
|
13
|
-
- **[Context Graph](features.context-graph)** — Visual map of how your metrics connect (coming soon)
|
|
14
|
-
- **[Slack & Teams](features.slack-teams)** — AI agents in your team chat (coming soon)
|
|
15
|
-
- **[Deployment Versioning](workflow.deploy)** — Change detection, diff, and annotations for every deploy
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
# SDK
|
|
2
|
-
|
|
3
|
-
> Build custom data apps on top of your semantic layer.
|
|
4
|
-
|
|
5
|
-
The Bonnard SDK (`@bonnard/sdk`) is a lightweight TypeScript client for querying your deployed semantic layer programmatically. Build dashboards, embedded analytics, internal tools, or data pipelines — all backed by your governed metrics.
|
|
6
|
-
|
|
7
|
-
## Quick start
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npm install @bonnard/sdk
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
```typescript
|
|
14
|
-
import { createClient } from '@bonnard/sdk';
|
|
15
|
-
|
|
16
|
-
const bonnard = createClient({
|
|
17
|
-
apiKey: 'your-api-key',
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
const result = await bonnard.query({
|
|
21
|
-
cube: 'orders',
|
|
22
|
-
measures: ['revenue', 'count'],
|
|
23
|
-
dimensions: ['status'],
|
|
24
|
-
timeDimension: {
|
|
25
|
-
dimension: 'created_at',
|
|
26
|
-
granularity: 'month',
|
|
27
|
-
dateRange: ['2025-01-01', '2025-12-31'],
|
|
28
|
-
},
|
|
29
|
-
});
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Type-safe queries
|
|
33
|
-
|
|
34
|
-
Full TypeScript support with inference. Measures, dimensions, filters, time dimensions, and sort orders are all typed. Query results include field annotations with titles and types.
|
|
35
|
-
|
|
36
|
-
```typescript
|
|
37
|
-
const result = await bonnard.sql<OrderRow>(
|
|
38
|
-
`SELECT status, MEASURE(revenue) FROM orders GROUP BY 1`
|
|
39
|
-
);
|
|
40
|
-
// result.data is OrderRow[]
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## What you can build
|
|
44
|
-
|
|
45
|
-
- **Custom dashboards** — Query your semantic layer from Next.js, React, or any frontend
|
|
46
|
-
- **Embedded analytics** — Add governed metrics to your product
|
|
47
|
-
- **Data pipelines** — Consume semantic layer data in ETL workflows
|
|
48
|
-
- **Internal tools** — Build admin panels backed by consistent metrics
|
|
49
|
-
|
|
50
|
-
## See Also
|
|
51
|
-
|
|
52
|
-
- [features.semantic-layer](features.semantic-layer) — Platform overview
|
|
53
|
-
- [workflow.query](workflow.query) — Query format reference
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
# Semantic Layer
|
|
2
|
-
|
|
3
|
-
> Define metrics once. Query from anywhere.
|
|
4
|
-
|
|
5
|
-
Bonnard hosts your semantic layer so you don't have to. Define cubes and views in YAML, deploy with `bon deploy`, and query via JSON API, SQL, or MCP — no infrastructure to manage.
|
|
6
|
-
|
|
7
|
-
## Multi-warehouse
|
|
8
|
-
|
|
9
|
-
Connect any combination of warehouses through a single semantic layer:
|
|
10
|
-
|
|
11
|
-
- **PostgreSQL** — Direct TCP connection
|
|
12
|
-
- **Redshift** — Cluster or serverless endpoint
|
|
13
|
-
- **Snowflake** — Account-based authentication
|
|
14
|
-
- **BigQuery** — GCP service account
|
|
15
|
-
- **Databricks** — Token-based workspace connection
|
|
16
|
-
|
|
17
|
-
Metrics from different warehouses are queried through the same API. Your consumers never need to know where the data lives.
|
|
18
|
-
|
|
19
|
-
## Two query formats
|
|
20
|
-
|
|
21
|
-
**JSON API** — Structured queries with type-safe parameters:
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
bon query '{
|
|
25
|
-
"measures": ["orders.revenue"],
|
|
26
|
-
"dimensions": ["orders.status"],
|
|
27
|
-
"timeDimensions": [{
|
|
28
|
-
"dimension": "orders.created_at",
|
|
29
|
-
"granularity": "month",
|
|
30
|
-
"dateRange": ["2025-01-01", "2025-12-31"]
|
|
31
|
-
}]
|
|
32
|
-
}'
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
**SQL** — Full Cube SQL syntax for complex analysis:
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
bon query --sql "SELECT status, MEASURE(revenue) FROM orders GROUP BY 1"
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## Fully managed
|
|
42
|
-
|
|
43
|
-
Your models are stored securely and served from Bonnard's infrastructure. Each organization gets isolated query execution scoped by JWT — no shared data, no noisy neighbors.
|
|
44
|
-
|
|
45
|
-
Deploy in seconds. Query in milliseconds.
|
|
46
|
-
|
|
47
|
-
## Built for AI agents
|
|
48
|
-
|
|
49
|
-
Views and descriptions are the discovery API for AI agents. When an agent calls `explore_schema`, it sees view names and descriptions — that's all it has to decide where to query. Well-written descriptions with scope, disambiguation, and dimension values make agents accurate. See the design guide principles in the CLI (`/bonnard-design-guide`) for details.
|
|
50
|
-
|
|
51
|
-
## See Also
|
|
52
|
-
|
|
53
|
-
- [workflow.query](workflow.query) — Query format reference
|
|
54
|
-
- [cubes](cubes) — Cube modeling guide
|
|
55
|
-
- [views](views) — View modeling guide
|
|
56
|
-
- [features.governance](features.governance) — Access control for views and data
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# Slack & Teams (Coming Soon)
|
|
2
|
-
|
|
3
|
-
> AI agents in your team chat. Coming soon.
|
|
4
|
-
|
|
5
|
-
Bonnard will bring semantic layer queries directly into Slack and Microsoft Teams — so anyone on your team can ask questions about data without leaving the conversation.
|
|
6
|
-
|
|
7
|
-
## Planned capabilities
|
|
8
|
-
|
|
9
|
-
- **Natural language queries** — Ask "what was revenue last month?" in a channel and get an answer with a chart
|
|
10
|
-
- **Governed responses** — Every answer goes through your semantic layer, so metrics are always consistent
|
|
11
|
-
- **Shared context** — Results posted in channels are visible to the whole team, not siloed in individual AI chats
|
|
12
|
-
- **Proactive alerts** — Get notified when key metrics change beyond thresholds you define
|
|
13
|
-
|
|
14
|
-
## Why it matters
|
|
15
|
-
|
|
16
|
-
Your team already lives in Slack and Teams. Instead of asking analysts or switching to a BI tool, anyone can get instant, governed answers right where they work. The same semantic layer that powers your AI agents and dashboards powers your team chat.
|
|
17
|
-
|
|
18
|
-
Interested in early access? Reach out at [hello@bonnard.dev](mailto:hello@bonnard.dev).
|