Expert guidance for the Fabric CLI (fab) and the Fabric and Power BI REST APIs: workspaces, items, lakehouses, notebooks, pipelines, semantic models, reports, capacities, OneLake, deployment and…
Install the "fabric-cli" agent skill from https://github.com/data-goblin/power-bi-agentic-development/tree/main/plugins/fabric-cli/skills/fabric-cli into .claude/skills/fabric-cli/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "fabric-cli", then confirm the skill loads.
Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
Type this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
skills CLI
$ npx skills add data-goblin/power-bi-agentic-development --skill fabric-cli -a codex
Project install goes to .agents/skills/; add -g for ~/.codex/skills/.
Install the "fabric-cli" agent skill from https://github.com/data-goblin/power-bi-agentic-development/tree/main/plugins/fabric-cli/skills/fabric-cli into .agents/skills/fabric-cli/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "fabric-cli", then confirm the skill loads.
Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
skills CLI
$ npx skills add data-goblin/power-bi-agentic-development --skill fabric-cli -a cursor
Project install goes to .agents/skills/; add -g for ~/.cursor/skills/.
Install the "fabric-cli" agent skill from https://github.com/data-goblin/power-bi-agentic-development/tree/main/plugins/fabric-cli/skills/fabric-cli into .cursor/skills/fabric-cli/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "fabric-cli", then confirm the skill loads.
Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
skills CLI
$ npx skills add data-goblin/power-bi-agentic-development --skill fabric-cli -a gemini-cli
Project install goes to .agents/skills/; add -g for ~/.gemini/skills/.
Install the "fabric-cli" agent skill from https://github.com/data-goblin/power-bi-agentic-development/tree/main/plugins/fabric-cli/skills/fabric-cli into .gemini/skills/fabric-cli/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "fabric-cli", then confirm the skill loads.
Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
Installs for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
skills CLI
$ npx skills add data-goblin/power-bi-agentic-development --skill fabric-cli -a github-copilot
Project install goes to .agents/skills/; add -g for ~/.copilot/skills/.
Install the "fabric-cli" agent skill from https://github.com/data-goblin/power-bi-agentic-development/tree/main/plugins/fabric-cli/skills/fabric-cli into .github/skills/fabric-cli/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "fabric-cli", then confirm the skill loads.
GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
skills CLI
$ npx skills add data-goblin/power-bi-agentic-development --skill fabric-cli -a opencode
OpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
Install the "fabric-cli" agent skill from https://github.com/data-goblin/power-bi-agentic-development/tree/main/plugins/fabric-cli/skills/fabric-cli into .opencode/skills/fabric-cli/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "fabric-cli", then confirm the skill loads.
OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
Facts
Skill name
fabric-cli
GitHub stars
1k
Token cost
~10k tokens
SKILL.md length
4,196 words
Files
43 (incl. scripts, references)
Skills in repo
33
Repo updated
First seen
Licence
GPL-3.0
At a glance
Expert guidance for the Fabric CLI (fab) and the Fabric and Power BI REST APIs: workspaces, items, lakehouses, notebooks, pipelines, semantic models, reports, capacities, OneLake, deployment and…
Works in 12 steps: Check the commands, syntax, and auth… → Check if the item exists if the user… → Find an item by name across every… → …
Tasks that involve REST APIs
SKILL.md covers When to use this skill, Critical general rules, Quickstart guide and Essential Concepts, plus 5 more sections
Calls az, python3 and uv
What it does
Fabric CLI is an agent skill from data-goblin/power-bi-agentic-development. Expert guidance for the Fabric CLI (fab) and the Fabric and Power BI REST APIs: workspaces, items, lakehouses, notebooks, pipelines, semantic models, reports, capacities, OneLake, deployment and admin. Also estimates the capacity units (CU) an operation will consume and its impact on the capacity before running it. Automatically invoke whenever the user mentions Fabric, Power BI Service, a Fabric or Power BI workspace, a capacity or F SKU, OneLake, fab, or asks to create, run, refresh, schedule, deploy or delete…
Its SKILL.md is about 10k tokens, which your agent loads only when the skill is triggered. The skill folder holds 44 other files, including scripts and reference files (for example `references/admin.md`, `references/capacity-cost.md` and `references/connections.md`).
It sits in Data & Analytics, covering REST APIs, Data warehousing and Deployment. It works with Power BI. The repository describes itself as: Power BI AI skills and Power BI agents for Claude Code and GitHub Copilot: a plugin marketplace of Power BI skills, subagents, and hooks for semantic models, DAX, TMDL, reports… The licence is GPL-3.0.
When your agent uses it
Tasks that involve REST APIs
Tasks that involve Data warehousing
Tasks that involve Deployment
Example prompts
“/fabric-cli”
Requirements
Python 3
Workflow steps
12 steps, taken from the first numbered list in SKILL.md.
1Check the commands, syntax, and auth status: fab --help and fab auth status
2Check if the item exists if the user gave the workspace and item name: fab exists "spaceparts-dev.Workspace/spaceparts-otc-full.SemanticMod…
3Find an item by name across every workspace the user can see: fab find 'sales' -P type=Report -l (substring on name, description…
4Find the workspace: fab ls
5Find the item: fab ls "Workspace Name.Workspace"
6Check the commands for that item
7What's in that item; what's it for; what is it?
8Get files, tables, or table schemas
9Query data (always prefer the wrapper scripts over raw fab api / duckdb / sqlcmd; they resolve IDs, hosts, and auth for you)
10Set properties for an item or workspace: fab set "ws.Workspace/Item.Notebook" -q displayName -i "New Name" or fab set "ws.Workspace" -q…
11Review or manage permissions
12Deploy items to Fabric: fab import "ws.Workspace/New.Notebook" -i ./local-path/Nb.Notebook -f
What it can do on your machine
Read from SKILL.md and the folder at commit 41886f2. It shows what the files ask for, not the result of running them.
Tool permissions
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Runs code
Ships 1 file in scripts/, which the agent can run.
Shell commands in SKILL.md call:
az
python3
uv
duckdb
winget
brew
From the folder's file list and the shell code blocks in SKILL.md.
Network
Links to these hosts (documentation or services it may open):
learn.microsoft.com
github.com
microsoft.github.io
dax.guide
powerquery.guide
From URLs in SKILL.md, links to its own repository left out.
Credentials
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Context cost
Fabric CLI loads about 10k tokens when it runs, and up to ~107k if it reads all its reference files. Until then it costs about 155 tokens; SKILL.md has 4,196 words of instructions outside code blocks.
Always· name and description, kept in context so the agent knows when to use it
~155
When it runs· the whole SKILL.md, loaded when a task matches
~10k
With references· SKILL.md plus every file in references/, read only if the agent opens them
~107k
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
Safety
Auto-check passed
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
Download SKILL.mdSave it as .claude/skills/fabric-cli/SKILL.md (or your agent's skills folder). This skill also uses 42 other files; get the full folder from GitHub.
name
fabric-cli
description
Expert guidance for the Fabric CLI (`fab`) and the Fabric and Power BI REST APIs: workspaces, items, lakehouses, notebooks, pipelines, semantic models, reports, capacities, OneLake, deployment and admin. Also estimates the capacity units (CU) an operation will consume and its impact on the capacity before running it. Automatically invoke whenever the user mentions Fabric, Power BI Service, a Fabric or Power BI workspace, a capacity or F SKU, OneLake, `fab`, or asks to create, run, refresh, schedule, deploy or delete anything in Fabric, including preview items such as Plan, Ontology, Graph or Copilot.
Fabric CLI
Guidance for using fab to programmatically manage Fabric & Power BI service
Install via uv tool install ms-fabric-cli (get uv via winget install uv or brew install uv)
Fabric CLI is for working with the Cloud environment and not local files; it works with Power BI Pro, PPU, or Fabric; you DO NOT need a Fabric SKU to use the Fabric CLI
Keep fab current: check the installed version against the latest ms-fabric-cli release and upgrade with uv tool upgrade ms-fabric-cli unless the user has pinned a specific version. Discover commands and flags with fab --help and fab <command> --help rather than hard-coding behavior; the CLI surface changes regularly
[!IMPORTANT]
Any time you encounter errors, user preferences or learnings when using the Fabric cli, ALWAYS note these down in the user memory rules, i.e. .claude/rules/fabric-cli.md for future improvement.
This is ONLY for generic learnings and not for item- or task-specific learnings.
When to use this skill
Use whenever the user mentions "Fabric" or "Power BI"
Use when user asks about Power BI workspaces, deployment, tenants, publishing, download, permissions, or data
Critical general rules
IMPORTANT: The first time you use fab run check that it is up to date to the latest version (upgrade with uv tool upgrade ms-fabric-cli unless the user has pinned a version) and run fab auth status; If user isn't authenticated, ask them to run fab auth login
Always use fab --help and fab <command> --help the first time you use a command to understand its syntax
You must search the skill /references/ for relevant reference files that explain certain commands, examples, scripts, or workflows before you start using fab
Before first use, ask the user if they have Fabric admin access, sensitivity labels or DLP policies, any API restrictions, or preferences for Fabric/Power BI API usage; remind user to add this to memory files
If workspace or item name is unclear, ask the user first, then verify with fab ls or fab exists before proceeding
Ensure that you avoid removing or moving items, workspaces, or definitions, or changing properties without explicit user direction
IMPORTANT: Before any operation that consumes capacity units (creating items, running notebooks, pipelines or refreshes, large queries, Copilot, preview items such as Plan, Ontology or Graph, anything scheduled), estimate its CU-hours and its impact on the capacity, and get explicit user approval when the charge is flat or per session, exceeds a quarter of the capacity's daily CU-hours, recurs, cannot be estimated, or the capacity already throttles; a user naming a feature is not consent to its cost. See Capacity cost and capacity-cost.md
If a command is blocked in your permissions and you try to use it, stop and ask the user for clarification; never try to circumvent it
Create output directories before export: fab export does not create intermediate directories; mkdir -p the output path first or the command fails with [InvalidPath]
Capacity cost: estimate before acting
Bursting hides cost: operations finish fast and their CUs are smoothed into the next 5 to 64 minutes (interactive) or 24 hours (background). On a small F SKU one operation can use more than a day of capacity, and the carry forward then throttles every workspace on it until idle capacity pays it back, which on an F2 can take weeks.
Check the capacity first: fab ls .capacities -l for SKU and state; the Monitoring hub capacity page for utilization, throttling and carry forward. Any carry forward means no headroom
Estimate the operation in CU-hours and EUR, and as a share of the SKU's daily budget (an F<n> has 24 * n CU-hours a day; an F2 has 48)
Know the flat charges: Plan (preview) bills 30-day sessions per user (Planner 847, Stakeholder 168, Viewer 37 CU-hours); creating and editing a plan by REST was billed as a Stakeholder session (168 CU-h), and a session cannot be ended or refunded
Pausing (fab stop) bills the whole carry forward at once and clears throttling; scaling up burns it down faster at a similar total cost
Full thresholds, formulas, known charges and where to see what an operation cost: capacity-cost.md
Use -f (force) for non-interactive use
The fab CLI prompts for confirmation, so you you must always append -f to prevent this UNLESS sensitivity labels are enabled, in which case you must ask the user. Do this for the commands:
fab get -q "definition" ; sensitivity label confirmation
fab export ; sensitivity label confirmation
fab import ; overwrite confirmation
fab cp / fab cp -r ; overwrite and sensitivity label confirmation
fab rm ; delete confirmation
fab assign / fab unassign ; capacity/domain assignment confirmation
fab mv ; rename/move confirmation
Quickstart guide
You must read and understand the common list of operations with simple examples
Check the commands, syntax, and auth status: fab --help and fab auth status
Check if the item exists if the user gave the workspace and item name: fab exists "spaceparts-dev.Workspace/spaceparts-otc-full.SemanticModel"
Find an item by name across every workspace the user can see: fab find 'sales' -P type=Report -l (substring on name, description, workspace; -P type= to filter, -l for ids; -q '<jmespath>' for client-side filter/projection). For governance workflows that need last visit / last refresh / owner / storage mode / capacity SKU, use scripts/search_across_workspaces.py; see workspaces.md for the delta.
Find the workspace: fab ls
Find the item: fab ls "Workspace Name.Workspace"
Check the commands for that item:
fab desc to get itemTypes
fab desc .<ItemType> for commands i.e. fab desc .SemanticModel
What's in that item; what's it for; what is it?:
Full TMDL definition: fab get "spaceparts-dev.Workspace/spaceparts-otc-full.SemanticModel" -q "definition" -f
Search a specific measure / table / column: fab get "ws.Workspace/Model.SemanticModel" -q "definition" -f | rga -i "Sales Amount"
Retrieve AI instructions / AI schema: python3 scripts/get_semantic_model_ai_metadata.py "ws.Workspace/Model.SemanticModel" --instructions-out instructions.md --schema-out schema.json
Get files, tables, or table schemas:
List lakehouse files: fab ls "ws.Workspace/LH.Lakehouse/Files"
List lakehouse tables: fab ls "ws.Workspace/LH.Lakehouse/Tables"
Table schema: fab table schema "ws.Workspace/LH.Lakehouse/Tables/gold/orders"
Query data (always prefer the wrapper scripts over raw fab api / duckdb / sqlcmd; they resolve IDs, hosts, and auth for you):
Semantic model (DAX): python3 scripts/execute_dax.py "ws.Workspace/Model.SemanticModel" -q "EVALUATE TOPN(10, 'Orders')"
Lakehouse SQL endpoint, warehouse, or SQL database (T-SQL): prefer the fabric-sql MCP execute_query(workspaceId, itemId, query) when it is loaded; fall back to python3 scripts/query_sql_endpoint.py "ws.Workspace/LH.Lakehouse" -q "SELECT TOP 10 * FROM dbo.orders". See querying-data.md
Lakehouse or warehouse Delta over OneLake (DuckDB): python3 scripts/query_lakehouse_duckdb.py "ws.Workspace/LH.Lakehouse" -q "SELECT * FROM tbl LIMIT 10" -t gold.orders
Set properties for an item or workspace: fab set "ws.Workspace/Item.Notebook" -q displayName -i "New Name" or fab set "ws.Workspace" -q description -i "Production environment"
Review or manage permissions:
Item ACL: fab acl ls "ws.Workspace/Model.SemanticModel" then fab acl set "ws.Workspace/Model.SemanticModel" -I user@contoso.com -R Read
Workspace roles: fab acl ls "ws.Workspace" then fab acl set "ws.Workspace" -I user@contoso.com -R Member
Setting up a service principal for automation instead of a human identity: service-principals.md - creation via az CLI, the workspace-role-plus-tenant-setting-group double requirement, and how to authenticate fab as it
Deploy items to Fabric: fab import "ws.Workspace/New.Notebook" -i ./local-path/Nb.Notebook -f
Download items from Fabric: fab export "ws.Workspace/Nb.Notebook" -o ./backup -f (always mkdir -p ./backup first)
Copy or move items between workspaces: fab cp "dev.Workspace/Item.Notebook" "prod.Workspace" -f or fab mv "ws.Workspace/Old.Notebook" "ws.Workspace/New.Notebook" -f
Open item in Fabric via browser: fab open "spaceparts-dev.SpaceParts/Amazing Report.Report"
Using Fabric or Power BI APIs: fab api -A powerbi "groups/<ws-id>/datasets/<model-id>/refreshes" -X post -i '{"type":"Full"}' or fab api "workspaces/<ws-id>/items"
Using Azure CLI (advanced) when Fabric CLI doesn't suffice:
Pass a Key Vault secret to a consumer without ever reading, echoing, or persisting it: az login --service-principal -u <appId> -t <tenantId> --password "$(az keyvault secret show --vault-name <vault> --name <secret> --query value -o tsv)" ; command substitution pipes the secret directly into the child process arg list, never stdout, a file, or a named shell variable
For information about any concepts related to Power BI or Fabric you must search or fetch via the microsoft-learn MCP server (or the pbi-search CLI as an alternative) and ask the user questions with the AskUserQuestion tool; NEVER guess or make assumptions.
Workspaces
Workspaces are containers for items like Notebooks (and other ETL items), Lakehouses (and other data items), SemanticModels, Reports (and other consumption items), and OrgApps.
Workspaces can be assigned to different things:
Deployment Pipelines for lifecycle management (Dev, Test, Prod, etc.)
Domains for governance and tenant structuring
Capacities for licensing and resources (Fabric or Premium capacities only; PPU and Pro work differently)
Git repositories for Source Control via Git integration
Key Patterns
Pay special attention to each of the following areas when using the Fabric CLI
Path Format
Fabric uses filesystem-like paths with type extensions:
"WorkspaceName.Workspace/ItemName.ItemType"
You must quote paths with spaces and punctuation:
"Workspace Name.Workspace/Semantic Model Name.SemanticModel"
For lakehouses this is extended into files and tables:
WorkspaceName.Workspace/LakehouseName.Lakehouse/Files/FileName.extension or /WorkspaceName.Workspace/LakehouseName.Lakehouse/Tables/TableName
For Fabric capacities you have to use fab ls .capacities
Full list: You must use fab desc or fab desc .<ItemType> to check syntax and types if the user asks about an item type not listed above.
JMESPath Queries
Filter and transform JSON responses with -q:
bash
# Get single field
-q "id"
-q "displayName"
# Get nested field
-q "properties.sqlEndpointProperties"
-q "definition.parts[0]"
# Filter arrays
-q "value[?type=='Lakehouse']"
-q "value[?contains(name, 'prod')]"
# Get first element
-q "value[0]"
-q "definition.parts[?path=='model.tmdl'] | [0]"
Using fab api
fab has an api escape hatch that lets you use any API even if it doesn't have primary commands.
Variable Extraction Pattern
To use fab api you need item IDs. Extract them like this:
bash
WS_ID=$(fab get "ws.Workspace" -q "id" | tr -d '"')
MODEL_ID=$(fab get "ws.Workspace/Model.SemanticModel" -q "id" | tr -d '"')
# Then use in API calls
fab api -A powerbi "groups/$WS_ID/datasets/$MODEL_ID/refreshes" -X post -i '{"type":"Full"}'
Admin APIs (Requires Admin Role)
Don't use admin commands or APIs if the user doesn't have Admin access. Here's some examples:
bash
# Find semantic models by name (cross-workspace)
fab api "admin/items" -P "type=SemanticModel" -q "itemEntities[?contains(name, 'Sales')]"
# Find all notebooks
fab api "admin/items" -P "type=Notebook" -q "itemEntities[].{name:name,workspace:workspaceId}"
# Find all lakehouses
fab api "admin/items" -P "type=Lakehouse"
# Common types: SemanticModel, Report, Notebook, Lakehouse, Warehouse, DataPipeline, Ontology
For full admin API reference (cross-workspace discovery, tenant settings read/update, capacity/domain/workspace overrides, activity events): admin.md
Error Handling & Debugging
bash
# Show response headers
fab api workspaces --show_headers
# Verbose output
fab get "Production.Workspace/Item" -v
# Save responses for debugging
fab api workspaces -o /tmp/workspaces.json
Common workflows
These are the most common workflows you'll encounter in Fabric
Finding or exploring workspaces, items, or metadata
Command
Purpose
Example
fab ls
List workspaces / items
fab ls "Sales.Workspace" -l
fab exists
Check if a path exists
fab exists "Sales.Workspace/Model.SemanticModel"
fab get
Get item details
fab get "Sales.Workspace" -q "id"
fab desc
Supported commands per type
fab desc .SemanticModel
Flags:
-l (long listing)
-a (show hidden items)
-q (JMESPath filter)
-v (verbose output)
-o (save response to file)
Fabric discovery follows a drill-down pattern:
Browsing:
List workspaces: fab ls
List items in a workspace: fab ls "ws.Workspace" -l
Confirm a path exists: fab exists "ws.Workspace/Item"
Check what commands an item type supports: fab desc .<ItemType>
Inspection:
Get item details: fab get "ws.Workspace/Item"
Pull a single field: fab get "ws.Workspace" -q "id"
Cross-workspace search:
Routine search across name, description, workspace: fab find '<text>' -P type=<Type> -l
Lakehouse SQL endpoint, Warehouse, or SQL Database (T-SQL):
Prefer the fabric-sql MCP execute_query(workspaceId, itemId, query) when loaded; server-side, no local tooling
Fall back to scripts/query_sql_endpoint.py (sqlcmd; auto-detects host per item type, reuses az login via ActiveDirectoryAzCli) when the MCP is unavailable
Prefer either over DuckDB when you need INFORMATION_SCHEMA, sys.* metadata, CTEs, or window functions
fab api -A powerbi "groups/<ws-id>/datasets/<model-id>/refreshes" -X post -i '{"type":"Full"}'
Flags:
-P key:type=value (parameters, type is string|int|bool)
--id (job run ID)
-w (wait on cancel)
--timeout (overall timeout for synchronous runs)
--polling_interval (status poll cadence)
Jobs map to different endpoints depending on item type:
Notebooks and pipelines:
Run synchronously: fab job run "ws/ETL.Notebook" -P date:string=2025-01-01
Run asynchronously: fab job start "ws/ETL.Notebook"
Check status: fab job run-status "ws/Nb.Notebook" --id <job-id>
List history: fab job run-list "ws/Nb.Notebook"
Verify the REAL outcome: a job Completed only means the process finished -- a notebook can catch its own exception and exit a failure payload while still showing Completed. Read its exit value, or use scripts/run_notebook_checked.py; details in notebooks.md
fab api "admin/items" -P "type=SemanticModel" -q "itemEntities[?contains(name,'Sales')]"
fab api "admin/workspaces"
Workspace inventory
fab api "admin/workspaces"
fab api "admin/tenantsettings"
Tenant settings
fab api "admin/tenantsettings"
fab api "admin/capacities"
Capacity inventory
fab api "admin/capacities"
fab api -X post .../update
Update tenant setting
fab api -X post "admin/tenantsettings/<name>/update" -i body.json
Flags:
-P key=value (query params, e.g. type=SemanticModel)
-q (JMESPath filter)
-X post + -i (write ops)
--show_headers (inspect Retry-After on 429)
Admin-scope work is gated behind the Fabric / Power BI admin role. Confirm access first with fab api "admin/capacities" 2>&1 | head -5; if it errors, stop rather than retry.
Use the audit-tenant-settings skill from the fabric-admin plugin. It owns the curated metadata baseline, the audit + change-detection script, delegated-override enumeration, and the Entra SG investigation workflow.
Invoke it whenever the question combines tenant posture with group membership, override scope, or drift against the baseline.
Definitions and deployment (item definitions, deployment pipelines, git integration, cicd)
Command
Purpose
Example
fab get -q "definition"
Read raw definition
fab get "ws/Model.SemanticModel" -q "definition" -f
fab export
Export item to local
fab export "ws/Nb.Notebook" -o ./backup -f
fab import
Import item from local
fab import "ws/Nb.Notebook" -i ./backup/Nb.Notebook -f
fab cp
Copy between workspaces
fab cp "dev/Item" "prod.Workspace" -f
fab api "deploymentPipelines"
Deployment pipelines API
fab api "deploymentPipelines" -q "value[]"
Flags:
-o (output path for fab export)
-i (input path or JSON body for fab import)
--format (definition format for export / import)
-f (skip overwrite and sensitivity prompts)
[!IMPORTANT]
The poll interval is by far the biggest performance lever for any definition change.
Creating or updating an item definition is a long-running operation (LRO): the API returns
202 Accepted with a Retry-After: 20 header. fab import, nb create, and nb cell edit
wait roughly that long between status polls, so a notebook that the server finishes in ~1s
takes them 25-60s. Neither fab nor nb exposes a knob to change that interval.
For notebook definition changes, strongly prefer scripts/deploy_notebook.py,
which polls the LRO every ~0.3s (tunable via --poll-interval) and creates in ~1-2s or updates
in place in ~1s. Auto-detects create vs update. When you must roll your own for another item
type, the rule is the same: poll updateDefinition / create at ~0.3s, not the advertised 20s.
bash
python3 scripts/deploy_notebook.py "ws.Workspace/ETL.Notebook" -i ./ETL.Notebook # create or update in place
Every Fabric item has a serializable definition. Move definitions between environments depending on scope:
Single item:
Round-trip locally: fab export then fab import (always mkdir -p the output directory first; fab export does not create intermediate directories and fails with [InvalidPath])
Same-tenant shortcut, no local hop: fab cp "dev/Item" "prod.Workspace"
Semantic model as PBIP (TMDL + blank report):
Export the model with fab export, create the report with pbir new report, then combine
them with pbir report merge-to-thick; see import-download-deploy.md
Full workspace snapshot (items + lakehouse files):
audit-tenant-settings (in the fabric-admin plugin) ; Fabric governance workflow covering tenant settings, delegated overrides (capacity / domain / workspace), and the Entra security groups those settings reference. Read-only; holds the curated metadata baseline and the audit + change-detection script.
Gotchas
IMPORTANT: DON'T try to use fab ls on items that aren't data items (.Lakehouse, .Warehouse, etc); use fab ls to find workspaces and items, and use fab get to look at definitions
ALWAYS Use the -f flag when using fab get, fab import, fab export, etc. as described above
ONLY fallback to fab api when a command doesn't exist
Definition changes feel slow but aren't:fab import / nb create / nb cell edit take 25-60s to push a notebook definition only because they poll the LRO at the server's Retry-After: 20. The work is ~1s. Use scripts/deploy_notebook.py (tight-polls at ~0.3s) for definition changes; the poll interval is the single biggest lever
References
Reference map (which references cluster together; follow the links between them, not just this list):
Service Principals - Create an SP with az CLI, grant it workspace access, clear the tenant-setting gate, authenticate fab as it (real login vs env-token testing), rotation and teardown
search_across_workspaces.py ; cross-workspace governance complement to fab find (last visit, last refresh, owner, storage mode, capacity SKU, Copilot readiness); see workspaces.md for when to choose which
get-downstream-reports.py ; find all reports connected to a given semantic model across accessible workspaces (no admin required)
execute_dax.py ; execute DAX queries against semantic models; output as table, csv, or json
query_lakehouse_duckdb.py ; query lakehouse or warehouse Delta tables via DuckDB against OneLake (reuses az login); output as table, csv, or json
query_sql_endpoint.py ; query lakehouse SQL endpoint, warehouse, or SQL database via sqlcmd (reuses az login through ActiveDirectoryAzCli); output as table, csv, or json
download_workspace.py ; download a full workspace with all item definitions and lakehouse files
run_notebook_checked.py ; run a notebook and check its exit value, exiting non-zero when the notebook's own {ok:false} verdict fails despite a Completed job status (reads the exit value via the notebook job-instance beta endpoint)
deploy_notebook.py ; create or update a notebook definition fast (~1-2s) by tight-polling the LRO instead of the CLI's ~20s Retry-After cadence; auto-detects create vs update, --poll-interval is the performance lever. Strongly prefer this over fab import / nb for any notebook definition change
task_flow.py ; create, update, export or delete a workspace task flow from a JSON spec (tasks, items as <displayName>.<Type>, edges) through the internal metadata endpoints the Fabric UI uses; no public API or fab command exists for task flows
See scripts/README.md for detailed usage, arguments, and examples. Always search the scripts/ folder before writing a new helper; a script may already exist for the task.
External references (request markdown when possible):
Fabric CLI next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
Fabric CLI compared with similar skills
Skill
Stars
Used in
Tokens
Auto-check
Licence
Repo updated
Fabric CLI this skilldata-goblin/power-bi-agentic-development
Full pipeline where an agent team collaborates to generate data warehouse design, KPI definitions, visualizations, and automated reports for a BI dashboard.
This skill should be used whenever the user mentions a "semantic model", "data model", or "dataset", or asks to "build", "model", "design", "optimize", "review", or "audit" one, or to "add a…
Expert guidance for the Fabric CLI (fab) and the Fabric and Power BI REST APIs: workspaces, items, lakehouses, notebooks, pipelines, semantic models, reports, capacities, OneLake, deployment and…. Fabric CLI is an agent skill from data-goblin/power-bi-agentic-development. Expert guidance for the Fabric CLI (fab) and the Fabric and Power BI REST APIs: workspaces, items, lakehouses, notebooks, pipelines, semantic models, reports, capacities, OneLake, deployment and admin.
When should I use Fabric CLI?
Fabric CLI fits situations like: tasks that involve REST APIs; tasks that involve Data warehousing; tasks that involve Deployment.
How do I install Fabric CLI in Claude Code?
Run `npx skills add data-goblin/power-bi-agentic-development --skill fabric-cli -a claude-code`. Or copy the skill folder (plugins/fabric-cli/skills/fabric-cli in data-goblin/power-bi-agentic-development) into .claude/skills/fabric-cli in your project. Claude Code loads it when a task matches its description.
How do I install Fabric CLI in Codex?
Run `npx skills add data-goblin/power-bi-agentic-development --skill fabric-cli -a codex`. Or copy the skill folder (plugins/fabric-cli/skills/fabric-cli in data-goblin/power-bi-agentic-development) into .agents/skills/fabric-cli in your project. Codex loads it when a task matches its description.
Can I use Fabric CLI in Cursor, Gemini CLI or GitHub Copilot?
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add data-goblin/power-bi-agentic-development --skill fabric-cli -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/fabric-cli, .gemini/skills/fabric-cli, .github/skills/fabric-cli and .opencode/skills/fabric-cli in your project.
What does Fabric CLI need to run?
Going by SKILL.md and its folder, Fabric CLI needs the command-line tools its instructions call (az, python3, uv, duckdb, winget and brew). Our summary lists: Python 3.
Does Fabric CLI access the network?
SKILL.md names 5 domains. As links in the text: learn.microsoft.com, github.com, microsoft.github.io, dax.guide and powerquery.guide. This is read from the text; nothing was executed.
Is Fabric CLI safe to install?
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
What licence does Fabric CLI use?
Fabric CLI is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
How many tokens does Fabric CLI use?
About 10k tokens (SKILL.md is roughly 40k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 97k tokens, read only when the agent opens those files.
What are the alternatives to Fabric CLI?
Skills that share tags, products or a category with Fabric CLI: Power Bi AI Readiness (DKH-DK/Self-Service-Power-BI-Fabric, 113 stars), Powerbi Modeling (github/awesome-copilot, 40k stars), Bi Dashboard (revfactory/harness-100, 1.3k stars) and Debugging Signals Pipeline (PostHog/posthog-foss, 721 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
Who maintains Fabric CLI?
data-goblin (a GitHub user) maintains it in data-goblin/power-bi-agentic-development, which has 1,026 GitHub stars. The repository holds 33 skills in this directory. The repository was last updated on October 5, 2026.