# Pbir CLI

Should be used whenever the user mentions "pbir", "pbir-cli", "Power BI reports", or...

- Repository: https://github.com/data-goblin/power-bi-agentic-development (1079 stars)
- Category: Engineering
- License: GPL-3.0
- Last updated: 2026-10-30
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add data-goblin/power-bi-agentic-development --skill pbir-cli -g -a claude-code -y`
Codex: `npx skills add data-goblin/power-bi-agentic-development --skill pbir-cli -g -a codex -y`
Cursor: `npx skills add data-goblin/power-bi-agentic-development --skill pbir-cli -g -a cursor -y`
Gemini CLI: `npx skills add data-goblin/power-bi-agentic-development --skill pbir-cli -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add data-goblin/power-bi-agentic-development`

## Description

This skill should be used whenever the user mentions "pbir", "pbir-cli", "Power BI reports", or "PBI reports", works with .pbir, .pbip, or .pbix files, or wants to refresh, screenshot, or visually verify a report that is open in Power BI Desktop. Covers creating, exploring, formatting, validating, and publishing Power BI reports through the pbir CLI and object model, plus driving Power BI Desktop (canvas reload, page screenshots) and querying connected or local semantic models.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Working with Power BI reports using `pbir`

CLI for exploring, building, managing, formatting Power BI reports. All commands use `pbir`.

**IMPORTANT:** ALWAYS use `pbir` CLI commands to inspect and modify reports. NEVER write, replace, copy, or patch report JSON files directly. If the CLI does not expose a required mutation, stop and report the missing capability; do not fall back to file editing. Reading JSON through `pbir cat`, `pbir get`, or read-only examples is allowed.

**IMPORTANT:** FIRST Read and adhere to the mental model in [MENTAL-MODEL.md](important/MENTAL-MODEL.md).

## When `pbir` is missing

Install it with `uv tool install pbir-cli` (or `pip install pbir-cli`). That is the route to
use in every ordinary case, including when the command is missing entirely.

`bin/fetch.sh` downloads a self-contained portable build instead. Reach for it **only** when
`pbir` is not installed *and* installing it is not possible: no network access to PyPI, no
Python, or a locked-down machine that forbids installs. A portable build does not update with
`uv tool upgrade`, so preferring it when a normal install would have worked leaves the user on
a stale CLI. If an install failed, fix the install rather than routing around it.

## Keeping the Fabric CLI current

When publishing to Fabric (`pbir publish`) alongside the `fabric-cli` plugin, check the installed Fabric CLI (`fab`) if publishing reports a compatibility problem. Upgrade with `uv tool upgrade ms-fabric-cli` only when required or requested, and honor any user-pinned version.

## Learning from Mistakes

Log learnings about the `pbir` CLI in the project's memory file: gotchas, unexpected behavior, user expectations, and design preferences. Use the agent-appropriate path:

- **Claude Code:** `.claude/rules/pbir-cli.md`
- **Cursor:** `.cursor/rules/pbir-cli.mdc`
- **GitHub Copilot:** `.github/instructions/pbir-cli.instructions.md`

The rest: https://github.com/data-goblin/power-bi-agentic-development/blob/HEAD/plugins/reports/skills/pbir-cli/SKILL.md
