Commands¶
Commands in fab
are organized into logical groups based on their functionality, making it easy to find and use the right command for your task.
Understanding CLI Commands¶
A CLI command in Fabric follows this general structure:
Where:
fab
is the base CLI commandcommand-group
is the group of related commands (like fs, acls, table)command
is the specific operation to performarguments
are required positional values needed by the commandparameters
are optional named options that modify the command behavior
Command Groups¶
Core Command Groups¶
File System Operations (fs)¶
File system (fs) commands provide a familiar interface for managing workspaces, items, and files using commands similar to traditional file system operations.
It supports both Unix-style and Windows-style command names for file system operations. You can use whichever style you're most familiar with - both versions will work the same way regardless of your operating system:
Unix Style | Windows Style | Description |
---|---|---|
mkdir |
mkdir |
Create resources |
ls |
dir |
List resources |
cp |
copy |
Copy resources |
mv |
move |
Move resources |
rm |
del |
Delete resources |
ln |
mklink |
Create shortcuts |
Supported Types:
- All workspace item types (e.g.,
.Notebook
,.Lakehouse
,.Warehouse
,.Report
, etc.) - OneLake storage sections (e.g.,
Files
,Tables
) - Some virtual item types for navigation (e.g.,
.Workspace
)
Available Commands:
Command | Description |
---|---|
assign |
Assign a resource to a workspace |
cd |
Change to the specified directory |
cp (copy) |
Copy an item or file |
export |
Export an item |
exists |
Check if a workspace, item, or file exists |
get |
Get a workspace or item property |
import |
Import an item (create/modify) |
ln (mklink) |
Create a shortcut |
ls (dir) |
List workspaces, items, and files |
mkdir (create) |
Create a new workspace, item, or directory |
mv (move) |
Move an item or file |
open |
Open a workspace or item in browser |
pwd |
Print the current working directory |
rm (del) |
Delete a workspace, item, or file |
set |
Set a workspace or item property |
start |
Start a resource |
stop |
Stop a resource |
unassign |
Unassign a resource from a workspace |
Table Management (table)¶
Commands for working with tables in lakehouses, including operations like loading data, optimizing tables, and managing schemas.
Jobs Management (job)¶
Manage and monitor various job operations, including starting, running, and scheduling tasks.
Security and Access Command Groups¶
Access Control List (acls)¶
Manage permissions and access control lists for workspaces and items.
Sensitivity Labels (label)¶
Work with sensitivity labels to protect and classify your data.
Configuration and Authentication Command Groups¶
Authentication (auth)¶
Handle authentication with Microsoft Fabric services.
Configuration (config)¶
Manage CLI configuration settings and preferences.
Additional Command Groups¶
API Operations (api)¶
Make authenticated API requests directly to Fabric services.
Global Parameters¶
The following parameters are available for all commands:
-h, --help
: Display help information for the command--output_format
: Specify the output format (text
orjson
).
Common Parameters¶
Most commands support a set of common parameters:
-f, --force
: Force operations without confirmation-o, --output
: Specify output file path-i, --input
: Specify input file path or value-q, --query
: Filter output using JMESPath queries
Getting Help¶
You can get help about any command using:
For detailed examples and usage patterns, see the individual command group pages linked above.