Workspaces
Workspaces organize your flow files and executables into logical projects. Think of them as containers for related automation.
Workspace Management
Adding Workspaces
Register any directory as a workspace:
# Create workspace in current directory
flow workspace add my-project . --set
# Basic registration in specific directory
flow workspace add my-project /path/to/project
# Register and switch to it
flow workspace add my-project /path/to/project --setWhen you add a workspace, flow creates a flow.yaml configuration file in the root directory if one doesn't exist.
Switching Workspaces
Change your current workspace:
# Switch to a workspace
flow workspace switch my-project
# Switch with fixed mode (see workspace modes below)
flow workspace switch my-project --fixedListing and Viewing
Explore your registered workspaces:
# List all workspaces
flow workspace list
# List workspaces with specific tags
flow workspace list --tag production
# View current workspace details
flow workspace get
# View specific workspace
flow workspace get my-projectRemoving Workspaces
Unregister a workspace:
# Remove workspace registration
flow workspace remove old-projectNOTE
Removing a workspace only unlinks it from flow - your files and directories remain unchanged.
Workspace Configuration
Configure workspace behavior in the flow.yaml file:
# flow.yaml
displayName: "API Service"
description: "REST API and deployment automation"
descriptionFile: README.md
tags: ["api", "production", "backend"]
# Customize verb aliases
verbAliases:
run: ["start", "exec"]
build: ["compile", "make"]
# Set to {} to disable all aliases
# Environment variables to load for all executables in this workspace
envFiles:
- .env
- .env.local
# Control executable discovery
executables:
included: ["api/", "scripts/", "deploy/"]
excluded: ["node_modules/", ".git/", "tmp/"]Configuration Options
Display and Documentation:
displayName: Human-readable name for the workspacedescription: Markdown description shown in the UIdescriptionFile: Path to markdown file with workspace documentationtags: Labels for filtering and categorization
Executable Discovery:
included: Directories to search for flow filesexcluded: Directories to skip during discovery
Behavior Customization:
verbAliases: Customize which verb synonyms are availableenvFiles: List of environment files to load for all executables (the root.envis loaded by default)
Complete reference: See the workspace configuration schema for all available options.
Workspace Modes
Control how flow determines your current workspace:
Dynamic Mode (Default)
flow automatically switches to the workspace containing your current directory:
# Configure dynamic mode
flow config set workspace-mode dynamic
# Now flow automatically uses the right workspace
cd ~/code/api-service # Uses api-service workspace
cd ~/code/frontend # Uses frontend workspaceFixed Mode
flow always uses the workspace you've explicitly set:
# Configure fixed mode
flow config set workspace-mode fixed
# Set the fixed workspace
flow workspace switch my-project
# Now flow always uses my-project, regardless of directoryMulti-Workspace Workflows
Cross-Workspace References
Reference executables from other workspaces (requires visibility: public):
executables:
- verb: deploy
name: full-stack
serial:
execs:
- ref: build frontend/app
- ref: build backend/api
- ref: deploy infrastructure/k8s:servicesShared Workspaces
Create workspaces for shared tools and utilities:
# Create shared workspace
flow workspace add shared-tools ~/shared
# Reference from other workspaces
flow send shared-tools/slack:notification "Deployment complete"What's Next?
Now that you can organize your automation with workspaces:
- Define your tasks → Executables
- Build sophisticated workflows → Advanced workflows
- Customize your interface → Interactive UI

