fabric-cli

Manage Microsoft Fabric workspaces, items, and data programmatically with the fab CLI.

6|3|Updated Jul 4, 2026
One-click install
npx skills add https://github.com/InsightfulAnalytics/PBI_Agentic_Dev --skill fabric-cli-insightfulanalytics
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: fabric-cli
Source: https://github.com/InsightfulAnalytics/PBI_Agentic_Dev/tree/main/plugins/fabric-cli/skills/fabric-cli
Command: npx skills add https://github.com/InsightfulAnalytics/PBI_Agentic_Dev --skill fabric-cli-insightfulanalytics

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires azure-storage-file-datalake, azure-identity, and includes scripts (resource) and references (resource) components.

What problem does it solve? Working with Microsoft Fabric and Power BI Service through the web portal is manual and hard to automate. This Skill teaches an AI agent to use the Fabric CLI (fab) to script workspace administration, item deployment, data querying, and governance tasks end to end. ## Core Features & Use Cases - Workspace and item management: List, create, copy, move, export, and import workspaces, semantic models, reports, notebooks, lakehouses, and warehouses using filesystem-like paths. - Data querying: Run DAX against semantic models, T-SQL against SQL endpoints, and DuckDB queries over OneLake Delta tables via bundled wrapper scripts that resolve IDs, hosts, and authentication. - Jobs and admin operations: Trigger and monitor notebook, pipeline, dataflow, and semantic model refreshes, plus tenant-level admin APIs for auditing, scanner metadata, and activity events. - Use Case: Ask the agent to find a semantic model across workspaces, pull its TMDL definition, trigger a refresh, and verify the refresh status — all without opening the Fabric portal. ## Quick Start Ask the agent to list all items in a Fabric workspace and show the definition of a specific semantic model using the fab CLI.

Frequently Asked Questions about fabric-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage Microsoft Fabric workspaces from the command line?▼

Install the Fabric CLI with `uv tool install ms-fabric-cli`, authenticate with `fab auth login`, then use filesystem-like paths such as `fab ls "Sales.Workspace"` to list items and `fab get`, `fab set`, `fab cp`, and `fab rm` to manage them.

How to run DAX queries against a Fabric semantic model?▼

Use the bundled execute_dax.py script with the model path and query, for example `python3 scripts/execute_dax.py "ws.Workspace/Model.SemanticModel" -q "EVALUATE TOPN(10, 'Orders')"`. It resolves IDs and authentication automatically via the executeQueries API.

Does the Fabric CLI require a Fabric capacity license?▼

No. The Fabric CLI works with Power BI Pro, PPU, and Fabric capacities; you do not need a Fabric SKU. It targets the cloud service only, not local files.

Can I query a Fabric lakehouse without the SQL endpoint?▼

Yes. The query_lakehouse_duckdb.py script queries Delta tables directly over OneLake using DuckDB with the delta and azure extensions, reusing your az login session without passwords or tokens.

Why does fab fail with a charmap codec error on Windows?▼

On a Windows console using the cp1252 codepage, fab crashes while printing output even though the server-side work succeeded. Export PYTHONIOENCODING=utf-8 and PYTHONUTF8=1 in every shell block that calls fab; Linux and macOS are unaffected.

When should I use fab api instead of native fab commands?▼

Use `fab api` as an escape hatch when no native command exists, such as triggering semantic model refreshes, calling admin endpoints, or patching endorsement and tags. Extract item IDs first with `fab get -q "id"` and pass the correct audience with `-A powerbi` or `-A fabric`.