pbi-cli

A CLI and 13 skills for Claude Code: the Power BI data model, DAX measures, row-level security and PBIR report pages straight from chat

  • 475 ★ on the repository
  • Last commit
  • MIT
CLI

Broad access

Why this level

  • Commands create, change and delete tables, measures, security roles and report pages in your model
  • The utility runs DAX queries and connects to the data of the open Power BI Desktop model
  • The custom visuals skill runs npm and builds a TypeScript project on your machine
All reasons and checks

minasaad1/pbi-cli

Install

Works in

In your terminal, with SkillFoxx CLI

npx skillfoxx add cli/pbi-cli

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Broad accessThe tool can change data, run commands or handle secrets.

  • Commands create, change and delete tables, measures, security roles and report pages in your model
  • The utility runs DAX queries and connects to the data of the open Power BI Desktop model
  • The custom visuals skill runs npm and builds a TypeScript project on your machine

This is third-party code. Review the repository files before installing.

What it does

pbi-cli is a console utility for Power BI built for AI agents, plus a set of 13 skills for Claude Code. It works in two layers. The semantic model layer connects to an open Power BI Desktop directly through .NET (TOM and ADOMD) with no separate MCP server: the agent creates tables, relationships, measures and hierarchies, runs and validates DAX queries, edits security roles and perspectives, and exports and diffs model snapshots in TMDL. The report layer reads and writes PBIR (the enhanced report format) files with no connection to Power BI Desktop, so it works on `.pbip` projects. Through it the agent creates a report, pages and bookmarks, adds and binds visuals (32 types are supported), sets TopN, date and categorical filters, and applies themes and conditional formatting. A separate skill builds custom visuals in TypeScript and packages them as `.pbiviz`. Commands have a `--json` mode for scripts and agents. They fall into 27 groups: queries, model, deployment, security, diagnostics (tracing, model statistics), pages, filters, formatting and bookmarks.

Who it is for. For analysts and BI developers on Windows who build Power BI models and reports and want Claude Code to handle the routine.

Good fit when

  • You need dozens of measures created or migrated in bulk, done by the agent in one operation instead of manual entry
  • A DAX measure errors out or returns wrong numbers and needs debugging
  • Before large edits you want a TMDL snapshot of the model and a way to roll back
  • Row-level security roles must be created and tested for regional managers
  • A report from scratch: pages, visuals, filters and a theme assembled through chat requests

Not a fit when

  • You work on macOS or Linux: the model layer needs Windows and a running Power BI Desktop
  • You need an MCP server: Microsoft has its own Power BI model authoring server
  • You want manual visual editing with a mouse: the utility is built around commands and PBIR files
  • The model lives only in the Power BI service with no Desktop and no `.pbip` project: the report layer needs PBIR files

Example request

Create a star schema with Sales and Calendar tables and add revenue and margin measures

Limitations

The model layer needs Windows, Python 3.10 or newer and a running Power BI Desktop with a `.pbix` file open. The utility installs through pipx or pip, and afterwards the `pbi-cli skills install` command is required to register the skills in Claude Code. With pip the `pbi` command often lands outside PATH, and the README suggests pipx or adding the Scripts directory to PATH. The report layer works only with the PBIR format and `.pbip` projects. On first run the custom visuals skill installs Node.js and `pbiviz` with your consent and uses a pinned SDK version, and any npm packages outside the allowed list need separate approval.

How to disable. Run `pbi-cli skills uninstall` to remove the skills from Claude Code, then `pipx uninstall pbi-cli-tool`. Configuration lives in `~/.pbi-cli/`.

FAQ

How do I install pbi-cli for Claude Code?

Run three commands: `pipx install pbi-cli-tool`, then `pbi-cli skills install` (registers the skills in Claude Code) and `pbi connect` to attach to Power BI Desktop. You can also give Claude the repository link and it will clone, install and connect on its own.

Do I need an MCP server?

No. The model layer calls .NET from Python directly into Power BI Desktop (TOM and ADOMD), with no MCP server or external binaries, and commands run in under a second. The report layer reads and writes PBIR files directly.

Which skills get installed?

Thirteen. For the model: DAX, modeling, deployment, security, docs, partitions and diagnostics. For the report: report, visuals, pages, themes, filters and custom visuals. The first seven work after `pbi connect`, the rest without a connection.

How do I roll back bad model edits?

Save a snapshot with `database export-tmdl` before changes and return with `database import-tmdl`. `database diff-tmdl` compares two snapshots, and the `transaction` group bundles edits into one transaction.

Can I test row-level security?

Yes. The security skill creates roles, filters and perspectives (the `security-role` group and the `perspective` command), and the README includes an example of testing the rules for regional managers.

Discussion

No questions or reviews yet.

CLI tools

A plugin marketplace for Claude Code and GitHub Copilot on Power BI and Microsoft Fabric: semantic models, DAX, TMDL, reports

PluginBroad access1.1KRepository stars
Official

A local Microsoft MCP server for Power BI semantic models: an agent creates tables, DAX measures and relationships in Desktop, Fabric and PBIP files

MCP serverBroad access1.2KRepository stars

A data visualization skill for agents: turns data into polished interactive HTML charts and full reports with one visual language

SkillMinimal access6.4KRepository stars

MCP server and CLI to drive real Microsoft Excel: Power Query, DAX, VBA, PivotTables and charts

MCP serverBroad access831Repository stars
Needs a VPN

Databricks Field Engineering's agent kit: an installer for Databricks skills, an MCP server and a visual Builder App

PluginBroad access2KRepository stars
Official

A lightweight database workspace with an MCP server: the agent reads the schema, runs queries and explores data in PostgreSQL, MySQL and more

MCP serverBroad access5KRepository stars

Comparison with similar tools

Entries that share the main search query, and how they differ.

EntryOfficialAuthenticationRepository starsMain difference
pbi-cli (this entry)no475
Power BI Authoring MCP ServeryesOAuth1,240Microsoft's official local MCP server for Power BI models, without a report layer or skills
power-bi-agentic-developmentno1,062a plugin marketplace for Power BI and Fabric for Claude Code and Copilot, while this is one utility with its own set of skills

README in short

The README opens with the slogan to give Claude Code the Power BI skills it needs and a short three-command start with requirements. It then shows the two layers, sample requests for the model (bulk measure creation, DAX debugging, snapshots and rollback, model audit, security testing) and for the report (a six-step build, 32 visual types), an architecture diagram and auto-sync with Desktop. Tables of the 13 skills follow, a section on custom visuals and a reference of 27 command groups.

README badge

Report a problem

Foxx AIpbi-cli
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.