π οΈ CLI Reference
π» CLI Reference
Complete reference for every FlowyML command, option, and environment variable.
βΆοΈ Run ποΈ Stacks π₯οΈ UI π Plugins
Overview
FlowyML provides a powerful CLI for managing stacks, components, and running pipelines without modifying code.
Installation
All tiers provide flowyml and python -m flowyml. Plain flowyml includes Studio and tracking. Install flowyml-light for a standalone local runner, or a provider extra such as flowyml[azure] for remote execution.
flowyml inspect examples/light_training.py:job
flowyml run examples/light_training.py:job --dry-run
flowyml run examples/light_training.py:job --tui
Both commands accept a project pipeline name, a Python file, or an explicit file.py:export or package.module:export. For local jobs, --inputs and --inputs-file accept JSON inputs. Use --cache-dir to choose where cached artifacts are stored or --no-cache to rerun every step.
Commands
flowyml init
Initialize a new FlowyML project.
Options:
| Flag | Short | Default | Description |
|---|---|---|---|
--output |
-o |
flowyml.yaml |
Output file path |
--template |
basic |
Project template (basic, ml, cv) |
|
--force |
false |
Overwrite existing directory |
Examples:
# Create flowyml.yaml with defaults
flowyml init
# Named project with ML template
flowyml init my-ml-project --template ml
# Custom output path
flowyml init --output config/flowyml.yaml
Output:
Creates a flowyml.yaml file with default configuration including:
- Local stack
- Basic resource presets
- Docker configuration
flowyml run
Run a named pipeline. For flowyml run train, FlowyML looks for pipelines/train.py, train.py, or pipelines/train_pipeline.py. The module exports create_pipeline() or a pipeline object.
| Option | Purpose |
|---|---|
--stack NAME |
Select a configured stack, a stack URI, or local |
--env NAME |
Use an environment from the project configuration |
--context KEY=VALUE, -c |
Pass a context parameter, repeatable |
--dry-run |
Validate the execution plan |
--follow, -f |
Follow remote output and sync the result before exiting |
--timeout SECONDS |
Limit local monitoring after submission when using --follow |
--retry N |
Configure the orchestrator's retry policy |
--debug |
Enable debug mode |
flowyml run train --stack production --dry-run
flowyml run train --stack azure-training --context dataset=sample --follow
flowyml runs
Find both local and remote executions by their full FlowyML run IDs. History commands read the recorded status from the default, project, and stack metadata stores. Enterprise audit records are included when available. Run flowyml sync RUN_ID to refresh a cloud run from its provider.
flowyml runs list --project research --pipeline train --status failed --limit 5
flowyml runs list --format json
flowyml runs inspect RUN_ID
flowyml runs stop RUN_ID
flowyml runs export RUN_ID --format json -o run.json
flowyml runs inspect nightly --project research
flowyml runs export nightly --project research --format json -o run.json
Inspection and export include step outcomes, metric observations, and artifact references. When an audit also exists, the document retains its audit fields and includes the runtime record under execution. Both commands accept --format json or --format yaml.
runs stop uses the full FlowyML run ID and the metadata store that owns it. A local Python worker checks that store even when the dashboard is offline. For cloud jobs, the command prints stopping when the provider accepts the request. Use flowyml sync RUN_ID --wait to see the final outcome.
flowyml experiment
List experiments from the local metadata stores or compare recorded metrics, parameters and durations. For comparisons across projects, supply one --project per run ID in the same order.
flowyml experiment list --project research --pipeline train
flowyml experiment compare baseline candidate --project research
flowyml experiment compare nightly nightly --project research --project production
flowyml db
Apply the bundled migrations to the project's metadata database. The default path is .flowyml/metadata.db. Set FLOWYML_DATABASE_URL to target a specific SQLite or PostgreSQL database.
flowyml stack
Manage infrastructure stacks.
flowyml stack list
List all configured stacks.
Options:
--config, -c TEXT: Path to flowyml.yaml
Examples:
Output:
flowyml stack show
Show detailed stack configuration.
Arguments:
STACK_NAME: Name of stack to show
Options:
--config, -c TEXT: Path to flowyml.yaml
Examples:
# Show production stack details
flowyml stack show production
# With custom config
flowyml stack show staging --config staging.yaml
Output:
Stack: production
type: gcp
project_id: my-ml-project
region: us-central1
artifact_store:
type: gcs
bucket: ml-artifacts-prod
flowyml stack set-default
Set the default stack.
Arguments:
STACK_NAME: Name of stack to set as default
Options:
--config, -c TEXT: Path to flowyml.yaml
Examples:
# Set production as default
flowyml stack set-default production
# With custom config
flowyml stack set-default local --config dev.yaml
flowyml component
Manage stack components and plugins.
flowyml component list
List all registered components.
Options:
--type, -t TEXT: Filter by component type (orchestrators, artifact_stores, container_registries)
Examples:
# List all components
flowyml component list
# List only orchestrators
flowyml component list --type orchestrators
# List only artifact stores
flowyml component list --type artifact_stores
Output:
π¦ Registered Components:
Orchestrators:
β’ vertex_ai
β’ airflow
Artifact_stores:
β’ local
β’ gcs
β’ minio
flowyml component load
Load a component from various sources.
Arguments:
SOURCE: Component source (see examples)
Options:
--name, -n TEXT: Custom name for component
Examples:
# From Python module
flowyml component load my_flowyml_components
# From file with specific class
flowyml component load /path/to/custom.py:MyOrchestrator
# From ZenML
flowyml component load zenml:zenml.integrations.kubernetes.orchestrators.KubernetesOrchestrator
# With custom name
flowyml component load my_components --name custom
Source Formats:
module.pathβ Load from Python module/path/to/file.py:ClassNameβ Load from filezenml:zenml.path.Classβ Load from ZenML
flowyml docker
Manage Docker images for remote pipeline execution.
flowyml docker build
Build a Docker image from the current project.
Options:
| Flag | Short | Default | Description |
|---|---|---|---|
--tag |
-t |
content-hash | Image tag |
--stack |
-s |
β | Use Docker config from an enterprise stack |
--push |
false |
Push to registry after build | |
--registry |
β | Target container registry URI | |
--platform |
linux/amd64 |
Target platform | |
--gpu / --no-gpu |
false |
Enable GPU/CUDA support | |
--cuda |
β | CUDA version (e.g. 12.4) |
|
--deps |
auto |
Dependency manager: auto, pip, uv, poetry, conda, pipenv |
|
--base-image |
β | Base Docker image | |
--dry-run |
false |
Generate Dockerfile only, don't build | |
--no-cache |
false |
Disable BuildKit cache | |
--context |
. |
Build context directory |
Examples:
# Auto-detect deps, build with content-hash tag
flowyml docker build
# Build with GPU, push to ACR
flowyml docker build --gpu --push --registry myregistry.azurecr.io
# Build using enterprise stack config
flowyml docker build --stack aml_gpu_large --push
# Dry-run: show generated Dockerfile
flowyml docker build --deps poetry --dry-run
# Force uv as dependency manager
flowyml docker build --deps uv --no-cache
flowyml docker push
Push a Docker image to a container registry.
Arguments:
IMAGE_TAG: The local image tag to push
Options:
| Flag | Short | Default | Description |
|---|---|---|---|
--registry |
-r |
β | Target registry URI (re-tags if needed) |
Examples:
# Push as-is (tag must include registry prefix)
flowyml docker push myregistry.azurecr.io/my-pipeline:abc123
# Re-tag and push to a different registry
flowyml docker push my-pipeline:abc123 --registry myregistry.azurecr.io
flowyml docker generate
Generate a Dockerfile without building.
Options:
| Flag | Short | Default | Description |
|---|---|---|---|
--context |
. |
Build context directory | |
--gpu / --no-gpu |
false |
Enable GPU/CUDA | |
--cuda |
β | CUDA version | |
--deps |
auto |
Dependency manager | |
--output |
-o |
stdout | Write Dockerfile to a file |
--stack |
-s |
β | Use config from enterprise stack |
Examples:
# Print generated Dockerfile to stdout
flowyml docker generate
# Generate with GPU and poetry, save to file
flowyml docker generate --gpu --deps poetry -o Dockerfile.flowyml
# Use enterprise stack config
flowyml docker generate --stack aml_gpu_large -o Dockerfile
flowyml docker inspect
Inspect the auto-detected Docker configuration for the current project.
Options:
| Flag | Short | Default | Description |
|---|---|---|---|
--context |
. |
Project directory to inspect | |
--stack |
-s |
β | Show config from enterprise stack |
Examples:
# Inspect current project
flowyml docker inspect
# Inspect enterprise stack config
flowyml docker inspect --stack aml_gpu_large
Output:
Auto-detected Docker config
Build context : /Users/user/my-project
Base image : python:3.11-slim
Dep manager : uv-lock
GPU enabled : False
Multi-stage : True
BuildKit cache : True
Platform : linux/amd64
Tag strategy : content-hash
Tag preview : flowyml:ab3f8c21
Auto-build : True
Auto-push : True
Detected project files:
β pyproject.toml (1,234 bytes)
β uv.lock (45,678 bytes)
β requirements.txt (256 bytes)
flowyml docker login
Login to a container registry.
Arguments:
REGISTRY: Registry URL (e.g.myregistry.azurecr.io)
Options:
| Flag | Short | Default | Description |
|---|---|---|---|
--username |
-u |
β | Registry username |
--password-stdin |
false |
Read password from stdin |
Examples:
# Interactive login
flowyml docker login myregistry.azurecr.io -u admin
# Pipe token from env
echo $TOKEN | flowyml docker login docker.io -u myuser --password-stdin
flowyml deploy
Package a registered model and deploy it to a target (local Docker, Kubernetes, or OpenShift). See the Model Serving & Deployment guide.
Arguments:
MODEL: Registered model name.
Options:
| Flag | Default | Description |
|---|---|---|
--name |
<model>-endpoint |
Deployment name |
--version |
β | Explicit model version to deploy |
--stage |
β | Resolve version from a registry stage (e.g. production) |
--runtime |
fastapi |
fastapi, triton, tensorflow_serving, torchserve |
--target |
local_docker |
local_docker, kubernetes, openshift |
--namespace |
β | Kubernetes/OpenShift namespace |
--route-host |
β | External host for the Route/Ingress |
--registry |
β | Container registry to push the serving image to |
--replicas |
1 |
Number of replicas |
--port |
8080 |
Service port |
--cpu |
500m |
CPU request |
--memory |
1Gi |
Memory request |
--gpu |
0 |
Number of GPUs |
--env |
β | Environment variable KEY=VALUE (repeatable) |
--spec |
β | Load a DeploymentSpec from a YAML file |
--dry-run |
false |
Render manifests without applying (k8s/openshift) |
Examples:
# Deploy the production model to OpenShift
flowyml deploy churn --stage production --runtime fastapi --target openshift \
--namespace ml-prod --route-host churn.apps.example.com \
--registry registry.apps.example.com/ml
# Deploy a specific version to local Docker with Triton
flowyml deploy fraud --version v7 --runtime triton --target local_docker
# Render GitOps manifests without a cluster
flowyml deploy churn --target kubernetes --dry-run > k8s.yaml
flowyml serve
Serve a registered model locally with an in-process FastAPI server β no Docker required. Great for development and quick checks.
Options:
| Flag | Default | Description |
|---|---|---|
--version |
β | Explicit model version |
--stage |
β | Resolve version from a registry stage |
--port |
8080 |
Local port to bind |
--host |
127.0.0.1 |
Host to bind |
Examples:
flowyml serve churn --stage production
curl -X POST http://127.0.0.1:8080/predict -d '{"inputs": [[0.1, 0.9, 1.2]]}'
flowyml deployment
Manage running deployments.
flowyml deployment list
List recorded deployments.
flowyml deployment status
Show live status of a deployment.
flowyml deployment predict
Send a prediction request to a deployment.
flowyml deployment delete
Tear down a deployment.
flowyml ui
Manage the FlowyML UI server.
flowyml ui start
Start the UI dashboard server.
Options:
| Flag | Short | Default | Description |
|---|---|---|---|
--port |
-p |
8080 |
Port for the frontend |
--backend-port |
8000 |
Port for the backend API | |
--host |
127.0.0.1 |
Host to bind to | |
--daemon |
-d |
false |
Run in background (daemon mode) |
Examples:
# Start with defaults
flowyml ui start
# Custom port, daemon mode
flowyml ui start --port 3000 --daemon
# Bind to all interfaces (for remote access)
flowyml ui start --host 0.0.0.0
flowyml ui stop
Stop the running UI server.
flowyml ui status
Check if the UI server is running.
Output:
π FlowyML UI is running
Frontend: http://localhost:8080
Backend: http://localhost:8000
PID: 12345
Uptime: 2h 15m
flowyml cache
Manage the execution cache.
flowyml cache clear
Clear cached step results.
Options:
| Flag | Default | Description |
|---|---|---|
--pipeline |
β | Clear cache only for a specific pipeline |
--days |
β | Clear cache entries older than N days |
--all |
false |
Clear entire cache without confirmation |
Examples:
# Clear all cache (with confirmation prompt)
flowyml cache clear
# Clear cache for a specific pipeline
flowyml cache clear --pipeline training_pipeline
# Clear entries older than 7 days
flowyml cache clear --days 7
flowyml config
View or modify FlowyML configuration.
flowyml config list
List all current configuration values.
Output:
flowyml config set
Set a configuration value.
Examples:
# Change UI port
flowyml config set ui.port 3000
# Set log level
flowyml config set log.level DEBUG
# Disable caching globally
flowyml config set cache.enabled false
flowyml schedule
Manage scheduled pipeline runs.
flowyml schedule list
List all active schedules.
Output:
Active Schedules:
β’ nightly_retrain 0 2 * * * next: 2025-01-15 02:00 UTC
β’ weekly_report 0 9 * * 1 next: 2025-01-20 09:00 UTC
flowyml schedule add
Register a new schedule.
Options:
| Flag | Default | Description |
|---|---|---|
--cron |
required | Cron expression (5-field) |
--stack |
default stack | Stack to use |
--name |
β | Human-readable schedule name |
--context |
β | Context variables, repeatable |
Examples:
# Retrain nightly at 2 AM
flowyml schedule add train.py --cron "0 2 * * *" --name nightly_retrain
# Weekly report on Mondays at 9 AM on production
flowyml schedule add report.py --cron "0 9 * * 1" --stack production
flowyml schedule remove
Remove an active schedule.
flowyml plugin
Manage FlowyML plugins.
flowyml plugin list
List installed plugins.
Output:
Installed Plugins:
β’ flowyml-gcp v1.2.0 (artifact_store, orchestrator)
β’ flowyml-mlflow v0.5.1 (metadata_store)
β’ flowyml-slack v0.3.0 (notifier)
flowyml plugin install
Install a plugin from PyPI or a local path.
Examples:
# From PyPI
flowyml plugin install flowyml-gcp
# From local path
flowyml plugin install ./my-custom-plugin
# Specific version
flowyml plugin install flowyml-mlflow==0.5.1
flowyml plugin remove
Uninstall a plugin.
Global Options
All commands support:
--help: Show help message--version: Show FlowyML version--verbose, -v: Increase output verbosity
Configuration Files
Search Order
FlowyML searches for configuration in this order:
--configflag valueflowyml.yaml(current directory)flowyml.yml.flowyml/config.yaml.flowyml/config.yml
Environment Variables
FlowyML automatically expands environment variables in configuration:
${VAR_NAME}β Required variable (fails if not set)$VAR_NAMEβ Required variable${VAR_NAME:-default}β With default value
All FlowyML-specific environment variables use the FLOWYML_ prefix:
| Variable | Default | Description |
|---|---|---|
FLOWYML_HOME |
~/.flowyml |
Path to the FlowyML home directory |
FLOWYML_ENV |
dev |
Environment name (dev, staging, prod) |
FLOWYML_UI_PORT |
8080 |
Default port for the UI |
FLOWYML_LOG_LEVEL |
INFO |
Logging level (DEBUG, INFO, WARNING, ERROR) |
FLOWYML_CACHE_DIR |
~/.flowyml/cache |
Cache storage directory |
FLOWYML_CONFIG |
flowyml.yaml |
Default config file path |
Examples
Development Workflow
# 1. Initialize project
flowyml init
# 2. Edit flowyml.yaml
vim flowyml.yaml
# 3. List available stacks
flowyml stack list
# 4. Run pipeline locally
flowyml run pipeline.py
# 5. Test on staging
flowyml run pipeline.py --stack staging --dry-run
# 6. Deploy to production
flowyml run pipeline.py --stack production --resources gpu_training
Multi-Environment Deployment
# Development
flowyml run pipeline.py --config dev.yaml
# Staging
flowyml run pipeline.py --config staging.yaml --stack staging
# Production
flowyml run pipeline.py --config prod.yaml --stack production
Custom Components
# 1. List current components
flowyml component list
# 2. Load custom component
flowyml component load my_custom_components
# 3. Verify it's loaded
flowyml component list
# 4. Use in pipeline
flowyml run pipeline.py --stack custom_stack
GPU Training
# Train with single GPU
flowyml run train.py --resources gpu_small
# Train with multiple GPUs
flowyml run train.py --resources gpu_large
# Large-scale training with A100s
flowyml run train.py \
--stack production \
--resources gpu_xlarge \
--context batch_size=512 \
--context epochs=100
Debugging
# Dry run to see configuration
flowyml run pipeline.py --stack production --dry-run
# Show stack details
flowyml stack show production
# Validate configuration
python -c "from flowyml.utils.stack_config import load_config; load_config().load()"
Exit Codes
| Code | Meaning |
|---|---|
0 |
Success |
1 |
General error |
2 |
Configuration error |
3 |
Pipeline execution error |
Shell Completion
Tips & Tricks
Aliases
# .bashrc or .zshrc
alias fml='flowyml'
alias fml-run='flowyml run'
alias fml-stack='flowyml stack'
alias fml-ui='flowyml ui'
# Usage
fml-run pipeline.py -s production
fml-stack list
fml-ui start
Default Stack
Set in flowyml.yaml:
Then run without specifying stack:
Environment-Specific Aliases
# Development
alias fml-dev='flowyml run --config dev.yaml'
# Staging
alias fml-stage='flowyml run --config staging.yaml --stack staging'
# Production
alias fml-prod='flowyml run --config prod.yaml --stack production'
# Usage
fml-dev pipeline.py
fml-stage pipeline.py
fml-prod pipeline.py --resources gpu_large
CI/CD Integration
# .github/workflows/ml-pipeline.yml
name: ML Pipeline
on:
push:
branches: [main]
jobs:
train:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install "flowyml[gcp]"
- name: Run pipeline
env:
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
GCP_BUCKET: ${{ secrets.GCP_BUCKET }}
GCP_SERVICE_ACCOUNT: ${{ secrets.GCP_SERVICE_ACCOUNT }}
run: |
flowyml run training_pipeline.py \
--stack production \
--resources gpu_training \
--context experiment_name=github-${{ github.run_id }}
Troubleshooting
Command Not Found
Configuration Not Found
# Specify custom path
flowyml run pipeline.py --config /full/path/to/flowyml.yaml
# Check current directory
pwd
ls -la flowyml.yaml
Component Not Found
# List what's registered
flowyml component list
# Load explicitly
flowyml component load my_components
# Check Python path
python -c "import my_components"
Stack Validation Fails
# Show stack configuration
flowyml stack show STACK_NAME
# Dry run
flowyml run pipeline.py --stack STACK_NAME --dry-run
See Also
π What's Next?
π οΈ CLI Quick Start
5-minute guided tutorial from init to running your first pipeline.
βοΈ Configuration Guide
Deep dive into flowyml.yaml, stacks, and resource presets.
π Components Guide
Build and register custom orchestrators, artifact stores, and plugins.