@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,193 +0,0 @@
|
|
|
1
|
-
# Deploy
|
|
2
|
-
|
|
3
|
-
> Deploy your cubes and views to the Bonnard platform using the CLI. Once deployed, your semantic layer is queryable via the REST API, MCP for AI agents, and connected BI tools.
|
|
4
|
-
|
|
5
|
-
## Overview
|
|
6
|
-
|
|
7
|
-
The `bon deploy` command uploads your cubes and views to Bonnard, making them available for querying via the API. It validates and tests connections before deploying, and creates a versioned deployment with change detection.
|
|
8
|
-
|
|
9
|
-
## Usage
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
bon deploy -m "description of changes"
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
A `-m` message is **required** — it describes what changed in this deployment.
|
|
16
|
-
|
|
17
|
-
### Flags
|
|
18
|
-
|
|
19
|
-
| Flag | Description |
|
|
20
|
-
|------|-------------|
|
|
21
|
-
| `-m "message"` | **Required.** Deployment description |
|
|
22
|
-
| `--ci` | Non-interactive mode |
|
|
23
|
-
|
|
24
|
-
Datasources are always synced automatically during deploy.
|
|
25
|
-
|
|
26
|
-
### CI/CD
|
|
27
|
-
|
|
28
|
-
For automated pipelines, use `--ci` for non-interactive mode:
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
bon deploy --ci -m "CI deploy"
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## Prerequisites
|
|
35
|
-
|
|
36
|
-
1. **Logged in** — run `bon login` first
|
|
37
|
-
2. **Valid cubes and views** — must pass `bon validate`
|
|
38
|
-
3. **Working connections** — data sources must be accessible
|
|
39
|
-
|
|
40
|
-
## What Happens
|
|
41
|
-
|
|
42
|
-
1. **Validates** — checks cubes and views for errors
|
|
43
|
-
2. **Tests connections** — verifies data source access
|
|
44
|
-
3. **Uploads** — sends cubes and views to Bonnard
|
|
45
|
-
4. **Detects changes** — compares against the previous deployment
|
|
46
|
-
5. **Activates** — makes cubes and views available for queries
|
|
47
|
-
|
|
48
|
-
## Example Output
|
|
49
|
-
|
|
50
|
-
```
|
|
51
|
-
bon deploy -m "Add revenue metrics"
|
|
52
|
-
|
|
53
|
-
✓ Validating...
|
|
54
|
-
✓ bonnard/cubes/orders.yaml
|
|
55
|
-
✓ bonnard/cubes/users.yaml
|
|
56
|
-
✓ bonnard/views/orders_overview.yaml
|
|
57
|
-
|
|
58
|
-
✓ Testing connections...
|
|
59
|
-
✓ datasource "default" connected
|
|
60
|
-
|
|
61
|
-
✓ Deploying to Bonnard...
|
|
62
|
-
Uploading 2 cubes, 1 view...
|
|
63
|
-
|
|
64
|
-
✓ Deploy complete!
|
|
65
|
-
|
|
66
|
-
Changes:
|
|
67
|
-
+ orders.total_revenue (measure)
|
|
68
|
-
+ orders.avg_order_value (measure)
|
|
69
|
-
~ orders.count (measure) — type changed
|
|
70
|
-
|
|
71
|
-
⚠ 1 breaking change detected
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
## Change Detection
|
|
75
|
-
|
|
76
|
-
Every deployment is versioned. Bonnard automatically detects:
|
|
77
|
-
|
|
78
|
-
- **Added** — new cubes, views, measures, dimensions
|
|
79
|
-
- **Modified** — changes to type, SQL, format, description
|
|
80
|
-
- **Removed** — deleted fields (flagged as breaking)
|
|
81
|
-
- **Breaking changes** — removed measures/dimensions, type changes
|
|
82
|
-
|
|
83
|
-
## Reviewing Deployments
|
|
84
|
-
|
|
85
|
-
After deploying, use these commands to review history and changes:
|
|
86
|
-
|
|
87
|
-
### List deployments
|
|
88
|
-
|
|
89
|
-
```bash
|
|
90
|
-
bon deployments # Recent deployments
|
|
91
|
-
bon deployments --all # Full history
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
### View changes in a deployment
|
|
95
|
-
|
|
96
|
-
```bash
|
|
97
|
-
bon diff <deployment-id> # All changes
|
|
98
|
-
bon diff <deployment-id> --breaking # Breaking changes only
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
### Annotate changes
|
|
102
|
-
|
|
103
|
-
Add reasoning or context to deployment changes:
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
bon annotate <deployment-id> --data '{"object": "note about why this changed"}'
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
Annotations are visible in the schema catalog and help teammates understand why changes were made.
|
|
110
|
-
|
|
111
|
-
## Deploy Flow
|
|
112
|
-
|
|
113
|
-
```
|
|
114
|
-
bon deploy -m "message"
|
|
115
|
-
│
|
|
116
|
-
├── 1. bon validate (must pass)
|
|
117
|
-
│
|
|
118
|
-
├── 2. Test all datasource connections (must succeed)
|
|
119
|
-
│
|
|
120
|
-
├── 3. Upload to Bonnard API
|
|
121
|
-
│ - cubes from bonnard/cubes/
|
|
122
|
-
│ - views from bonnard/views/
|
|
123
|
-
│ - datasource configs
|
|
124
|
-
│
|
|
125
|
-
├── 4. Detect changes vs. previous deployment
|
|
126
|
-
│
|
|
127
|
-
└── 5. Activate deployment
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
## Error Handling
|
|
131
|
-
|
|
132
|
-
### Validation Errors
|
|
133
|
-
|
|
134
|
-
```
|
|
135
|
-
✗ Validating...
|
|
136
|
-
|
|
137
|
-
bonnard/cubes/orders.yaml:15:5
|
|
138
|
-
error: Unknown measure type "counts"
|
|
139
|
-
|
|
140
|
-
Deploy aborted. Fix validation errors first.
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
### Connection Errors
|
|
144
|
-
|
|
145
|
-
```
|
|
146
|
-
✗ Testing connections...
|
|
147
|
-
✗ datasource "analytics": Connection refused
|
|
148
|
-
|
|
149
|
-
Deploy aborted. Fix connection issues:
|
|
150
|
-
- Check credentials in .bon/datasources.yaml
|
|
151
|
-
- Verify network access to database
|
|
152
|
-
- Run: bon datasource add (to reconfigure)
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
### Auth Errors
|
|
156
|
-
|
|
157
|
-
```
|
|
158
|
-
✗ Not logged in.
|
|
159
|
-
|
|
160
|
-
Run: bon login
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
## What Gets Deployed
|
|
164
|
-
|
|
165
|
-
| Source | Deployed |
|
|
166
|
-
|--------|----------|
|
|
167
|
-
| `bonnard/cubes/*.yaml` | All cube definitions |
|
|
168
|
-
| `bonnard/views/*.yaml` | All view definitions |
|
|
169
|
-
| `.bon/datasources.yaml` | Connection configs (credentials encrypted) |
|
|
170
|
-
| `bon.yaml` | Project settings |
|
|
171
|
-
|
|
172
|
-
## Deployment Behavior
|
|
173
|
-
|
|
174
|
-
- **Replaces** previous deployment (not additive)
|
|
175
|
-
- **All or nothing** — partial deploys don't happen
|
|
176
|
-
- **Instant** — changes take effect immediately
|
|
177
|
-
- **Versioned** — every deployment is tracked with changes
|
|
178
|
-
|
|
179
|
-
## Best Practices
|
|
180
|
-
|
|
181
|
-
1. **Always include a meaningful message** — helps teammates understand what changed
|
|
182
|
-
2. **Validate first** — run `bon validate` before deploy
|
|
183
|
-
3. **Test locally** — verify queries work before deploying
|
|
184
|
-
4. **Use version control** — commit cubes and views before deploying
|
|
185
|
-
5. **Review after deploy** — use `bon diff` to check for unintended breaking changes
|
|
186
|
-
6. **Annotate breaking changes** — add context so consumers know what to update
|
|
187
|
-
|
|
188
|
-
## See Also
|
|
189
|
-
|
|
190
|
-
- workflow
|
|
191
|
-
- workflow.validate
|
|
192
|
-
- cubes
|
|
193
|
-
- views
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
# MCP
|
|
2
|
-
|
|
3
|
-
> Connect AI agents like Claude, ChatGPT, and Cursor to your semantic layer using the Model Context Protocol. MCP gives agents governed access to your metrics and dimensions.
|
|
4
|
-
|
|
5
|
-
## Overview
|
|
6
|
-
|
|
7
|
-
After deploying with `bon deploy`, AI agents can query your semantic layer through the Model Context Protocol (MCP). Bonnard's MCP server provides tools for exploring your data model and running queries.
|
|
8
|
-
|
|
9
|
-
MCP is supported by Claude, ChatGPT, Cursor, Windsurf, VS Code, Gemini, and more.
|
|
10
|
-
|
|
11
|
-
## MCP URL
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
https://mcp.bonnard.dev/mcp
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## Setup
|
|
18
|
-
|
|
19
|
-
### Claude Desktop
|
|
20
|
-
|
|
21
|
-
1. Click the **+** button in the chat input, then select **Connectors > Manage connectors**
|
|
22
|
-
|
|
23
|
-

|
|
24
|
-
|
|
25
|
-
2. Click **Add custom connector**
|
|
26
|
-
3. Enter a name (e.g. "Bonnard MCP") and the MCP URL: `https://mcp.bonnard.dev/mcp`
|
|
27
|
-
4. Click **Add**
|
|
28
|
-
|
|
29
|
-

|
|
30
|
-
|
|
31
|
-
Once added, enable the Bonnard connector in any chat via the **Connectors** menu.
|
|
32
|
-
|
|
33
|
-
Remote MCP servers in Claude Desktop must be added through the Connectors UI, not the JSON config file.
|
|
34
|
-
|
|
35
|
-
### ChatGPT
|
|
36
|
-
|
|
37
|
-
Custom MCP servers must be added in the browser at [chatgpt.com](https://chatgpt.com) — the desktop app does not support this.
|
|
38
|
-
|
|
39
|
-
1. Go to [chatgpt.com](https://chatgpt.com) in your browser
|
|
40
|
-
2. Open **Settings > Apps**
|
|
41
|
-
|
|
42
|
-

|
|
43
|
-
|
|
44
|
-
3. Click **Advanced settings**, enable **Developer mode**, then click **Create app**
|
|
45
|
-
|
|
46
|
-

|
|
47
|
-
|
|
48
|
-
4. Enter a name (e.g. "Bonnard MCP"), the MCP URL `https://mcp.bonnard.dev/mcp`, and select **OAuth** for authentication
|
|
49
|
-
5. Check the acknowledgement box and click **Create**
|
|
50
|
-
|
|
51
|
-

|
|
52
|
-
|
|
53
|
-
Once created, the Bonnard connector appears under **Enabled apps**:
|
|
54
|
-
|
|
55
|
-

|
|
56
|
-
|
|
57
|
-
Available on Pro and Plus plans.
|
|
58
|
-
|
|
59
|
-
### Cursor
|
|
60
|
-
|
|
61
|
-
Open **Settings > MCP** and add the server URL, or add to `.cursor/mcp.json` in your project:
|
|
62
|
-
|
|
63
|
-
```json
|
|
64
|
-
{
|
|
65
|
-
"mcpServers": {
|
|
66
|
-
"bonnard": {
|
|
67
|
-
"url": "https://mcp.bonnard.dev/mcp"
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
On first use, your browser will open to sign in and authorize the connection.
|
|
74
|
-
|
|
75
|
-
### VS Code / GitHub Copilot
|
|
76
|
-
|
|
77
|
-
Open the Command Palette and run **MCP: Add Server**, or add to `.vscode/mcp.json` in your project:
|
|
78
|
-
|
|
79
|
-
```json
|
|
80
|
-
{
|
|
81
|
-
"servers": {
|
|
82
|
-
"bonnard": {
|
|
83
|
-
"type": "http",
|
|
84
|
-
"url": "https://mcp.bonnard.dev/mcp"
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
On first use, your browser will open to sign in and authorize the connection.
|
|
91
|
-
|
|
92
|
-
### Claude Code
|
|
93
|
-
|
|
94
|
-
Run in your terminal:
|
|
95
|
-
|
|
96
|
-
```bash
|
|
97
|
-
claude mcp add --transport http bonnard https://mcp.bonnard.dev/mcp
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
Or add to `.mcp.json` in your project:
|
|
101
|
-
|
|
102
|
-
```json
|
|
103
|
-
{
|
|
104
|
-
"mcpServers": {
|
|
105
|
-
"bonnard": {
|
|
106
|
-
"type": "http",
|
|
107
|
-
"url": "https://mcp.bonnard.dev/mcp"
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
### Windsurf
|
|
114
|
-
|
|
115
|
-
Open **Settings > Plugins > Manage plugins > View raw config**, or edit `~/.codeium/windsurf/mcp_config.json`:
|
|
116
|
-
|
|
117
|
-
```json
|
|
118
|
-
{
|
|
119
|
-
"mcpServers": {
|
|
120
|
-
"bonnard": {
|
|
121
|
-
"serverUrl": "https://mcp.bonnard.dev/mcp"
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
### Gemini CLI
|
|
128
|
-
|
|
129
|
-
Add to `.gemini/settings.json` in your project or `~/.gemini/settings.json` globally:
|
|
130
|
-
|
|
131
|
-
```json
|
|
132
|
-
{
|
|
133
|
-
"mcpServers": {
|
|
134
|
-
"bonnard": {
|
|
135
|
-
"url": "https://mcp.bonnard.dev/mcp"
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
## Authentication
|
|
142
|
-
|
|
143
|
-
MCP uses OAuth 2.0 with PKCE. When an agent first connects:
|
|
144
|
-
|
|
145
|
-
1. Agent discovers OAuth endpoints automatically
|
|
146
|
-
2. You are redirected to Bonnard to sign in and authorize
|
|
147
|
-
3. Agent receives an access token (valid for 30 days)
|
|
148
|
-
|
|
149
|
-
No API keys or manual token management needed.
|
|
150
|
-
|
|
151
|
-
## Available Tools
|
|
152
|
-
|
|
153
|
-
Once connected, AI agents can use these MCP tools:
|
|
154
|
-
|
|
155
|
-
| Tool | Description |
|
|
156
|
-
|------|-------------|
|
|
157
|
-
| `explore_schema` | Discover views and cubes, list their measures, dimensions, and segments. Supports browsing a specific source by name or searching across all fields by keyword. |
|
|
158
|
-
| `query` | Query the semantic layer with measures, dimensions, time dimensions, filters, segments, and pagination. |
|
|
159
|
-
| `sql_query` | Execute raw SQL against the semantic layer using Cube SQL syntax with `MEASURE()` for aggregations. Use for CTEs, UNIONs, and custom calculations. |
|
|
160
|
-
| `describe_field` | Get detailed metadata for a field — SQL expression, type, format, origin cube, and referenced fields. |
|
|
161
|
-
|
|
162
|
-
## Testing
|
|
163
|
-
|
|
164
|
-
```bash
|
|
165
|
-
# Verify the MCP server is reachable
|
|
166
|
-
bon mcp test
|
|
167
|
-
|
|
168
|
-
# View connection info
|
|
169
|
-
bon mcp
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
## Managing Connections
|
|
173
|
-
|
|
174
|
-
Active MCP connections can be viewed and revoked in the Bonnard dashboard under **MCP**.
|
|
175
|
-
|
|
176
|
-
## See Also
|
|
177
|
-
|
|
178
|
-
- workflow.deploy
|
|
179
|
-
- workflow.query
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
# Workflow
|
|
2
|
-
|
|
3
|
-
> The end-to-end workflow for building a semantic layer with Bonnard: validate your YAML definitions locally, deploy to the platform, and query your metrics via API or MCP.
|
|
4
|
-
|
|
5
|
-
## Overview
|
|
6
|
-
|
|
7
|
-
Building a semantic layer with Bonnard follows a development workflow: initialize a project, connect data sources, define cubes and views, validate, and deploy.
|
|
8
|
-
|
|
9
|
-
## Quick Start
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
# 1. Initialize project
|
|
13
|
-
bon init
|
|
14
|
-
|
|
15
|
-
# 2. Add a data source
|
|
16
|
-
bon datasource add
|
|
17
|
-
|
|
18
|
-
# 3. Create cubes in bonnard/cubes/ and views in bonnard/views/
|
|
19
|
-
|
|
20
|
-
# 4. Validate
|
|
21
|
-
bon validate
|
|
22
|
-
|
|
23
|
-
# 5. Deploy to Bonnard
|
|
24
|
-
bon deploy -m "Initial semantic layer"
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Project Structure
|
|
28
|
-
|
|
29
|
-
After `bon init`, your project has:
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
my-project/
|
|
33
|
-
├── bon.yaml # Project configuration
|
|
34
|
-
├── bonnard/ # Semantic layer definitions
|
|
35
|
-
│ ├── cubes/ # Cube definitions
|
|
36
|
-
│ │ └── orders.yaml
|
|
37
|
-
│ └── views/ # View definitions
|
|
38
|
-
│ └── orders_overview.yaml
|
|
39
|
-
└── .bon/ # Local config (gitignored)
|
|
40
|
-
└── datasources.yaml # Data source credentials
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Development Cycle
|
|
44
|
-
|
|
45
|
-
### 1. Define Cubes
|
|
46
|
-
|
|
47
|
-
Create cubes that map to your database tables:
|
|
48
|
-
|
|
49
|
-
```yaml
|
|
50
|
-
# bonnard/cubes/orders.yaml
|
|
51
|
-
cubes:
|
|
52
|
-
- name: orders
|
|
53
|
-
sql_table: public.orders
|
|
54
|
-
|
|
55
|
-
measures:
|
|
56
|
-
- name: count
|
|
57
|
-
type: count
|
|
58
|
-
|
|
59
|
-
dimensions:
|
|
60
|
-
- name: status
|
|
61
|
-
type: string
|
|
62
|
-
sql: status
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### 2. Define Views
|
|
66
|
-
|
|
67
|
-
Create views that expose cubes to consumers:
|
|
68
|
-
|
|
69
|
-
```yaml
|
|
70
|
-
# bonnard/views/orders_overview.yaml
|
|
71
|
-
views:
|
|
72
|
-
- name: orders_overview
|
|
73
|
-
cubes:
|
|
74
|
-
- join_path: orders
|
|
75
|
-
includes:
|
|
76
|
-
- count
|
|
77
|
-
- status
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
### 3. Validate
|
|
81
|
-
|
|
82
|
-
Check for syntax errors and test connections:
|
|
83
|
-
|
|
84
|
-
```bash
|
|
85
|
-
bon validate
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
### 4. Deploy
|
|
89
|
-
|
|
90
|
-
Push cubes and views to Bonnard:
|
|
91
|
-
|
|
92
|
-
```bash
|
|
93
|
-
bon deploy -m "Add orders cube and overview view"
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
### 5. Review
|
|
97
|
-
|
|
98
|
-
Check what changed in your deployment:
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
bon deployments # List recent deployments
|
|
102
|
-
bon diff <deployment-id> # View all changes
|
|
103
|
-
bon diff <deployment-id> --breaking # Breaking changes only
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
## File Organization
|
|
107
|
-
|
|
108
|
-
### One Cube Per File
|
|
109
|
-
|
|
110
|
-
```
|
|
111
|
-
bonnard/cubes/
|
|
112
|
-
├── orders.yaml
|
|
113
|
-
├── users.yaml
|
|
114
|
-
├── products.yaml
|
|
115
|
-
└── line_items.yaml
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
### Related Cubes Together
|
|
119
|
-
|
|
120
|
-
```
|
|
121
|
-
bonnard/cubes/
|
|
122
|
-
├── sales/
|
|
123
|
-
│ ├── orders.yaml
|
|
124
|
-
│ └── line_items.yaml
|
|
125
|
-
├── users/
|
|
126
|
-
│ ├── users.yaml
|
|
127
|
-
│ └── profiles.yaml
|
|
128
|
-
└── products/
|
|
129
|
-
└── products.yaml
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
## Best Practices
|
|
133
|
-
|
|
134
|
-
1. **Start from questions** — collect the most common questions your team asks, then build views that answer them. Don't just mirror your warehouse tables.
|
|
135
|
-
2. **Add filtered measures** — if a dashboard card has a WHERE clause beyond a date range, that filter should be a filtered measure. This is the #1 way to match real dashboard numbers.
|
|
136
|
-
3. **Write descriptions for agents** — descriptions are how AI agents choose which view and measure to use. Lead with scope, cross-reference related views, include dimension values.
|
|
137
|
-
4. **Validate often** — run `bon validate` after each change
|
|
138
|
-
5. **Test with real questions** — after deploying, ask an AI agent via MCP the same questions your team asks. Check it picks the right view and measure.
|
|
139
|
-
6. **Iterate** — expect 2-4 rounds of deploying, testing with questions, and improving descriptions before agents reliably answer the top 10 questions.
|
|
140
|
-
|
|
141
|
-
## Commands Reference
|
|
142
|
-
|
|
143
|
-
| Command | Description |
|
|
144
|
-
|---------|-------------|
|
|
145
|
-
| `bon init` | Create project structure |
|
|
146
|
-
| `bon datasource add` | Add a data source |
|
|
147
|
-
| `bon datasource add --demo` | Add demo dataset (no warehouse needed) |
|
|
148
|
-
| `bon datasource add --from-dbt` | Import from dbt profiles |
|
|
149
|
-
| `bon datasource list` | List configured sources |
|
|
150
|
-
| `bon validate` | Check cube and view syntax |
|
|
151
|
-
| `bon deploy -m "message"` | Deploy to Bonnard (message required) |
|
|
152
|
-
| `bon deploy --ci` | Non-interactive deploy |
|
|
153
|
-
| `bon deployments` | List deployment history |
|
|
154
|
-
| `bon diff <id>` | View changes in a deployment |
|
|
155
|
-
| `bon annotate <id>` | Add context to deployment changes |
|
|
156
|
-
| `bon query '{...}'` | Query the semantic layer |
|
|
157
|
-
| `bon mcp` | MCP setup instructions for AI agents |
|
|
158
|
-
| `bon docs` | Browse documentation |
|
|
159
|
-
|
|
160
|
-
## See Also
|
|
161
|
-
|
|
162
|
-
- workflow.validate
|
|
163
|
-
- workflow.deploy
|
|
164
|
-
- cubes
|
|
165
|
-
- views
|