pbi-cli

by MinaSaad1Verified

Power BI CLI - semantic models (.NET TOM) and PBIR reports for token-efficient AI agent usage, built for Claude Code

448
Stars
112
Forks
Python
Language
8/23/2026
Added
View on GitHubDownload ZIP

⚠️ Third-Party Software Notice

This skill is third-party open-source software developed and hosted independently on GitHub. SkillTip is an informational directory and does not control or maintain the underlying repository. Any security checks displayed are automated and limited in scope. Review the source code before installing.

Read the Terms of Service

Installation

Add to your Claude Code skills directory:

# Add to your Claude Code skills
git clone https://github.com/MinaSaad1/pbi-cli

Getting Started

Guides for using skills like pbi-cli.

Security Report

Verified

Last scanned: —

{
  "status": "PASSED",
  "issues": []
}

README.md

pbi-cli

Give Claude Code the Power BI skills it needs.
Install once, then just ask Claude to work with your semantic models and reports.

Python CI License LinkedIn Website

Why pbi-cliGet StartedModelingReportingSkillsAll CommandsContributing


Why pbi-cli?

Why pbi-cli

Dual-Layer Architecture

pbi-cli at a Glance

pbi-cli cumulative downloads from PyPI

Cumulative downloads, refreshed daily from pypistats.org via GitHub Actions.


Get Started

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.

Alternative: give Claude the repo URL
Install and set up pbi-cli from https://github.com/MinaSaad1/pbi-cli.git

Claude will clone, install, connect, and set up skills automatically.

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

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.


Semantic Model Layer

Ask Claude to work with your Power BI semantic model. Requires pbi connect.

Just Ask Claude

Create measures in bulk

Bulk operations

Debug broken DAX

DAX debugging

Snapshot and restore your model

Backup and restore

Audit your model for issues

Model health check

Test row-level security

RLS testing


Report Layer

Ask Claude to build and manage your Power BI reports. No connection needed -- works directly on PBIR files.

Ask Claude to build reports

Build a report in 6 steps

Report workflow

Visuals, pages, themes, filters

Report layer capabilities

32 visual types

32 Visual Types


Architecture

Architecture

Two layers, one CLI:

  • Semantic Model layer -- Direct in-process .NET interop from Python to Power BI Desktop via TOM/ADOMD. No MCP server, no external binaries, sub-second execution.
  • Report layer -- Reads and writes PBIR (Enhanced Report Format) JSON files directly. No connection needed. Works with .pbip projects.

Desktop Auto-Sync

Desktop Auto-Sync

Configuration details

All config lives in ~/.pbi-cli/:

~/.pbi-cli/
  config.json          # Default connection preference
  connections.json     # Named connections
  repl_history         # REPL command history

Bundled DLLs ship inside the Python package (pbi_cli/dlls/).


Skills

After running pbi-cli skills install, Claude Code discovers 13 Power BI skills. Each skill teaches Claude a different area. You don't need to memorize commands.

12 Skills

Semantic Model Skills (require pbi connect)

SkillWhat you sayWhat Claude does
DAX"What are the top 10 products by revenue?"Writes and executes DAX queries, validates syntax
Modeling"Create a star schema with Sales and Calendar"Creates tables, relationships, measures, hierarchies
Deployment"Save a snapshot before I make changes"Exports/imports TMDL, manages transactions, diffs snapshots
Security"Set up RLS for regional managers"Creates roles, filters, perspectives
Docs"Document everything in this model"Generates data dictionaries, measure inventories
Partitions"Show me the M query for the Sales table"Manages partitions, expressions, calendar config
Diagnostics"Why is this query so slow?"Traces queries, checks model health, benchmarks

Report Layer Skills (no connection needed)

SkillWhat you sayWhat Claude does
Report"Create a new report project for Sales"Scaffolds PBIR reports, validates structure, previews layout
Visuals"Add a bar chart showing revenue by region"Adds, binds, updates, bulk-manages 32 visual types
Pages"Add an Executive Overview page"Manages pages, bookmarks, visibility, drillthrough
Themes"Apply our corporate brand colours"Applies themes, conditional formatting, colour scales
Filters"Show only the top 10 products"Adds page/visual filters (TopN, date, categorical)
Custom Visuals"Build a radial gauge Power BI doesn't have"Scaffolds a TypeScript visual project, iterates on tsc --noEmit, packages .pbiviz, imports into the report

Custom Visual Authoring

The Custom Visuals skill turns vibe-coding into the Power BI Visuals SDK loop. Claude scaffolds a sibling TypeScript project with npx pbiviz new, iterates against the Power BI Visuals API with tsc --noEmit between every change, packages a .pbiviz, and embeds it into your report:

# After installing the skill, just describe what you want in Claude Code:
#   "Build me a radial gauge that highlights values above target"
#
# Under the hood, the skill drives:
npx --yes powerbi-visuals-tools@^5.6.0 new mygaugevisual
# (Claude edits src/visual.ts + capabilities.json, runs tsc --noEmit until clean)
npx --yes powerbi-visuals-tools@^5.6.0 package
pbi visual import-custom dist/mygaugevisual.1.0.5.pbiviz --replace

The skill auto-installs Node and pbiviz on first run (with your consent), pins the SDK to a known-good version, keeps the TypeScript project as a sibling to your .pbip (no PBIR contamination), and operates under a curated npm allowlist for common deps (D3, Lodash, date-fns) -- anything off-list requires explicit approval.

Three new pbi-cli commands support the loop:

CommandWhat it does
pbi visual import-custom <pbiviz>Embed a locally-built .pbiviz into the report's RegisteredResources/ and register it in report.json. --replace overwrites by GUID.
pbi visual list-customList embedded and public (AppSource) custom visuals, distinguished by kind.
pbi visual remove-custom <guid-or-name>Deregister and physically delete the .pbiviz resource.

All Commands

27 command groups covering both the semantic model and the report layer. Every command below is a pbi subcommand, except where the pbi-cli prefix is shown.

CategoryCommands
Queriesdax execute, dax validate, dax clear-cache
Modeltable, column, measure, relationship, hierarchy, calc-group
Deploydatabase export-tmdl, database import-tmdl, database export-tmsl, database diff-tmdl, transaction
Securitysecurity-role, perspective
Connectconnect, disconnect, connections list, connections last
Datapartition, expression, calendar, advanced culture
Diagnosticstrace start/stop/fetch/export, model stats
Reportreport create, report info, report validate, report preview, report reload
Pagesreport add-page, report delete-page, report get-page, report set-background, report set-visibility
Visualsvisual add/get/list/update/delete, visual bind, visual bulk-bind/bulk-update/bulk-delete, visual where
Filtersfilters list, filters add-categorical/add-topn/add-relative-date, filters remove/clear
Formattingformat get/clear, format background-gradient/background-conditional/background-measure
Bookmarksbookmarks list/get/add/delete/set-visibility
Toolssetup, repl
Setuppbi-cli skills install/list/uninstall (on the pbi-cli command, not pbi)

Use --json for machine-readable output (for scripts and AI agents):

pbi --json measure list
pbi --json dax execute "EVALUATE Sales"
pbi --json visual list --page overview

Run pbi <command> --help for full options.


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 showing your active connection.


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) 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.

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes with tests
  4. Open a pull request

GitHub PyPI

MIT License — bundled Microsoft DLLs are licensed separately, see THIRD_PARTY_LICENSES.md


About

pbi-cli is built and maintained by Mina Saad. It started as a fix for the slowest part of my own job: authoring a measure meant a dialog, a refresh, and a visual check, every time.

If your team has the same problem one layer up, that is the work I do.

I work out what is actually costing a business, then build whatever fixes it: an AI agent, an automation, or a full application. Handed over so your team owns it.

Book a call · mina-saad.com

Frequently Asked Questions

What is pbi-cli?

pbi-cli is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by MinaSaad1. Power BI CLI - semantic models (.NET TOM) and PBIR reports for token-efficient AI agent usage, built for Claude Code. It has 448 GitHub stars.

Is pbi-cli safe to use?

Yes. pbi-cli passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install pbi-cli?

Clone the repository with "git clone https://github.com/MinaSaad1/pbi-cli" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is pbi-cli written in?

pbi-cli is primarily written in Python. It is open-source under MinaSaad1 on GitHub, so you can review or fork the full source.

Are there alternatives to pbi-cli?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh pbi-cli against similar tools.

Comments (0)

No comments yet. Be the first to share your thoughts!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI Agents
View details

Developers Also Liked

Based on votes and bookmarks from developers who liked this skill

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP Serversapisai-tools
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details