fabric-cli-core
Original:🇺🇸 English
Translated
1 scriptsChecked / no sensitive code detected
Use Microsoft Fabric CLI (fab) to manage workspaces, semantic models, reports, notebooks, and Fabric resources. Activate when users mention fab, Fabric CLI, or need to automate Fabric operations.
9installs
Sourcemicrosoft/fabric-cli
Added on
NPX Install
npx skill4agent add microsoft/fabric-cli fabric-cli-coreTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Fabric CLI Core
This skill defines safe, consistent defaults for an AI agent helping users operate Microsoft Fabric via the Fabric CLI ().
fab1 - Fabric CLI mental model (paths and entities)
Automation Scripts
Ready-to-use Python scripts for core CLI tasks. Run any script with for full options.
--help| Script | Purpose | Usage |
|---|---|---|
| Verify CLI installation, auth status, and connectivity | |
Scripts are located in the folder of this skill.
scripts/Paths and Entities
- Treat Fabric as a filesystem-like hierarchy with consistent dot (.) entity suffixes in paths (e.g., ,
.Workspace,.Folder)..SemanticModel - The hierarchy structure is:
- Tenant: The top-level container for everything.
- Workspace: Personal or team workspace holding folders, items, and workspace-level elements.
- Folder: Container for organizing items within a workspace (supports ~10 levels of nesting).
- Item: Individual resource within a workspace or folder (e.g., Notebook, SemanticModel, Lakehouse).
- OneLakeItem: OneLake storage item residing within a Lakehouse (tables, files, etc.).
- Prefer and generate paths like:
/Workspace1.Workspace/Notebook1.Notebook/Workspace1.Workspace/FolderA.Folder/SemanticModel1.SemanticModel- (OneLakeItem)
/Workspace1.Workspace/FolderA.Folder/lh1.Lakehouse/Tables
- When a user provides an ambiguous identifier, ask for the full path (or infer with stated assumptions).
2 - Modes (interactive vs command line)
- Be explicit about which mode a user is in:
- Interactive mode behaves like a REPL and runs commands without the prefix.
fab - Command line mode runs one command per invocation and is best for scripts/automation.
- Interactive mode behaves like a REPL and runs commands without the
- The selected mode is preserved between sessions. If a user exits and logs back in, the CLI resumes in the same mode last used.
- When you provide instructions, show commands in command line mode unless the user says they're in interactive mode.
3 - Authentication (public-safe guidance)
- Prefer these auth patterns and do not invent new flows:
- Interactive user: (browser/WAM where supported).
fab auth login - Service principal (secret/cert): use environment variables / secure mechanisms; avoid embedding secrets in files.
- Service principal (federated credential): use the federated token environment variable () and do not persist the raw token.
FAB_SPN_FEDERATED_TOKEN - Managed identity: supported for Azure-hosted workloads; no credentials required.
- Interactive user:
- Never ask users to paste secrets into chat or print them back.
4 - Sensitive data handling (strict)
- Never log or output tokens, passwords, client secrets, or raw federated tokens.
- Validate all user inputs that could affect security:
- Paths: Sanitize file paths and API parameters.
- GUIDs: Validate resource identifiers before use.
- JSON: Validate JSON inputs for proper format.
- If a user shares sensitive strings, advise rotating/regenerating them and moving to secure storage.
5 - Hidden entities and discovery
- Hidden entities are special resources not normally visible, following a dot-prefixed naming convention (similar to UNIX hidden files).
- Tenant-level hidden entities (accessed from root):
- —
.capacities/fab ls .capacitiesfab get .capacities/<name>.Capacity - —
.gateways/fab ls .gatewaysfab get .gateways/<name>.Gateway - —
.connections/fab ls .connectionsfab get .connections/<name>.Connection - —
.domains/fab ls .domainsfab get .domains/<name>.Domain
- Workspace-level hidden entities (accessed within a workspace):
- —
.managedidentitiesfab ls ws1.Workspace/.managedidentities - —
.managedprivateendpointsfab ls ws1.Workspace/.managedprivateendpoints - —
.externaldatasharesfab ls ws1.Workspace/.externaldatashares - —
.sparkpoolsfab ls ws1.Workspace/.sparkpools
- To show hidden resources, recommend /
ls -a.ls --all
6 - Errors and troubleshooting guidance
- When describing failures, include:
- What the command was trying to do
- The likely cause
- The next actionable step
- If the CLI surfaces an error code/message, keep it intact and do not paraphrase away the key identifiers. (Fabric CLI emphasizes stable error codes/messages.)
- Include request IDs for API errors to aid debugging when available.
7 - Output conventions for the agent
- Default to concise, runnable steps.
- When recommending commands, include:
- Preconditions (auth, correct workspace/path)
- Expected result
- How to verify (e.g., follow-up /
fab ls)fab get
8 - Safety defaults
- Ask before suggesting commands that delete, overwrite, or change access/permissions.
- If the user explicitly confirms, proceed with a clear rollback note when possible.
9 - Platform and troubleshooting reference
- Supported platforms: Windows, Linux, macOS.
- Supported shells: zsh, bash, PowerShell, cmd (Windows command prompt).
- Python versions: 3.10, 3.11, 3.12, 3.13.
- CLI file storage (useful for troubleshooting):
- Config files are stored in :
~/.config/fab/- — encrypted auth token cache
cache.bin - — non-sensitive CLI settings
config.json - — non-sensitive auth info
auth.json - — path context for command-line mode sessions
context-<session_id>
- Debug logs are written to:
- Windows:
%AppData%/fabcli_debug.log - macOS:
~/Library/Logs/fabcli_debug.log - Linux:
~/.local/state/fabcli_debug.log
- Windows:
- Config files are stored in
10 - Critical operational rules
- First run: Always run to verify authentication before executing commands. If not authenticated, ask the user to run
fab auth status.fab auth login - Learn before executing: Always use and
fab --helpthe first time you use a command to understand its syntax.fab <command> --help - Start simple: Try the basic command alone first before piping or chaining.
fab - Non-interactive mode: Use in command-line mode when working with coding agents. Interactive mode doesn't work with automation.
fab - Force flag: Use when executing commands if the flag is available to run non-interactively (skips confirmation prompts).
-f - Verify before acting: If workspace or item name is unclear, ask the user first, then verify with or
fab lsbefore proceeding.fab exists - Permission errors: If a command is blocked by permissions, stop and ask the user for clarification; never try to circumvent it.
11 - Common item types
| Extension | Description |
|---|---|
| Workspace container |
| Folder within workspace |
| Power BI dataset/semantic model |
| Power BI report |
| Power BI dashboard |
| Fabric notebook |
| Lakehouse |
| Data warehouse |
| Data pipeline |
| Spark job definition |
| Real-time event stream |
| KQL database |
| ML model |
| ML experiment |
| Fabric capacity (hidden) |
| Data gateway (hidden) |
| Connection (hidden) |
Use to explore any item type.
fab desc .<ItemType>12 - Command references
For detailed command syntax and working examples, see:
- Quick Start Guide — Copy-paste examples for common tasks
- Full Command Reference — All commands with flags and patterns
- Semantic Models — TMDL, DAX queries, refresh, storage modes
- Notebooks — Job execution, parameters, scheduling
- Reports — Export, import, rebind to models
- Workspaces — Create, manage, permissions
- Querying Data — DAX and lakehouse table queries
- API Reference — Direct REST API access patterns
- Create Workspaces — Workspace creation workflows