The Fabric command line interface in simple terms

Typically, you use a graphical user interface (or GUI) to interact with systems and software. However, many tools and vendors also provide a command line interface (or CLI) as well. A CLI is used from within a terminal, where you use commands instead of user interface buttons. It might seem “retro” to rely on text-based commands, but it has many advantages and benefits compared to using the GUI counterparts: 

  • CLIs facilitate automation and custom integrations, since you can use them programmatically. 
  • CLIs let you remotely access systems and platforms, like Microsoft Fabric. 
  • A CLI is not limited by a user interface, so CLI tools often have faster development, more regular releases, and more flexible operations and applications than their GUI counterparts. 
  • CLIs are significantly easier to use for AI agents than GUIs. 

Microsoft Fabric has a command line interface called the Fabric CLI (read here for a quickstart guide), which you can use to remotely access a Fabric tenant and its contents. The tool has been available since early 2025, and it provides easy access to the Fabric and Power BI APIs, among others. In this article, we give a simple, non-technical introduction to the Fabric CLI, how you can start using it, and what you might use it for.  

In future articles, we’ll explain how you can use it as part of automated process or integrated with AI tools. 

Introducing the Fabric CLI

Once you install the Fabric CLI, you use it in a terminal by entering fab followed by the specific command. It uses a file system-like structure (like your file explorer or finder) where the root is your tenant. There are common commands if you have ever interacted with a file system from your terminal before, such as fab cd to change directory, fab ls to list workspaces and items, and fab get to retrieve properties and fab set to change them. so forth. For a full list of commands, see this link. 

Here's a diagram to help you visualize the concepts: 

fabric-command-line-in-simple-terms-fig-1

The previous diagram illustrates a visual example of what it looks like when you use the Fabric CLI to navigate to the Sales-Dev workspace, then list the items in it, and get a specific property of the Sales semantic model. As you can see, workspaces are like folders, items are like files, and you can get and set item properties. There’s much more you can do with the Fabric CLI beyond this simple visualization, though, including working with files, folders, and tables in OneLake, and using the Power BI and Fabric APIs. For a full list of usage examples, see this link. 

Here’s what the Fabric CLI looks like, running in a standard macOS terminal: 

fabric-command-line-in-simple-terms-fig-2
As you can see, running some simple commands in the Fabric CLI can let you retrieve information from Fabric, remotely. However, you can also take actions in Fabric, including creating, updating, and deleting workspaces, items, and more. The following image shows you an example of creating a workspace in Fabric, and copying a report into that workspace, before deleting the new report and workspace afterward: 
fabric-command-line-in-simple-terms-fig-3
You can even use any of the Power BI and Fabric APIs, like the following example, which shows the use of an API to retrieve capacity details, and a more complex API to query a semantic model with DAX: 
fabric-command-line-in-simple-terms-fig-4
So, the Fabric CLI has many broad use-cases, including application by users, automated processes, and AI agents: 
fabric-command-line-in-simple-terms-fig-5
  • Users: You can use the Fabric CLI yourself as an easy way to remotely access and control Fabric and Power BI, without much technical complexity. This can greatly help your efficiency, and it works on macOS, Linux, and Windows. 
  • Automated processes: You can use the Fabric CLI in GitHub Actions or Azure DevOps Pipelines, and Fabric notebooks to automate processes for CI/CD. 
  • AI agents: Command-line AI agents like Claude Code, Gemini CLI,  Codex CLI, and others can use it instead of MCP Servers to get context or take many actions in a Fabric tenant. Combine this with other CLI tools (and MCP servers) such as the Tabular Editor CLI, VertiPaq Analyzer CLI, and GitHub or Azure DevOps CLIs, and your agent is well-equipped to get relevant context and take relevant actions to support semantic model development... 

The easiest way to use the Fabric CLI is from your local or virtual machine in a terminal. To get started, you just need to have Python installed, in your PATH environment variables, and then run pip install ms-fabric-cli. This allows you to use the Fabric CLI like the examples we showed above. 

The simple process flow for manually using the CLI is as follows: 

fabric-command-line-in-simple-terms-fig-6
In future articles, we will explain more helpful tips to automate the use of the Fabric CLI as part of DataOps processes, and also in the hands of specialized agents taught to use the CLI commands for specific scenarios and use-cases. 

Other helpful links

Here’s some references that you can check for more details and use-cases: 

In conclusion

The Fabric CLI is a very useful tool to facilitate retrieving information from and taking actions in Microsoft Fabric from a terminal. It’s easy to set up and use, and you can use it manually, automatically, or via an orchestrated or asynchronous AI agent. It’s incredibly powerful, and a much more convenient way to use the Power BI or Fabric APIs than most other approaches. In this article, we show simple examples of how to use it. In future articles, we’ll explain how to apply this in automation scenarios and agentic BI management and development. 

Related articles