fabric-cli
AGENTS.md172 starsChanged 9 months agoMITView on GitHub
This document provides guidance for AI agents assisting with the Microsoft Fabric CLI (fab) — a Python-based command-line interface for Microsoft Fabric. The Fabric CLI is a file-system-inspired command-line interface that lets users explore, automate, and script their Microsoft Fabric environment. Key characteristics: Repository: https://github.com/microsoft/fabric-cli All AI-related resources (skills, context, prompts, modes) are organized in the .ai-assets/ folder. See .ai-assets/README.md for a complete catalog of available resources. When assisting with code contributions to this repository (adding features, fixing bugs, writing…
- Installs packages
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository4 other files it gives its agents.
- .ai-assets/context/CLAUDE.mdCLAUDE.md
- .ai-assets/context/copilot-instructions.mdCopilot instructions
- fabric-cli-coreSkill
- fabric-cli-powerbiSkill
The file
We split this AGENTS.md into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
All AI-related resources (skills, context, prompts, modes) are organized in the .ai-assets/ folder.
- Very specific: line 38
When assisting with code contributions to this repository (adding features, fixing bugs, writing tests), refer to the contributor context …
- Distinctive: line 58
All PRs must follow this process:
- Distinctive: line 68
When reviewing or generating code, ensure:
- Distinctive: line 82
Always use structured error classes:
- Distinctive: line 100
All new functionality must include tests:
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md — AI Agent Guide for Microsoft Fabric CLI
This document provides guidance for AI agents assisting with the Microsoft Fabric CLI (fab) — a Python-based command-line interface for Microsoft Fabric.
About Microsoft Fabric CLI
The Fabric CLI is a file-system-inspired command-line interface that lets users explore, automate, and script their Microsoft Fabric environment. Key characteristics:
- Installation:
pip install ms-fabric-cli - Python versions: 3.10, 3.11, 3.12, 3.13
- Platforms: Windows, macOS, Linux
- Shells: PowerShell, Bash, Zsh, cmd
- Modes: Interactive (REPL) and command-line (scripting)
Repository: https://github.com/microsoft/fabric-cli
AI Assets
All AI-related resources (skills, context, prompts, modes) are organized in the .ai-assets/ folder. See .ai-assets/README.md for a complete catalog of available resources.
Key Resources
| Resource | URL |
| AI Assets | .ai-assets/README.md |
| Documentation | https://microsoft.github.io/fabric-cli/ |
| Command Reference | https://microsoft.github.io/fabric-cli/commands/ |
| Usage Examples | https://microsoft.github.io/fabric-cli/examples/ |
For AI Agents Helping Contributors (Developing the CLI)
When assisting with code contributions to this repository (adding features, fixing bugs, writing tests), refer to the contributor context in .ai-assets/context/.
Forking and Setting Up
Guide users through the contribution workflow:
- Fork the repository: https://github.com/microsoft/fabric-cli/fork
- Clone locally:
git clone https://github.com/<username>/fabric-cli.git cd fabric-cli - Set up development environment (dev container recommended)
- Create a feature branch:
git checkout -b feature/my-change
Contribution Process
All PRs must follow this process:
- Find or create an issue — Search GitHub Issues first
- Look for
help-wantedlabel — Required before starting work - Comment on the issue — Describe your planned approach and wait for acknowledgment
- Link PR to issue — Start PR description with
- Resolves #issue-number - Add changie entry — Run
changie newand select the appropriate change type
Code Standards to Enforce
When reviewing or generating code, ensure:
| Requirement | Details |
| Type hints | All functions must have proper type annotations |
| Formatting | Must pass black src/ tests/ |
| Type checking | Must pass mypy src/ tests/ --ignore-missing-imports |
| Naming | snake_case for functions/variables, PascalCase for classes |
| Imports | Grouped: stdlib → third-party → local |
| Copyright | All new files need Microsoft copyright header |
| Docstrings | Required for public functions |
Error Handling Pattern
Always use structured error classes:
from fabric_cli.errors.common import CommonErrors
from fabric_cli import fab_constant
# Good
raise FabricCLIError(
CommonErrors.invalid_path(path),
fab_constant.ERROR_INVALID_INPUT
)
# Bad — hardcoded message
raise FabricCLIError("Invalid path provided")Testing Requirements
All new functionality must include tests:
# Unit tests
python3 -m pytest tests/test_core tests/test_utils
# Integration tests (with VCR playback)
python3 -m pytest tests/test_commands --playbackRestricted Areas
Warn contributors that these areas require team involvement:
- Authentication module — Security implications require Fabric CLI team review
- Core infrastructure — Major architectural changes need team discussion
Quick Reference Links
- Repository: https://github.com/microsoft/fabric-cli
- Issues: https://github.com/microsoft/fabric-cli/issues
- Discussions: https://github.com/microsoft/fabric-cli/discussions
- Wiki (Engineering Guidelines): https://github.com/microsoft/fabric-cli/wiki
- Contributing Guide: https://github.com/microsoft/fabric-cli/blob/main/CONTRIBUTING.md
- Documentation: https://microsoft.github.io/fabric-cli/
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

