Give Claude Code the Power BI skills it needs. Install once, then just ask Claude to work with your semantic models and reports.
Get Started • Skills • All Commands • REPL Mode • Contributing
What is this?
pbi-cli gives Claude Code (and other AI agents) the ability to manage Power BI semantic models and reports. It ships with 12 skills that Claude discovers automatically. You ask in plain English, Claude uses the right pbi commands.
You Claude Code pbi-cli Power BI
"Add a YTD measure ---> Uses Power BI ---> CLI commands ---> Desktop
to the Sales table" skills (12)
Two layers, one CLI:
- Semantic Model -- Direct .NET interop to Power BI Desktop (measures, tables, DAX, security)
- Report Layer -- Reads/writes PBIR JSON files directly (visuals, pages, themes, filters)
Get Started
Fastest way: Just give Claude the repo URL and let it handle everything:
Install and set up pbi-cli from https://github.com/MinaSaad1/pbi-cli.git
Or install manually (two commands):
pipx install pbi-cli-tool # 1. Install (handles PATH automatically)
pbi-cli skills install # 2. Register Claude Code skills (one-time setup)
pbi connect # 3. Connect to Power BI Desktop
Open Power BI Desktop with a .pbix file, run the three commands above, and start asking Claude.
Requires: Windows with Python 3.10+ and Power BI Desktop running.
Using pip instead of pipx?
pip install pbi-cli-tool
On Windows, pip install often places the pbi command in a directory that isn't on your PATH.
Fix: Add the Scripts directory to PATH
Find the directory:
python -c "import site; print(site.getusersitepackages().replace('site-packages','Scripts'))"
Add the printed path to your system PATH, then restart your terminal. We recommend pipx to avoid this entirely.
Skills
After running pbi-cli skills install, Claude Code discovers 12 Power BI skills. Each skill teaches Claude a different area. You don't need to memorize commands.
Semantic Model (require pbi connect)
| Skill | What you say | What Claude does |
|---|---|---|
| DAX | "Top 10 products by revenue?" | Writes and executes DAX queries |
| Modeling | "Create a star schema" | Creates tables, relationships, measures |
| Deployment | "Save a snapshot" | Exports/imports TMDL, diffs snapshots |
| Security | "Set up RLS" | Creates roles, filters, perspectives |
| Docs | "Document this model" | Generates data dictionaries |
| Partitions | "Show the M query" | Manages partitions, expressions |
| Diagnostics | "Why is this slow?" | Traces queries, benchmarks |
Report Layer (no connection needed)
| Skill | What you say | What Claude does |
|---|---|---|
| Report | "Create a new report" | Scaffolds PBIR reports, validates, previews |
| Visuals | "Add a bar chart" | Adds, binds, bulk-manages 32 visual types |
| Pages | "Add a new page" | Manages pages, bookmarks, drillthrough |
| Themes | "Apply brand colours" | Themes, conditional formatting |
| Filters | "Show top 10 only" | TopN, date, categorical filters |
All Commands
27 command groups covering both the semantic model and the report layer.
| Category | Commands |
|---|---|
| Queries | dax execute, dax validate, dax clear-cache |
| Model | table, column, measure, relationship, hierarchy, calc-group |
| Deploy | database export-tmdl/import-tmdl/export-tmsl/diff-tmdl, transaction |
| Security | security-role, perspective |
| Connect | connect, disconnect, connections list/last |
| Data | partition, expression, calendar, advanced culture |
| Diagnostics | trace start/stop/fetch/export, model stats |
| Report | report create/info/validate/preview/reload, report add-page/delete-page/get-page |
| Visuals | visual add/get/list/update/delete/bind, visual bulk-bind/bulk-update/bulk-delete |
| Filters | filters list/add-categorical/add-topn/add-relative-date/remove/clear |
| Formatting | format get/clear/background-gradient/background-conditional/background-measure |
| Bookmarks | bookmarks list/get/add/delete/set-visibility |
| Tools | setup, repl |
| Setup | pbi-cli skills install/list/uninstall (on the pbi-cli command, not pbi) |
Use --json for machine-readable output:
pbi --json measure list
pbi --json visual list --page overview
32 Supported Visual Types
Charts: bar, line, column, area, ribbon, waterfall, stacked bar, clustered bar, clustered column, scatter, funnel, combo, donut/pie, treemap
Cards/KPIs: card, cardVisual (modern), cardNew, multi-row card, KPI, gauge
Tables: table, matrix • Slicers: slicer, text, list, advanced • Maps: Azure Map
Decorative: action button, image, shape, textbox, page navigator
REPL Mode
For interactive work, the REPL keeps a persistent connection:
$ pbi repl
pbi> connect --data-source localhost:54321
Connected: localhost-54321
pbi(localhost-54321)> measure list
pbi(localhost-54321)> dax execute "EVALUATE TOPN(5, Sales)"
pbi(localhost-54321)> exit
Tab completion, command history, and a dynamic prompt.
Development
git clone https://github.com/MinaSaad1/pbi-cli.git
cd pbi-cli
pip install -e ".[dev]"
ruff check src/ tests/ # Lint
mypy src/ # Type check
pytest -m "not e2e" # Run tests (488 tests)
Bundled third-party software
pbi-cli-tool ships with Microsoft Analysis Services client library
assemblies (Microsoft.AnalysisServices.*.dll) inside the PyPI wheel
under src/pbi_cli/dlls/. These binaries are not covered by
pbi-cli's MIT license. They are redistributed unmodified under the
Microsoft Software License Terms for Microsoft Analysis Management
Objects (AMO) and Microsoft Analysis Services - ADOMD.NET. Full terms
are in THIRD_PARTY_LICENSES.md
and the companion NOTICE
file. By installing pbi-cli-tool you agree to those terms in addition
to the MIT License that applies to the rest of the package.
Contributing
Contributions are welcome! Please open an issue first to discuss what you'd like to change.
- Fork the repository
- Create a feature branch
- Make your changes with tests
- Open a pull request
MIT License — bundled Microsoft DLLs are licensed separately, see THIRD_PARTY_LICENSES.md
Release files for pbi-cli-tool 3.12.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pbi_cli_tool-3.12.0.tar.gz | 3.2 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pbi_cli_tool-3.12.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.3 MB
Release files / pbi_cli_tool-3.12.0.tar.gz
| Download URL | pbi_cli_tool-3.12.0.tar.gz |
|---|---|
| Size | 3.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4996b43fd07fd279079434275c74bac96406c1a3062e4d14d7869723677fad3f
|
|
BLAKE2b-256 checksum How to use checksums |
65542f7ee1bb5987d27e3e09b2283f7ee52542f9f8cecf7ba7470bd251f9f8cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.
Transparency logRelease files / pbi_cli_tool-3.12.0-py3-none-any.whl
| Download URL | pbi_cli_tool-3.12.0-py3-none-any.whl |
|---|---|
| Size | 3.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c60afe8eee23018726f16a53631430ee65db17d2cf0ee7d2a21871102cd152c6
|
|
BLAKE2b-256 checksum How to use checksums |
4881737299a9fb921b857f278aed739e8946846db92279d5b39be3c656d3be3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.
Transparency log