@bonnard/cli 0.1.4 → 0.1.6

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.
Files changed (47) hide show
  1. package/dist/bin/bon.mjs +576 -91
  2. package/dist/bin/{models-IsV2sX74.mjs → models-CzOWi3fU.mjs} +5 -3
  3. package/dist/bin/{validate-C4EHvJzJ.mjs → validate-BUHevw7F.mjs} +4 -2
  4. package/dist/docs/_index.md +1 -0
  5. package/dist/docs/topics/cubes.data-source.md +0 -4
  6. package/dist/docs/topics/cubes.dimensions.format.md +0 -4
  7. package/dist/docs/topics/cubes.dimensions.md +0 -4
  8. package/dist/docs/topics/cubes.dimensions.primary-key.md +0 -4
  9. package/dist/docs/topics/cubes.dimensions.sub-query.md +0 -4
  10. package/dist/docs/topics/cubes.dimensions.time.md +0 -4
  11. package/dist/docs/topics/cubes.dimensions.types.md +0 -4
  12. package/dist/docs/topics/cubes.extends.md +0 -4
  13. package/dist/docs/topics/cubes.hierarchies.md +0 -4
  14. package/dist/docs/topics/cubes.joins.md +0 -4
  15. package/dist/docs/topics/cubes.md +2 -6
  16. package/dist/docs/topics/cubes.measures.calculated.md +0 -4
  17. package/dist/docs/topics/cubes.measures.drill-members.md +0 -4
  18. package/dist/docs/topics/cubes.measures.filters.md +0 -4
  19. package/dist/docs/topics/cubes.measures.format.md +0 -4
  20. package/dist/docs/topics/cubes.measures.md +0 -4
  21. package/dist/docs/topics/cubes.measures.rolling.md +0 -4
  22. package/dist/docs/topics/cubes.measures.types.md +0 -4
  23. package/dist/docs/topics/cubes.public.md +0 -4
  24. package/dist/docs/topics/cubes.refresh-key.md +0 -4
  25. package/dist/docs/topics/cubes.segments.md +0 -4
  26. package/dist/docs/topics/cubes.sql.md +0 -4
  27. package/dist/docs/topics/pre-aggregations.md +0 -4
  28. package/dist/docs/topics/pre-aggregations.rollup.md +0 -4
  29. package/dist/docs/topics/syntax.context-variables.md +0 -4
  30. package/dist/docs/topics/syntax.md +0 -4
  31. package/dist/docs/topics/syntax.references.md +0 -4
  32. package/dist/docs/topics/views.cubes.md +0 -4
  33. package/dist/docs/topics/views.folders.md +0 -4
  34. package/dist/docs/topics/views.includes.md +0 -4
  35. package/dist/docs/topics/views.md +2 -6
  36. package/dist/docs/topics/workflow.deploy.md +8 -12
  37. package/dist/docs/topics/workflow.mcp.md +100 -0
  38. package/dist/docs/topics/workflow.md +10 -13
  39. package/dist/docs/topics/workflow.query.md +0 -5
  40. package/dist/docs/topics/workflow.validate.md +4 -8
  41. package/dist/templates/claude/skills/bonnard-queries/SKILL.md +2 -2
  42. package/dist/templates/cursor/rules/bonnard-queries.mdc +2 -2
  43. package/dist/templates/shared/bonnard.md +8 -7
  44. package/package.json +3 -2
  45. package/dist/docs/README.md +0 -82
  46. package/dist/templates/claude/rules/bonnard.md +0 -15
  47. package/dist/templates/cursor/rules/bonnard.mdc +0 -20
@@ -1,3 +1,4 @@
1
+ import { t as getProjectPaths } from "./bon.mjs";
1
2
  import fs from "node:fs";
2
3
  import path from "node:path";
3
4
  import YAML from "yaml";
@@ -48,12 +49,13 @@ function extractFromFile(filePath) {
48
49
  return datasourceToCubes;
49
50
  }
50
51
  /**
51
- * Extract all unique datasource references from models/ and views/ directories
52
+ * Extract all unique datasource references from bonnard/models/ and bonnard/views/ directories
52
53
  * Returns datasource names mapped to the cubes that use them
53
54
  */
54
55
  function extractDatasourcesFromModels(projectPath) {
55
- const modelsDir = path.join(projectPath, "models");
56
- const viewsDir = path.join(projectPath, "views");
56
+ const paths = getProjectPaths(projectPath);
57
+ const modelsDir = paths.models;
58
+ const viewsDir = paths.views;
57
59
  const allFiles = [...collectYamlFiles(modelsDir), ...collectYamlFiles(viewsDir)];
58
60
  const aggregated = /* @__PURE__ */ new Map();
59
61
  for (const file of allFiles) {
@@ -1,3 +1,4 @@
1
+ import { t as getProjectPaths } from "./bon.mjs";
1
2
  import fs from "node:fs";
2
3
  import path from "node:path";
3
4
  import YAML from "yaml";
@@ -59,8 +60,9 @@ function checkMissingDescriptions(files) {
59
60
  return missing;
60
61
  }
61
62
  function createModelRepository(projectPath) {
62
- const modelsDir = path.join(projectPath, "models");
63
- const viewsDir = path.join(projectPath, "views");
63
+ const paths = getProjectPaths(projectPath);
64
+ const modelsDir = paths.models;
65
+ const viewsDir = paths.views;
64
66
  return {
65
67
  localPath: () => projectPath,
66
68
  dataSchemaFiles: () => {
@@ -58,6 +58,7 @@
58
58
  - [workflow.validate](workflow.validate) - Validate models locally
59
59
  - [workflow.deploy](workflow.deploy) - Deploy to Bonnard
60
60
  - [workflow.query](workflow.query) - Query the deployed semantic layer
61
+ - [workflow.mcp](workflow.mcp) - Connect AI agents via MCP
61
62
 
62
63
  ## Quick Reference
63
64
 
@@ -90,7 +90,3 @@ Cubes from different data sources cannot be directly joined. Use views or pre-ag
90
90
  - cubes
91
91
  - cubes.sql
92
92
  - workflow.deploy
93
-
94
- ## More Information
95
-
96
- https://cube.dev/docs/reference/data-model/cube#data-source
@@ -193,7 +193,3 @@ Format support varies by visualization tool. Most tools recognize common formats
193
193
  - cubes.dimensions
194
194
  - cubes.dimensions.types
195
195
  - cubes.measures.format
196
-
197
- ## More Information
198
-
199
- https://cube.dev/docs/reference/data-model/types-and-formats#format
@@ -182,7 +182,3 @@ Create derived attributes:
182
182
  - cubes.dimensions.primary-key
183
183
  - cubes.dimensions.time
184
184
  - cubes.joins
185
-
186
- ## More Information
187
-
188
- https://cube.dev/docs/reference/data-model/dimensions
@@ -104,7 +104,3 @@ Primary keys determine how pre-aggregations handle duplicates.
104
104
  - cubes.dimensions
105
105
  - cubes.dimensions.types
106
106
  - cubes.joins
107
-
108
- ## More Information
109
-
110
- https://cube.dev/docs/reference/data-model/dimensions#primary-key
@@ -172,7 +172,3 @@ dimensions:
172
172
  - cubes.dimensions
173
173
  - cubes.joins
174
174
  - cubes.measures
175
-
176
- ## More Information
177
-
178
- https://cube.dev/docs/product/data-modeling/concepts/calculated-members#subquery-dimensions
@@ -109,7 +109,3 @@ For consistent timezone handling, convert in SQL:
109
109
  - cubes.dimensions
110
110
  - cubes.dimensions.types
111
111
  - cubes.measures.rolling
112
-
113
- ## More Information
114
-
115
- https://cube.dev/docs/reference/data-model/dimensions#time-dimensions
@@ -105,7 +105,3 @@ Dimension with predefined set of values.
105
105
  - cubes.dimensions
106
106
  - cubes.dimensions.primary-key
107
107
  - cubes.dimensions.time
108
-
109
- ## More Information
110
-
111
- https://cube.dev/docs/reference/data-model/types-and-formats#dimension-types
@@ -147,7 +147,3 @@ cubes:
147
147
  - cubes
148
148
  - syntax.references
149
149
  - syntax.context-variables
150
-
151
- ## More Information
152
-
153
- https://cube.dev/docs/product/data-modeling/concepts/code-reusability-extending-cubes
@@ -172,7 +172,3 @@ Hierarchy support varies by visualization tool. Check your specific tool's docum
172
172
  - cubes.dimensions
173
173
  - cubes.joins
174
174
  - views.folders
175
-
176
- ## More Information
177
-
178
- https://cube.dev/docs/reference/data-model/hierarchies
@@ -113,7 +113,3 @@ cubes:
113
113
  - cubes
114
114
  - cubes.dimensions.primary-key
115
115
  - views
116
-
117
- ## More Information
118
-
119
- https://cube.dev/docs/reference/data-model/joins
@@ -90,10 +90,10 @@ cubes:
90
90
 
91
91
  ## File Organization
92
92
 
93
- One cube per file in the `models/` directory:
93
+ One cube per file in the `bonnard/models/` directory:
94
94
 
95
95
  ```
96
- models/
96
+ bonnard/models/
97
97
  ├── orders.yaml
98
98
  ├── users.yaml
99
99
  ├── products.yaml
@@ -115,7 +115,3 @@ models/
115
115
  - cubes.dimensions
116
116
  - cubes.joins
117
117
  - cubes.segments
118
-
119
- ## More Information
120
-
121
- https://cube.dev/docs/reference/data-model/cube
@@ -97,7 +97,3 @@ Always use `NULLIF` to prevent division by zero:
97
97
  - cubes.measures
98
98
  - cubes.measures.types
99
99
  - cubes.measures.rolling
100
-
101
- ## More Information
102
-
103
- https://cube.dev/docs/reference/data-model/measures#calculated-measures
@@ -156,7 +156,3 @@ Drill-down support varies by visualization tool. Check your specific tool's docu
156
156
  - cubes.measures
157
157
  - cubes.dimensions
158
158
  - cubes.joins
159
-
160
- ## More Information
161
-
162
- https://cube.dev/docs/reference/data-model/measures#drill-members
@@ -84,7 +84,3 @@ measures:
84
84
  - cubes.measures
85
85
  - cubes.measures.calculated
86
86
  - cubes.segments
87
-
88
- ## More Information
89
-
90
- https://cube.dev/docs/reference/data-model/measures#filters
@@ -151,7 +151,3 @@ Format support varies by visualization tool. Most tools recognize `percent` and
151
151
  - cubes.measures
152
152
  - cubes.measures.types
153
153
  - cubes.dimensions.format
154
-
155
- ## More Information
156
-
157
- https://cube.dev/docs/reference/data-model/types-and-formats#format
@@ -160,7 +160,3 @@ Calculate metrics over time windows:
160
160
  - cubes.measures.filters
161
161
  - cubes.measures.calculated
162
162
  - cubes.measures.rolling
163
-
164
- ## More Information
165
-
166
- https://cube.dev/docs/reference/data-model/measures
@@ -117,7 +117,3 @@ rolling_window:
117
117
  - cubes.measures.calculated
118
118
  - cubes.dimensions.time
119
119
  - pre-aggregations
120
-
121
- ## More Information
122
-
123
- https://cube.dev/docs/reference/data-model/measures#rolling-window
@@ -120,7 +120,3 @@ Custom aggregate function (advanced).
120
120
  - cubes.measures
121
121
  - cubes.measures.calculated
122
122
  - cubes.measures.filters
123
-
124
- ## More Information
125
-
126
- https://cube.dev/docs/reference/data-model/types-and-formats#measure-types
@@ -170,7 +170,3 @@ cubes:
170
170
  - cubes.measures
171
171
  - cubes.dimensions
172
172
  - views
173
-
174
- ## More Information
175
-
176
- https://cube.dev/docs/reference/data-model/cube#public
@@ -151,7 +151,3 @@ pre_aggregations:
151
151
  - cubes
152
152
  - pre-aggregations
153
153
  - pre-aggregations.rollup
154
-
155
- ## More Information
156
-
157
- https://cube.dev/docs/reference/data-model/cube#refresh-key
@@ -119,7 +119,3 @@ segments:
119
119
  - cubes
120
120
  - cubes.measures.filters
121
121
  - views
122
-
123
- ## More Information
124
-
125
- https://cube.dev/docs/reference/data-model/segments
@@ -59,7 +59,3 @@ cubes:
59
59
  - cubes
60
60
  - cubes.data-source
61
61
  - syntax.references
62
-
63
- ## More Information
64
-
65
- https://cube.dev/docs/reference/data-model/cube#sql
@@ -124,7 +124,3 @@ measures:
124
124
  - pre-aggregations.rollup
125
125
  - cubes.measures
126
126
  - cubes.dimensions.time
127
-
128
- ## More Information
129
-
130
- https://cube.dev/docs/reference/data-model/pre-aggregations
@@ -160,7 +160,3 @@ A query uses a rollup if:
160
160
  - pre-aggregations
161
161
  - cubes.dimensions.time
162
162
  - cubes.measures
163
-
164
- ## More Information
165
-
166
- https://cube.dev/docs/reference/data-model/pre-aggregations#rollup
@@ -151,7 +151,3 @@ dimensions:
151
151
  - syntax
152
152
  - syntax.references
153
153
  - cubes.extends
154
-
155
- ## More Information
156
-
157
- https://cube.dev/docs/reference/data-model/context-variables
@@ -131,7 +131,3 @@ public: false
131
131
  - syntax.references
132
132
  - cubes
133
133
  - views
134
-
135
- ## More Information
136
-
137
- https://cube.dev/docs/product/data-modeling/syntax
@@ -172,7 +172,3 @@ sql: "metadata->>'\{key\}'"
172
172
  - syntax
173
173
  - cubes.measures.calculated
174
174
  - cubes.joins
175
-
176
- ## More Information
177
-
178
- https://cube.dev/docs/product/data-modeling/syntax#references
@@ -160,7 +160,3 @@ views:
160
160
  - views
161
161
  - views.includes
162
162
  - cubes.joins
163
-
164
- ## More Information
165
-
166
- https://cube.dev/docs/reference/data-model/view#cubes
@@ -152,7 +152,3 @@ folders:
152
152
  - views
153
153
  - views.cubes
154
154
  - views.includes
155
-
156
- ## More Information
157
-
158
- https://cube.dev/docs/reference/data-model/view#folders
@@ -137,7 +137,3 @@ Use `"*"` to include all, then exclude what you don't need:
137
137
  - views
138
138
  - views.cubes
139
139
  - views.folders
140
-
141
- ## More Information
142
-
143
- https://cube.dev/docs/reference/data-model/view#includes
@@ -113,10 +113,10 @@ views:
113
113
 
114
114
  ## File Organization
115
115
 
116
- Store views in the `views/` directory:
116
+ Store views in the `bonnard/views/` directory:
117
117
 
118
118
  ```
119
- views/
119
+ bonnard/views/
120
120
  ├── orders_overview.yaml
121
121
  ├── sales_dashboard.yaml
122
122
  └── customer_360.yaml
@@ -136,7 +136,3 @@ views/
136
136
  - views.includes
137
137
  - views.folders
138
138
  - cubes.joins
139
-
140
- ## More Information
141
-
142
- https://cube.dev/docs/reference/data-model/view
@@ -32,9 +32,9 @@ bon deploy
32
32
  bon deploy
33
33
 
34
34
  ✓ Validating models...
35
- ✓ models/orders.yaml
36
- ✓ models/users.yaml
37
- ✓ views/orders_overview.yaml
35
+ bonnard/models/orders.yaml
36
+ bonnard/models/users.yaml
37
+ bonnard/views/orders_overview.yaml
38
38
 
39
39
  ✓ Testing connections...
40
40
  ✓ datasource "default" connected
@@ -58,8 +58,8 @@ bon deploy
58
58
  ├── 2. Test all datasource connections (must succeed)
59
59
 
60
60
  ├── 3. Upload to Bonnard API
61
- │ - cubes from models/
62
- │ - views from views/
61
+ │ - cubes from bonnard/models/
62
+ │ - views from bonnard/views/
63
63
  │ - datasource configs
64
64
 
65
65
  └── 4. Activate deployment
@@ -72,7 +72,7 @@ bon deploy
72
72
  ```
73
73
  ✗ Validating models...
74
74
 
75
- models/orders.yaml:15:5
75
+ bonnard/models/orders.yaml:15:5
76
76
  error: Unknown measure type "counts"
77
77
 
78
78
  Deploy aborted. Fix validation errors first.
@@ -102,8 +102,8 @@ Run: bon login
102
102
 
103
103
  | Source | Deployed |
104
104
  |--------|----------|
105
- | `models/*.yaml` | All cube definitions |
106
- | `views/*.yaml` | All view definitions |
105
+ | `bonnard/models/*.yaml` | All cube definitions |
106
+ | `bonnard/views/*.yaml` | All view definitions |
107
107
  | `.bon/datasources.yaml` | Connection configs (credentials encrypted) |
108
108
  | `bon.yaml` | Project settings |
109
109
 
@@ -126,7 +126,3 @@ Run: bon login
126
126
  - workflow.validate
127
127
  - cubes
128
128
  - views
129
-
130
- ## More Information
131
-
132
- https://docs.bonnard.dev/cli/deploy
@@ -0,0 +1,100 @@
1
+ # workflow.mcp
2
+
3
+ > Connect AI agents to your semantic layer via MCP.
4
+
5
+ ## Overview
6
+
7
+ After deploying models with `bon deploy`, AI agents (Claude, Cursor, etc.) can query your semantic layer through the Model Context Protocol (MCP). Bonnard's MCP server provides tools for querying cubes and views using natural language.
8
+
9
+ ## MCP URL
10
+
11
+ ```
12
+ https://mcp.bonnard.dev/mcp
13
+ ```
14
+
15
+ ## Setup
16
+
17
+ ### Claude Desktop
18
+
19
+ Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
20
+
21
+ ```json
22
+ {
23
+ "mcpServers": {
24
+ "bonnard": {
25
+ "url": "https://mcp.bonnard.dev/mcp"
26
+ }
27
+ }
28
+ }
29
+ ```
30
+
31
+ ### Cursor
32
+
33
+ Add to `.cursor/mcp.json` in your project:
34
+
35
+ ```json
36
+ {
37
+ "mcpServers": {
38
+ "bonnard": {
39
+ "url": "https://mcp.bonnard.dev/mcp"
40
+ }
41
+ }
42
+ }
43
+ ```
44
+
45
+ ### Claude Code
46
+
47
+ Add to `.mcp.json` in your project:
48
+
49
+ ```json
50
+ {
51
+ "mcpServers": {
52
+ "bonnard": {
53
+ "type": "url",
54
+ "url": "https://mcp.bonnard.dev/mcp"
55
+ }
56
+ }
57
+ }
58
+ ```
59
+
60
+ ## Authentication
61
+
62
+ MCP uses OAuth 2.0 with PKCE. When an agent first connects:
63
+
64
+ 1. Agent discovers OAuth endpoints via `/.well-known/oauth-authorization-server`
65
+ 2. Agent registers as an OAuth client
66
+ 3. User is redirected to Bonnard to sign in and authorize
67
+ 4. Agent receives an access token (valid for 7 days)
68
+ 5. Token persists across server restarts
69
+
70
+ No API keys or manual token management needed.
71
+
72
+ ## Testing
73
+
74
+ ```bash
75
+ # Verify the MCP server is reachable
76
+ bon mcp test
77
+
78
+ # View connection info and config snippets
79
+ bon mcp
80
+ ```
81
+
82
+ ## Available Tools
83
+
84
+ Once connected, AI agents can use these MCP tools:
85
+
86
+ | Tool | Description |
87
+ |------|-------------|
88
+ | `query` | Execute a Cube query (measures, dimensions, filters) |
89
+ | `sql_query` | Execute a SQL query via Cube SQL API |
90
+ | `list_cubes` | List available cubes and their members |
91
+ | `list_views` | List available views and their members |
92
+
93
+ ## Managing Connections
94
+
95
+ Active MCP connections can be viewed and revoked in the Bonnard dashboard at **Settings > Connections**.
96
+
97
+ ## See Also
98
+
99
+ - workflow.deploy
100
+ - workflow.query
@@ -15,7 +15,7 @@ bon init
15
15
  # 2. Add a data source
16
16
  bon datasource add
17
17
 
18
- # 3. Create models in models/ and views in views/
18
+ # 3. Create models in bonnard/models/ and views in bonnard/views/
19
19
 
20
20
  # 4. Validate your models
21
21
  bon validate
@@ -31,10 +31,11 @@ After `bon init`, your project has:
31
31
  ```
32
32
  my-project/
33
33
  ├── bon.yaml # Project configuration
34
- ├── models/ # Cube definitions
35
- └── orders.yaml
36
- ├── views/ # View definitions
37
- │ └── orders_overview.yaml
34
+ ├── bonnard/ # Semantic layer definitions
35
+ ├── models/ # Cube definitions
36
+ │ │ └── orders.yaml
37
+ │ └── views/ # View definitions
38
+ │ └── orders_overview.yaml
38
39
  └── .bon/ # Local config (gitignored)
39
40
  └── datasources.yaml # Data source credentials
40
41
  ```
@@ -46,7 +47,7 @@ my-project/
46
47
  Create cubes that map to your database tables:
47
48
 
48
49
  ```yaml
49
- # models/orders.yaml
50
+ # bonnard/models/orders.yaml
50
51
  cubes:
51
52
  - name: orders
52
53
  sql_table: public.orders
@@ -66,7 +67,7 @@ cubes:
66
67
  Create views that expose cubes to consumers:
67
68
 
68
69
  ```yaml
69
- # views/orders_overview.yaml
70
+ # bonnard/views/orders_overview.yaml
70
71
  views:
71
72
  - name: orders_overview
72
73
  cubes:
@@ -98,7 +99,7 @@ bon deploy
98
99
  ### One Cube Per File
99
100
 
100
101
  ```
101
- models/
102
+ bonnard/models/
102
103
  ├── orders.yaml
103
104
  ├── users.yaml
104
105
  ├── products.yaml
@@ -108,7 +109,7 @@ models/
108
109
  ### Related Cubes Together
109
110
 
110
111
  ```
111
- models/
112
+ bonnard/models/
112
113
  ├── sales/
113
114
  │ ├── orders.yaml
114
115
  │ └── line_items.yaml
@@ -145,7 +146,3 @@ models/
145
146
  - workflow.deploy
146
147
  - cubes
147
148
  - views
148
-
149
- ## More Information
150
-
151
- https://docs.bonnard.dev/workflow
@@ -196,8 +196,3 @@ bon cube query '{
196
196
  - [cubes.measures](cubes.measures) - Define measures
197
197
  - [cubes.dimensions](cubes.dimensions) - Define dimensions
198
198
  - [views](views) - Create focused query interfaces
199
-
200
- ## More Information
201
-
202
- - [Cube REST API Query Format](https://cube.dev/docs/product/apis-integrations/rest-api/query-format)
203
- - [Cube SQL API Query Format](https://cube.dev/docs/product/apis-integrations/sql-api/query-format)
@@ -48,9 +48,9 @@ bon validate --test-connection
48
48
 
49
49
  ```
50
50
  ✓ Validating YAML syntax...
51
- ✓ Checking models/orders.yaml
52
- ✓ Checking models/users.yaml
53
- ✓ Checking views/orders_overview.yaml
51
+ ✓ Checking bonnard/models/orders.yaml
52
+ ✓ Checking bonnard/models/users.yaml
53
+ ✓ Checking bonnard/views/orders_overview.yaml
54
54
 
55
55
  All models valid.
56
56
  ```
@@ -60,7 +60,7 @@ All models valid.
60
60
  ```
61
61
  ✗ Validating YAML syntax...
62
62
 
63
- models/orders.yaml:15:5
63
+ bonnard/models/orders.yaml:15:5
64
64
  error: Unknown measure type "counts"
65
65
 
66
66
  Did you mean "count"?
@@ -150,7 +150,3 @@ measures:
150
150
  - workflow
151
151
  - workflow.deploy
152
152
  - syntax
153
-
154
- ## More Information
155
-
156
- https://docs.bonnard.dev/cli/validate
@@ -49,8 +49,8 @@ views:
49
49
 
50
50
  ## Workflow
51
51
 
52
- 1. Define models in `models/*.yaml`
53
- 2. Define views in `views/*.yaml`
52
+ 1. Define models in `bonnard/models/*.yaml`
53
+ 2. Define views in `bonnard/views/*.yaml`
54
54
  3. Run `bon validate` to check syntax
55
55
  4. Run `bon deploy` to publish
56
56
 
@@ -43,7 +43,7 @@ views:
43
43
 
44
44
  ## Workflow
45
45
 
46
- 1. Define models in `models/*.yaml`
47
- 2. Define views in `views/*.yaml`
46
+ 1. Define models in `bonnard/models/*.yaml`
47
+ 2. Define views in `bonnard/views/*.yaml`
48
48
  3. Run `bon validate` to check syntax
49
49
  4. Run `bon deploy` to publish
@@ -29,11 +29,12 @@ Data Warehouse (Snowflake, Postgres, BigQuery, Databricks)
29
29
  ```
30
30
  my-project/
31
31
  ├── bon.yaml # Project config
32
- ├── models/ # Cube definitions
33
- │ ├── orders.yaml
34
- └── customers.yaml
35
- ├── views/ # View definitions
36
- │ └── sales_overview.yaml
32
+ ├── bonnard/ # Semantic layer definitions
33
+ │ ├── models/ # Cube definitions
34
+ │ ├── orders.yaml
35
+ │ │ └── customers.yaml
36
+ │ └── views/ # View definitions
37
+ │ └── sales_overview.yaml
37
38
  └── .bon/ # Local state (gitignored)
38
39
  └── datasources.yaml # Warehouse connections
39
40
  ```
@@ -72,8 +73,8 @@ Topics follow dot notation (e.g., `cubes.dimensions.time`). Use `--recursive` to
72
73
  ## Workflow
73
74
 
74
75
  1. **Setup datasource** — `bon datasource add --from-dbt` or manual
75
- 2. **Create cubes** — Define measures/dimensions in `models/*.yaml`
76
- 3. **Create views** — Compose cubes in `views/*.yaml`
76
+ 2. **Create cubes** — Define measures/dimensions in `bonnard/models/*.yaml`
77
+ 3. **Create views** — Compose cubes in `bonnard/views/*.yaml`
77
78
  4. **Validate** — `bon validate --test-connection`
78
79
  5. **Deploy** — `bon login` then `bon deploy`
79
80