pbi-enterprise-cli 0.1.0.dev2__tar.gz → 4.0.0__tar.gz

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 (76) hide show
  1. pbi_enterprise_cli-4.0.0/PKG-INFO +382 -0
  2. pbi_enterprise_cli-4.0.0/README.md +343 -0
  3. pbi_enterprise_cli-4.0.0/pyproject.toml +70 -0
  4. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/__init__.py +1 -1
  5. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/backends/xmla_backend.py +4 -5
  6. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/cli.py +4 -0
  7. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/commands/_doctor.py +3 -4
  8. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/commands/deploy.py +2 -2
  9. pbi_enterprise_cli-4.0.0/src/pbi_cli/commands/env_cmd.py +146 -0
  10. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/commands/govern.py +50 -16
  11. pbi_enterprise_cli-4.0.0/src/pbi_cli/commands/server_cmd.py +74 -0
  12. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/commands/skills_cmd.py +102 -0
  13. pbi_enterprise_cli-4.0.0/src/pbi_cli/commands/snapshot.py +166 -0
  14. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/commands/source.py +3 -5
  15. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/commands/visual.py +2 -2
  16. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/intelligence/measure_generator.py +1 -1
  17. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/server/api.py +35 -16
  18. pbi_enterprise_cli-4.0.0/src/pbi_cli/server/auth.py +26 -0
  19. pbi_enterprise_cli-4.0.0/src/pbi_enterprise_cli.egg-info/PKG-INFO +382 -0
  20. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_enterprise_cli.egg-info/SOURCES.txt +3 -1
  21. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_enterprise_cli.egg-info/requires.txt +10 -10
  22. pbi_enterprise_cli-0.1.0.dev2/PKG-INFO +0 -102
  23. pbi_enterprise_cli-0.1.0.dev2/README.md +0 -326
  24. pbi_enterprise_cli-0.1.0.dev2/README.pypi.md +0 -46
  25. pbi_enterprise_cli-0.1.0.dev2/pyproject.toml +0 -84
  26. pbi_enterprise_cli-0.1.0.dev2/src/pbi_cli/commands/server_cmd.py +0 -30
  27. pbi_enterprise_cli-0.1.0.dev2/src/pbi_enterprise_cli.egg-info/PKG-INFO +0 -102
  28. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/LICENSE +0 -0
  29. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/setup.cfg +0 -0
  30. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/_audit.py +0 -0
  31. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/_snapshot.py +0 -0
  32. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/backends/__init__.py +0 -0
  33. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/backends/mock_backend.py +0 -0
  34. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/backends/pbir_backend.py +0 -0
  35. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/backends/protocol.py +0 -0
  36. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/backends/tom_backend.py +0 -0
  37. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/commands/__init__.py +0 -0
  38. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/commands/_shared.py +0 -0
  39. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/commands/calendar_cmd.py +0 -0
  40. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/commands/connections.py +0 -0
  41. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/commands/custom_visual.py +0 -0
  42. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/commands/database.py +0 -0
  43. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/commands/dax.py +0 -0
  44. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/commands/docs.py +0 -0
  45. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/commands/filter_cmd.py +0 -0
  46. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/commands/layout.py +0 -0
  47. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/commands/measure.py +0 -0
  48. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/commands/model.py +0 -0
  49. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/commands/partition.py +0 -0
  50. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/commands/repl.py +0 -0
  51. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/commands/report.py +0 -0
  52. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/commands/security.py +0 -0
  53. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/commands/theme.py +0 -0
  54. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/commands/trace.py +0 -0
  55. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/commands/watch.py +0 -0
  56. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/docs_gen/__init__.py +0 -0
  57. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/docs_gen/confluence.py +0 -0
  58. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/docs_gen/markdown.py +0 -0
  59. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/governance/__init__.py +0 -0
  60. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/governance/bpa.py +0 -0
  61. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/governance/engine.py +0 -0
  62. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/governance/rules/__init__.py +0 -0
  63. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/governance/rules/measure_brackets.py +0 -0
  64. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/governance/rules/measure_description.py +0 -0
  65. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/governance/rules/measure_format.py +0 -0
  66. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/governance/rules/measure_naming.py +0 -0
  67. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/governance/rules/table_pascal_case.py +0 -0
  68. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/intelligence/__init__.py +0 -0
  69. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/intelligence/layout_engine.py +0 -0
  70. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/intelligence/theme_generator.py +0 -0
  71. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/intelligence/visual_builder.py +0 -0
  72. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/intelligence/visual_recommender.py +0 -0
  73. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_cli/server/__init__.py +0 -0
  74. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_enterprise_cli.egg-info/dependency_links.txt +0 -0
  75. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_enterprise_cli.egg-info/entry_points.txt +0 -0
  76. {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.0}/src/pbi_enterprise_cli.egg-info/top_level.txt +0 -0
@@ -0,0 +1,382 @@
1
+ Metadata-Version: 2.4
2
+ Name: pbi-enterprise-cli
3
+ Version: 4.0.0
4
+ Summary: Power BI one-stop-shop platform — CLI for AI-driven Power BI development
5
+ License: MIT AND LicenseRef-Microsoft-AS-Client-Libraries
6
+ Keywords: power-bi,cli,dax,tmdl,pbir
7
+ Requires-Python: >=3.10
8
+ Description-Content-Type: text/markdown
9
+ License-File: LICENSE
10
+ Requires-Dist: click>=8.1
11
+ Requires-Dist: rich>=13.0
12
+ Requires-Dist: pythonnet>=3.0
13
+ Requires-Dist: pydantic>=2.0
14
+ Requires-Dist: python-dotenv>=1.0
15
+ Provides-Extra: ai
16
+ Requires-Dist: anthropic>=0.105.2; extra == "ai"
17
+ Provides-Extra: viz
18
+ Requires-Dist: Pillow>=10.0; extra == "viz"
19
+ Requires-Dist: wcag-contrast-ratio>=0.9; extra == "viz"
20
+ Requires-Dist: playwright>=1.44; extra == "viz"
21
+ Provides-Extra: xmla
22
+ Requires-Dist: msal>=1.28; extra == "xmla"
23
+ Provides-Extra: server
24
+ Requires-Dist: fastapi>=0.136.3; extra == "server"
25
+ Requires-Dist: uvicorn>=0.48.0; extra == "server"
26
+ Provides-Extra: sources
27
+ Requires-Dist: sqlalchemy>=2.0; extra == "sources"
28
+ Requires-Dist: openpyxl>=3.1.5; extra == "sources"
29
+ Requires-Dist: httpx>=0.27; extra == "sources"
30
+ Provides-Extra: dev
31
+ Requires-Dist: pytest>=9.0.3; extra == "dev"
32
+ Requires-Dist: pytest-cov>=7.1.0; extra == "dev"
33
+ Requires-Dist: ruff>=0.15.15; extra == "dev"
34
+ Requires-Dist: mypy>=2.1.0; extra == "dev"
35
+ Requires-Dist: pyyaml>=6.0; extra == "dev"
36
+ Provides-Extra: all
37
+ Requires-Dist: pbi-enterprise-cli[ai,dev,server,sources,viz,xmla]; extra == "all"
38
+ Dynamic: license-file
39
+
40
+ # pbi-cli
41
+
42
+ > Full-stack Power BI automation from the command line — semantic model management, report authoring, governance enforcement, DAX testing, deployment pipelines, and 30 Claude Code skills.
43
+
44
+ ![Python](https://img.shields.io/badge/python-3.10%2B-blue)
45
+ ![License](https://img.shields.io/badge/license-MIT-green)
46
+ ![Tests](https://img.shields.io/badge/tests-575%20passing-brightgreen)
47
+ ![Coverage](https://img.shields.io/badge/coverage-71%25-yellow)
48
+ ![Version](https://img.shields.io/badge/version-4.0.0--dev-orange)
49
+
50
+ ---
51
+
52
+ ## What it does
53
+
54
+ `pbi-cli` gives you a single `pbi` command that covers every layer of Power BI development — no clicking through the Desktop UI, no manual file editing, no proprietary tooling dependencies.
55
+
56
+ | Area | Commands |
57
+ |---|---|
58
+ | **Semantic model** | `pbi model` — tables, columns, relationships, lint, lineage |
59
+ | **DAX measures** | `pbi measure` — add, update, delete, AI-generate |
60
+ | **DAX testing** | `pbi dax` — query, validate, YAML unit-test suites |
61
+ | **Source profiling** | `pbi source` — SQL, Excel, CSV, REST APIs → star-schema scaffold |
62
+ | **Report authoring** | `pbi report` — pages, bookmarks (PBIR GA format) |
63
+ | **Visuals** | `pbi visual` — 17 visual types, colour-scale & data-bar formatting |
64
+ | **Layout** | `pbi layout` — shelf-packing auto-layout, named templates |
65
+ | **Themes** | `pbi theme` — generate WCAG-compliant themes from a brand colour |
66
+ | **Filters** | `pbi filter` — relative-date, TopN, basic value filters |
67
+ | **Governance** | `pbi govern` — built-in rules + BPA + custom plugin system, `--fail-on` CI gate |
68
+ | **Security (RLS)** | `pbi security` — role add/delete/test |
69
+ | **Partitions** | `pbi partition` — add, refresh, delete |
70
+ | **Deployment** | `pbi deploy` — snapshot, diff, push via XMLA |
71
+ | **Snapshots** | `pbi snapshot` — create, list, restore, diff — model rollback |
72
+ | **Environments** | `pbi env` — named connections, use, diff, promote (dev→prod) |
73
+ | **TMDL** | `pbi database` — export / import TMDL snapshots |
74
+ | **Docs** | `pbi docs` — markdown/Confluence data dictionary, audit log |
75
+ | **Diagnostics** | `pbi doctor` — check pythonnet, optional deps, platform |
76
+ | **Watch mode** | `pbi watch` — re-run governance + DAX tests on file change |
77
+ | **REST API** | `pbi server` — authenticated FastAPI server for pipeline integration |
78
+ | **Skills** | `pbi skills` — install, list, check 30 Claude Code Power BI skills |
79
+
80
+ ---
81
+
82
+ ## Backends
83
+
84
+ The same CLI works against three backends — swap with `--backend`:
85
+
86
+ | Backend | When to use |
87
+ |---|---|
88
+ | `desktop` (default) | Local Power BI Desktop open with a `.pbip` project |
89
+ | `xmla` | Power BI Premium or Microsoft Fabric — no Desktop required |
90
+ | `mock` | CI pipelines, unit tests, demos — zero infrastructure |
91
+
92
+ ---
93
+
94
+ ## Installation
95
+
96
+ **Base install** (semantic model, governance, DAX, report authoring):
97
+ ```bash
98
+ pip install pbi-enterprise-cli
99
+ ```
100
+
101
+ **Optional feature groups:**
102
+ ```bash
103
+ pip install "pbi-enterprise-cli[ai]" # Claude AI measure generation
104
+ pip install "pbi-enterprise-cli[xmla]" # XMLA auth (MSAL)
105
+ pip install "pbi-enterprise-cli[sources]" # SQL / Excel / REST profiling
106
+ pip install "pbi-enterprise-cli[viz]" # WCAG theme validation, screenshots
107
+ pip install "pbi-enterprise-cli[server]" # Authenticated FastAPI REST server
108
+ pip install "pbi-enterprise-cli[all]" # Everything
109
+ ```
110
+
111
+ > **Requirements:** Python 3.10+. The `desktop` and `xmla` backends require Windows and the AMO .NET assemblies (installed with Power BI Desktop).
112
+
113
+ ---
114
+
115
+ ## Quick Start
116
+
117
+ ```bash
118
+ # Check your setup
119
+ pbi doctor
120
+
121
+ # Connect to open Power BI Desktop and inspect the model
122
+ pbi model tables
123
+ pbi model relationships
124
+ pbi measure list
125
+
126
+ # Run governance checks (exit code 3 on errors — CI safe)
127
+ pbi govern check --fail-on error
128
+
129
+ # Auto-fix safe violations (PascalCase, missing format strings, etc.)
130
+ pbi govern fix --auto
131
+
132
+ # Add a measure
133
+ pbi measure add \
134
+ --table Sales \
135
+ --name "Total Revenue" \
136
+ --expression "SUM(Sales[Revenue])" \
137
+ --format-string "#,0.00" \
138
+ --description "Net revenue after discounts"
139
+
140
+ # Run DAX unit tests
141
+ pbi dax test --suite tests/fixtures/measures/sales_suite.yaml
142
+
143
+ # Profile a SQL source and scaffold a star-schema model
144
+ pbi source profile --source "mssql://server/SalesDW" --output json
145
+ pbi source scaffold --source "mssql://server/SalesDW" \
146
+ --output ./MyModel.SemanticModel/definition/
147
+ ```
148
+
149
+ ---
150
+
151
+ ## Governance & CI/CD
152
+
153
+ Built-in rules + BPA (Best Practice Analyzer) run out of the box.
154
+ Drop a `.py` file in `~/.pbi-cli/rules/` to add organisation-specific rules.
155
+
156
+ ```bash
157
+ pbi govern rules # list all built-in + plugin rules
158
+ pbi govern check --fail-on error # exit 3 on violations — CI gate
159
+ pbi --json govern check # structured {summary, violations} JSON output
160
+ pbi govern fix --auto # auto-fix PascalCase, format strings, folders
161
+ ```
162
+
163
+ ### BPA Compatibility
164
+
165
+ ```bash
166
+ # Microsoft community rules (fetched live — same as Tabular Editor)
167
+ pbi govern bpa check
168
+
169
+ # Local rule set
170
+ pbi govern bpa check --file ./BPARules.json
171
+
172
+ # Filter by severity or category
173
+ pbi govern bpa check --severity error --category Performance
174
+ ```
175
+
176
+ ### GitHub Actions
177
+
178
+ Copy `.github/workflows/pbi-govern.yml` from this repo — it runs governance on every PR,
179
+ fails on errors, and posts a summary comment automatically.
180
+
181
+ ```yaml
182
+ # One-liner governance gate for your own repo:
183
+ - run: pbi --backend mock --json govern check --fail-on error
184
+ ```
185
+
186
+ See also `azure-pipelines-govern.yml` for Azure DevOps.
187
+
188
+ ---
189
+
190
+ ## Snapshots & Rollback
191
+
192
+ ```bash
193
+ # Save a snapshot before risky changes
194
+ pbi snapshot create --label before-refactor
195
+
196
+ # See all snapshots
197
+ pbi snapshot list
198
+
199
+ # Diff current model against a snapshot
200
+ pbi snapshot diff 20260530_142300_before-refactor
201
+
202
+ # Restore (requires --confirm)
203
+ pbi snapshot restore 20260530_142300_before-refactor --confirm
204
+ ```
205
+
206
+ ---
207
+
208
+ ## Multi-Environment Support
209
+
210
+ Named connections in `~/.pbi-cli/connections.json` — switch with one command:
211
+
212
+ ```bash
213
+ pbi connections add # interactive wizard
214
+ pbi env list # show all environments
215
+ pbi env use fabric-dev # set default
216
+ pbi env promote fabric-dev fabric-prod --confirm # deploy dev → prod
217
+ ```
218
+
219
+ See `docs/auth/xmla-auth.md` for service principal, managed identity, and interactive auth.
220
+
221
+ ---
222
+
223
+ ## Authenticated REST Server
224
+
225
+ ```bash
226
+ # Generate a key
227
+ export PBI_SERVER_KEY=$(pbi server generate-key)
228
+
229
+ # Start server (localhost-only by default)
230
+ pbi server start
231
+
232
+ # Call the API
233
+ curl -H "X-PBI-API-Key: $PBI_SERVER_KEY" http://localhost:7788/api/tables
234
+ ```
235
+
236
+ The server binds to `127.0.0.1` by default. Use `--host 0.0.0.0` only behind a firewall.
237
+ All endpoints require the `X-PBI-API-Key` header — no unauthenticated access.
238
+
239
+ ---
240
+
241
+ ## XMLA Backend
242
+
243
+ Connect to Power BI Premium or Fabric without Desktop:
244
+
245
+ ```bash
246
+ # Add a named connection
247
+ pbi connections add
248
+
249
+ # Use it
250
+ pbi --connection fabric-prod model tables
251
+ pbi --connection fabric-prod govern check --fail-on error
252
+ pbi --connection fabric-prod deploy push --workspace "Sales-PROD"
253
+ ```
254
+
255
+ Full auth guide: [docs/auth/xmla-auth.md](docs/auth/xmla-auth.md)
256
+
257
+ ---
258
+
259
+ ## Claude Code Skills (30 skills)
260
+
261
+ Install Power BI skills into Claude Code for AI-assisted development:
262
+
263
+ ```bash
264
+ # Install all 30 skills
265
+ pbi skills install --all
266
+
267
+ # Check compatibility with current CLI version
268
+ pbi skills check
269
+
270
+ # Install specific skills
271
+ pbi skills install power-bi-dax power-bi-governance
272
+ ```
273
+
274
+ **30 bundled skills:**
275
+
276
+ | Skill | Purpose |
277
+ |---|---|
278
+ | `power-bi-advisor` | Master orchestrator — routes any question to the right skill |
279
+ | `power-bi-dax` | DAX measures, time intelligence, VAR/RETURN patterns |
280
+ | `power-bi-modeling` | Star schema, relationships, dimensional design |
281
+ | `power-bi-power-query` | M language, ETL, REST API connectors, query folding |
282
+ | `power-bi-performance` | Query optimisation, VertiPaq, DAX Studio patterns |
283
+ | `power-bi-rls-security` | Dynamic RLS, hierarchy security, OLS |
284
+ | `power-bi-themes` | WCAG-compliant themes, brand palettes |
285
+ | `power-bi-layout` | Shelf-packing auto-layout, navigation patterns |
286
+ | `power-bi-report` | Report pages, bookmarks, drillthrough |
287
+ | `power-bi-visual-selection` | Which visual for which data question |
288
+ | `power-bi-visuals` | Visual add/configure, conditional formatting |
289
+ | `power-bi-governance` | Rules, auto-fix, custom plugins, BPA |
290
+ | `power-bi-deployment` | XMLA deploy, snapshot, diff, rollback |
291
+ | `power-bi-deployment-pipeline` | Git integration, CI/CD, Azure DevOps |
292
+ | `power-bi-fabric` | OneLake, Medallion, Direct Lake, RTI, KQL |
293
+ | `power-bi-copilot` | Copilot setup, Q&A synonyms, Smart Narratives, AI visuals |
294
+ | `power-bi-templates` | Starter templates: Sales, Finance, HR, Operations, Marketing |
295
+ | `power-bi-sources` | SQL/Fabric/REST profiling, star-schema scaffold |
296
+ | `power-bi-docs` | Data dictionary, measure catalog, ERDs |
297
+ | `power-bi-testing` | DAX unit tests, regression suites, CI integration |
298
+ | `power-bi-security` | RLS, OLS, workspace roles |
299
+ | `power-bi-partitions` | Partition strategy, incremental refresh |
300
+ | `power-bi-diagnostics` | Doctor, environment checks, troubleshooting |
301
+ | `power-bi-patterns` | End-to-end workflows, design patterns |
302
+ | `power-bi-pages` | Drillthrough, tooltip pages, mobile layout |
303
+ | `power-bi-filters` | Visual, page, and report-level filters |
304
+ | `power-bi-design-system` | Brand consistency, typography, colour systems |
305
+ | `power-bi-page-designer` | Full page design from business domain description |
306
+ | `power-bi-project-orchestrator` | End-to-end project orchestration |
307
+ | `power-bi-troubleshooter` | Guided troubleshooting workflows |
308
+
309
+ ---
310
+
311
+ ## Global Flags
312
+
313
+ | Flag | Purpose |
314
+ |---|---|
315
+ | `--backend desktop\|xmla\|mock` | Select backend (default: `desktop`) |
316
+ | `--dry-run` | Preview changes without applying them |
317
+ | `--json` | Machine-readable JSON output |
318
+ | `--connection <name>` | Use a named connection from `~/.pbi-cli/connections.json` |
319
+ | `--port 5000` | Desktop local server port |
320
+
321
+ ---
322
+
323
+ ## Exit Code Contract
324
+
325
+ | Code | Meaning |
326
+ |------|---------|
327
+ | 0 | Success |
328
+ | 1 | User error — bad args, missing flags |
329
+ | 2 | Connection error — Desktop not open, XMLA unreachable |
330
+ | 3 | Validation error — governance violation, schema error |
331
+ | 4 | Operation error — TOM write failed, partial completion |
332
+
333
+ See [STABILITY.md](STABILITY.md) for the full API stability policy.
334
+
335
+ ---
336
+
337
+ ## Environment Variables
338
+
339
+ | Variable | Purpose |
340
+ |---|---|
341
+ | `ANTHROPIC_API_KEY` | Claude AI for `pbi measure generate` |
342
+ | `PBI_SERVER_KEY` | API key for `pbi server start` (required) |
343
+ | `PBI_CLIENT_SECRET` | Service principal secret for XMLA connections |
344
+ | `PBI_REST_BEARER` | Default Bearer token for REST source profiling |
345
+
346
+ ---
347
+
348
+ ## Documentation
349
+
350
+ | Document | Contents |
351
+ |---|---|
352
+ | [docs/auth/xmla-auth.md](docs/auth/xmla-auth.md) | XMLA auth: service principal, managed identity, interactive |
353
+ | [docs/deployment.md](docs/deployment.md) | Snapshot format, diff algorithm, push safety, rollback |
354
+ | [docs/source-profiling.md](docs/source-profiling.md) | Source types, classification logic, scaffold output |
355
+ | [STABILITY.md](STABILITY.md) | Stable command surface, exit code contract, deprecation policy |
356
+ | [MAINTAINERS.md](MAINTAINERS.md) | Maintainer team, support SLAs, release process |
357
+ | [CONTRIBUTING.md](CONTRIBUTING.md) | Branch strategy, coding standards, PR guide |
358
+
359
+ ---
360
+
361
+ ## Development
362
+
363
+ ```bash
364
+ git clone https://github.com/mudassir09/pbi-enterprise-cli.git
365
+ cd pbi-enterprise-cli
366
+ pip install -e ".[all]"
367
+
368
+ # Run the full test suite (575 tests, ~7 s)
369
+ python -m pytest
370
+
371
+ # Lint
372
+ ruff check src/ tests/
373
+
374
+ # Type check
375
+ mypy src/
376
+ ```
377
+
378
+ ---
379
+
380
+ ## License
381
+
382
+ [MIT](LICENSE) — © 2026 Mudassir