ruiromano/powerbi-agentic-plugins/fabric-cli

Claude Code and agent skill by ruiromano/powerbi-agentic-plugins

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use Microsoft Fabric CLI (fab) to manage workspaces, semantic models, reports, notebooks, lakehouses, and other Fabric resources via file-system metaphor and commands. Use when deploying Fabric items, running jobs, querying data, managing OneLake files, or automating Fabric operations. Invoke this skill automatically whenever a user mentions the Fabric CLI, fab, or Fabric.

Install

npx vskill@latest install ruiromano/powerbi-agentic-plugins/fabric-cli

SKILL.md

Microsoft Fabric CLI Operations

Note: If you have access to a Bash tool (e.g., Claude Code), execute fab commands directly via Bash rather than using an MCP server.

Expert guidance for using the fab CLI to programmatically manage Fabric

When to Use This Skill

Activate automatically when tasks involve:

  • Mention of the Fabric CLI, Fabric items, Power BI, fab, or fab commands
  • Managing workspaces, items, or resources
  • Deploying or migrating semantic models, reports, notebooks, pipelines
  • Running or scheduling jobs (notebooks, pipelines, Spark)
  • Working with lakehouse/warehouse tables and data
  • Using the Fabric, Power BI, or OneLake APIs
  • Automating Fabric operations in scripts

Critical

  • Before first use, ask the user if they have Fabric admin access, any API restrictions, or preferences for Fabric/Power BI API usage
  • Remind the user to add their Fabric access level and preferences to their agent memory files (e.g., CLAUDE.md) for future sessions
  • If workspace or item name is unclear, ask the user first, then verify with fab ls or fab exists before proceeding
  • The first time you use fab run fab auth status to make sure the user is authenticated. If not, ask the user to run fab auth login to login
  • Always use fab --help and fab <command> --help the first time you use a command to understand its syntax, first
  • Always try the simple fab command alone, first before piping it
  • Always use -f when executing command if the flag is available to do so non-interactively
  • Ensure that you avoid removing or moving items, workspaces, or definitions, or changing properties without explicit user direction
  • 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
  • Use fab in non-interactive mode. Interactive mode doesn't work with coding agents
  • When working with Fabric item code definitions for CRUD, load the assets/*-definitions.md files to understand more about definition format when calling the fab import operations.

First Run

bash
fab auth login # Authenticate (opens browser)
fab auth status # Verify authentication
fab ls # List your workspaces
fab ls "Name.Workspace" # List items in a workspace

Variable Extraction Pattern

Most workflows need 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"}'

Quick Start

New to Fabric CLI? Here are some references you can read:

Command Reference
CommandPurposeExample
Finding Items
fab lsList itemsfab ls "Sales.Workspace"
fab ls -lList with detailsfab ls "Sales.Workspace" -l
fab existsCheck if existsfab exists "Sales.Workspace/Model.SemanticModel"
fab getGet item detailsfab get "Sales.Workspace/Model.SemanticModel"
fab get -qQuery specific fieldfab get "Sales.Workspace" -q "id"
Definitions
fab get -q "definition"Get full definitionfab get "ws.Workspace/Model.SemanticModel" -q "definition"
fab exportExport to localfab export "ws.Workspace/Nb.Notebook" -o ./backup
fab importImport from localfab import "ws.Workspace/Nb.Notebook" -i ./backup/Nb.Notebook
Running Jobs
fab job runRun synchronouslyfab job run "ws.Workspace/ETL.Notebook"
fab job startRun asynchronouslyfab job start "ws.Workspace/ETL.Notebook"
fab job run -PRun with paramsfab job run "ws.Workspace/Nb.Notebook" -P date:string=2025-01-01
fab job run-listList executionsfab job run-list "ws.Workspace/Nb.Notebook"
fab job run-statusCheck statusfab job run-status "ws.Workspace/Nb.Notebook" --id <job-id>
Refreshing Models
fab api -A powerbiTrigger refreshfab api -A powerbi "groups/<ws-id>/datasets/<model-id>/refreshes" -X post -i '{"type":"Full"}'
fab api -A powerbiCheck refresh statusfab api -A powerbi "groups/<ws-id>/datasets/<model-id>/refreshes?\$top=1"
DAX Queries
fab get -q "definition"Get model schema firstfab get "ws.Workspace/Model.SemanticModel" -q "definition"
fab api -A powerbiExecute DAXfab api -A powerbi "groups/<ws-id>/datasets/<model-id>/executeQueries" -X post -i '{"queries":[{"query":"EVALUATE..."}]}'
Lakehouse
fab lsBrowse files/tablesfab ls "ws.Workspace/LH.Lakehouse/Files"
fab table schemaGet table schemafab table schema "ws.Workspace/LH.Lakehouse/Tables/sales"
fab cpUpload/downloadfab cp ./local.csv "ws.Workspace/LH.Lakehouse/Files/"
Management
fab cpCopy itemsfab cp "dev.Workspace/Item.Type" "prod.Workspace" -f
fab setUpdate propertiesfab set "ws.Workspace/Item.Type" -q displayName -i "New Name"
fab rmDelete itemfab rm "ws.Workspace/Item.Type" -f

Core Concepts

Path Format

Fabric uses filesystem-like paths with type extensions:

/WorkspaceName.Workspace/ItemName.ItemType

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

Examples:

  • "/Production.Workspace/Sales Model.SemanticModel"
  • /Data.Workspace/MainLH.Lakehouse/Files/data.csv
  • /Data.Workspace/MainLH.Lakehouse/Tables/dbo/customers
Common Item Types
  • .Workspace - Workspaces
  • .SemanticModel - Power BI datasets
  • .Report - Power BI reports
  • .Notebook - Fabric notebooks
  • .DataPipeline - Data pipelines
  • .Lakehouse / .Warehouse - Data stores
  • .SparkJobDefinition - Spark jobs

Full list: 35+ types. Use fab desc .<ItemType> to explore.

Essential Commands

Navigation & Discovery
bash
# List resources
fab ls # List workspaces
fab ls "Production.Workspace" # List items in workspace
fab ls "Production.Workspace" -l # Detailed listing
fab ls "Data.Workspace/LH.Lakehouse" # List lakehouse contents
# Check existence
fab exists "Production.Workspace/Sales.SemanticModel"
# Get details
fab get "Production.Workspace/Sales.Report"
fab get "Production.Workspace" -q "id" # Query with JMESPath
Creating & Managing Resources
bash
# Create workspace after using `fab ls .capacities` to check capacities
fab mkdir "NewWorkspace.Workspace" -P capacityname=MyCapacity
# Create items
fab mkdir "Production.Workspace/NewLakehouse.Lakehouse"
fab mkdir "Production.Workspace/Pipeline.DataPipeline"
# Update properties
fab set "Production.Workspace/Item.Notebook" -q displayName -i "New Name"
fab set "Production.Workspace" -q description -i "Production environment"
Copy, Move, Export, Import
bash
# Copy between workspaces
fab cp "Dev.Workspace/Pipeline.DataPipeline" "Production.Workspace"
fab cp "Dev.Workspace/Report.Report" "Production.Workspace/ProdReport.Report"
# Export to local
fab export "Production.Workspace/Model.SemanticModel" -o /tmp/exports
fab export "Production.Workspace" -o /tmp/backup -a # Export all items
# Import from local
fab import "Production.Workspace/Pipeline.DataPipeline" -i /tmp/exports/Pipeline.DataPipeline -f
# IMPORTANT: Use -f flag for non-interactive execution
# Without -f, import/export operations expect an interactive terminal for confirmation
# This will fail in scripts, automation, or when stdin is not a terminal
fab import "ws.Workspace/Item.Type" -i ./Item.Type -f # Required for scripts
API Operations

Direct REST API access with automatic authentication.

Audiences:

  • fabric (default) - Fabric REST API
  • powerbi - Power BI REST API
  • storage - OneLake Storage API
  • azure - Azure Resource Manager
bash
# Fabric API (default)
fab api workspaces
fab api workspaces -q "value[?type=='Workspace']"
fab api "workspaces/<workspace-id>/items"
# Power BI API (for DAX queries, dataset operations)
fab api -A powerbi groups
fab api -A powerbi "datasets/<model-id>/executeQueries" -X post -i '{"queries": [{"query": "EVALUATE VALUES(Date[Year])"}]}'
# POST/PUT/DELETE
fab api -X post "workspaces/<ws-id>/items" -i '{"displayName": "New Item", "type": "Lakehouse"}'
fab api -X put "workspaces/<ws-id>/items/<item-id>" -i /tmp/config.json
fab api -X delete "workspaces/<ws-id>/items/<item-id>"
# OneLake Storage API
fab api -A storage "WorkspaceName.Workspace/LH.Lakehouse/Files" -P resource=filesystem,recursive=false
Job Management
bash
# Run synchronously (wait for completion)
fab job run "Production.Workspace/ETL.Notebook"
fab job run "Production.Workspace/Pipeline.DataPipeline" --timeout 300
# Run with parameters
fab job run "Production.Workspace/ETL.Notebook" -P date:string=2024-01-01,batch:int=1000,debug:bool=false
# Start asynchronously
fab job start "Production.Workspace/LongProcess.Notebook"
# Monitor
fab job run-list "Production.Workspace/ETL.Notebook"
fab job run-status "Production.Workspace/ETL.Notebook" --id <job-id>
# Schedule
fab job run-sch "Production.Workspace/Pipeline.DataPipeline" --type daily --interval 10:00,16:00 --start 2024-11-15T09:00:00 --enable
fab job run-sch "Production.Workspace/Pipeline.DataPipeline" --type weekly --interval 10:00 --days Monday,Friday --enable
# Cancel
fab job run-cancel "Production.Workspace/ETL.Notebook" --id <job-id>
Table Operations
bash
# View schema
fab table schema "Data.Workspace/LH.Lakehouse/Tables/dbo/customers"
# Load data (non-schema lakehouses only)
fab table load "Data.Workspace/LH.Lakehouse/Tables/sales" --file "Data.Workspace/LH.Lakehouse/Files/daily_sales.csv" --mode append
# Optimize (lakehouses only)
fab table optimize "Data.Workspace/LH.Lakehouse/Tables/transactions" --vorder --zorder customer_id,region
# Vacuum (lakehouses only)
fab table vacuum "Data.Workspace/LH.Lakehouse/Tables/temp_data" --retain_n_hours 48

Common Workflows

Semantic Model Management
bash
# Find models
fab ls "ws.Workspace" | grep ".SemanticModel"
# Get definition
fab get "ws.Workspace/Model.SemanticModel" -q definition
# Trigger refresh
fab api -A powerbi "groups/$WS_ID/datasets/$MODEL_ID/refreshes" -X post -i '{"type":"Full"}'
# Check refresh status
fab api -A powerbi "groups/$WS_ID/datasets/$MODEL_ID/refreshes?\$top=1"

Execute DAX:

bash
fab api -A powerbi "groups/$WS_ID/datasets/$MODEL_ID/executeQueries" -X post \
-i '{"queries":[{"query":"EVALUATE TOPN(5, '\''TableName'\'')"}]}'

DAX rules: EVALUATE required, single quotes around tables ('Sales'), qualify columns ('Sales'[Amount]).

For full details: semantic-models.md | querying-data.md

Report Operations
bash
# Get report definition
fab get "ws.Workspace/Report.Report" -q definition
# Export to local
fab export "ws.Workspace/Report.Report" -o /tmp/exports -f

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
61
Repository forks
12
7-day trend score
21

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 17 May 2026, 5 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/ruiromano/powerbi-agentic-plugins/fabric-cli/badge)](https://verified-skill.com/skills/ruiromano/powerbi-agentic-plugins/fabric-cli)

Something wrong with this skill or its page? Tell us.