How v-alexmoraru/fabric-cli works
Microsoft Fabric CLI (fab) is a file-system-inspired terminal interface for exploring and managing Fabric resources. The main workflow is user command → CLI parsing and dispatch → context-aware resource operations → authenticated Fabric or OneLake APIs → formatted terminal output. Separate command families cover jobs, tables, API requests, authentication, configuration, and labels. The hierarchy and context layer resolve virtual paths into Fabric resources. Edges are limited to relationships explicit in the README or SOURCE INDEX; unsampled implementations and service calls are not inferred.
Main entry points: fab_api_client.py HTTP API client · fs Filesystem commands · main.py CLI entry · fab_api_onelake.py OneLake API
Components 31
CLI entry and commands
- CLI entry
src/fabric_cli/main.py - Command parsers
src/fabric_cli/parsers - Filesystem commands
src/fabric_cli/commands/fs - Auth commands
src/fabric_cli/commands/auth/fab_auth.py - Job commands
src/fabric_cli/commands/jobs/fab_jobs.py - Table commands
src/fabric_cli/commands/tables - API commands
src/fabric_cli/commands/api
Runtime and context
- Authentication
src/fabric_cli/core/fab_auth.py - Session context
src/fabric_cli/core/fab_context.py - Path resolution
src/fabric_cli/core/fab_handle_context.py - Resource hierarchy
src/fabric_cli/core/hiearchy/fab_element.py - Workspace model
src/fabric_cli/core/hiearchy/fab_workspace.py - Command registry
src/fabric_cli/core/fab_commands.py - Resource types
src/fabric_cli/core/fab_types.py
Fabric API clients
- HTTP API client
src/fabric_cli/client/fab_api_client.py - Item API
src/fabric_cli/client/fab_api_item.py - OneLake API
src/fabric_cli/client/fab_api_onelake.py
Resource operations
- Job operations
src/fabric_cli/client/fab_api_jobs.py - Table operations
src/fabric_cli/client/fab_api_tables.py - File storage helpers
src/fabric_cli/utils/fab_storage.py
Supporting capabilities
- Configuration
src/fabric_cli/core/fab_state_config.py - Memory cache
src/fabric_cli/utils/fab_mem_store.py - Error handling
src/fabric_cli/utils/fab_error_parser.py - Terminal output
src/fabric_cli/utils/fab_ui.py - CLI constants
src/fabric_cli/core/fab_constant.py - CLI exceptions
src/fabric_cli/core/fab_exceptions.py - Logging
src/fabric_cli/core/fab_logger.py - Core utilities
src/fabric_cli/utils/fab_util.py
Other components
- CLI user
- Microsoft Fabric
- OneLake
Connections 28
- CLI user → CLI entry: runs commands
- CLI entry → Command parsers: sets up
src/fabric_cli/main.py - Command parsers → Filesystem commands: dispatches
src/fabric_cli/parsers/fab_fs_parser.py - Command parsers → Job commands: dispatches
src/fabric_cli/parsers/fab_jobs_parser.py - CLI entry → Auth commands: invokes
src/fabric_cli/main.py - CLI entry → Command registry: uses
src/fabric_cli/main.py - Filesystem commands → HTTP API client: uses API client
- Filesystem commands → Path resolution: resolves paths
src/fabric_cli/commands/fs/fab_fs.py - Filesystem commands → Item API: manages items
src/fabric_cli/commands/fs/export/fab_fs_export_item.py - Filesystem commands → OneLake API: operates OneLake
- Auth commands → Authentication: manages login
src/fabric_cli/commands/auth/fab_auth.py - Job commands → Job operations: manages runs
- Table commands → Table operations: operates tables
src/fabric_cli/commands/tables/fab_tables_load.py - Table commands → OneLake API: reads files
src/fabric_cli/commands/tables/fab_tables_load.py - API commands → HTTP API client: makes requests
- HTTP API client → Authentication: uses credentials
src/fabric_cli/client/fab_api_client.py - HTTP API client → Configuration: reads settings
src/fabric_cli/client/fab_api_client.py - HTTP API client → Microsoft Fabric: sends requests
- OneLake API → OneLake: accesses data
- File storage helpers → OneLake API: uses API
src/fabric_cli/utils/fab_storage.py - Session context → Authentication: uses identity
src/fabric_cli/core/fab_context.py - Session context → Path resolution: resolves location
src/fabric_cli/core/fab_context.py - Path resolution → Memory cache: looks up workspaces
src/fabric_cli/core/fab_handle_context.py - Resource hierarchy → Workspace model: models resources
src/fabric_cli/core/hiearchy/fab_hiearchy.py - HTTP API client → Error handling: parses failures
src/fabric_cli/client/fab_api_client.py - HTTP API client → Logging: logs requests
src/fabric_cli/client/fab_api_client.py - Filesystem commands → Terminal output: prints results
src/fabric_cli/commands/fs/fab_fs.py - CLI entry → Configuration: loads settings
src/fabric_cli/main.py