Overview

CommandDescription
awf initInitialize AWF in current directory
awf init --globalInitialize global prompts and scripts directories
awf run <workflow>Execute a workflow
awf resume [workflow-id]Resume an interrupted workflow
awf listList available workflows
awf list promptsList available prompt files
awf status <id>Show execution status
awf validate <workflow>Validate workflow syntax
awf diagram <workflow>Generate workflow diagram (DOT format)
awf error [code]Look up error code documentation
awf historyShow workflow execution history
awf plugin listList installed plugins
awf plugin enable <name>Enable a plugin
awf plugin disable <name>Disable a plugin
awf config showDisplay project configuration
awf versionShow version info
awf completion <shell>Generate shell autocompletion

Global Flags

These flags work with all commands:

FlagDescription
--verbose, -vEnable verbose output
--quiet, -qSuppress non-error output
--no-colorDisable colored output
--no-hintsDisable error hint suggestions
--format, -fOutput format (text, json, table, quiet)
--configPath to config file
--storagePath to storage directory
--log-levelLog level (debug, info, warn, error)

Output Formats

FormatDescriptionUse case
textHuman-readable with colors (default)Interactive terminal
jsonStructured JSONScripting, pipes, CI/CD
tableAligned columns with headersLists, reports
quietMinimal output (IDs, exit codes only)Silent scripts
# JSON output for scripting
awf list -f json
awf status abc123 -f json

# Quiet mode for pipelines
WORKFLOW_ID=$(awf run deploy -f quiet)
awf status $WORKFLOW_ID -f quiet

awf init

Initialize AWF in the current directory or global prompts and scripts directories.

awf init [flags]

Flags

FlagDescription
--forceOverwrite existing configuration files
--globalInitialize global prompts and scripts directories at $XDG_CONFIG_HOME/awf/

Examples

# Initialize a new project (local)
awf init

# Reinitialize (recreate config and example workflow)
awf init --force

# Initialize global prompts directory
awf init --global

Created Structure (Local)

.awf.yaml              # Configuration file
.awf/
├── config.yaml        # Project configuration (inputs pre-population)
├── workflows/
│   └── example.yaml   # Sample workflow
├── prompts/
│   └── example.md     # Example prompt file
├── scripts/
│   └── example.sh     # Example script file (executable)
├── templates/         # Reusable workflow templates
└── storage/
    ├── states/        # State persistence
    └── logs/          # Log files

See Project Configuration for details on .awf/config.yaml.

Created Structure (Global)

$XDG_CONFIG_HOME/awf/
├── prompts/
│   └── example.md     # Example prompt file
└── scripts/
    └── example.sh     # Example script file (executable)

awf run

Execute a workflow.

⚠️ Security Warning: This command executes arbitrary shell commands on your system. Only run workflows from trusted sources. Use --dry-run or --interactive to audit execution plans from untrusted workflows.

awf run <workflow> [flags]

Flags

FlagDescription
--help, -hShow workflow-specific help with input parameters
--input, -iInput parameter (key=value), can be repeated
--output, -oOutput mode: silent (default), streaming, buffered
--step, -sExecute only a specific step from the workflow
--mock, -mMock state values for single step execution (key=value)
--dry-runShow execution plan without running commands
--interactiveEnable step-by-step mode with prompts
--breakpoint, -bPause only at specific steps (requires –interactive)

Output Modes

ModeDescription
silentNo command output displayed (default)
streamingReal-time output with [OUT]/[ERR] prefixes
bufferedShow output after each step completes

Examples

# Basic execution
awf run deploy

# With inputs
awf run deploy --input env=prod --input version=1.2.3

# Interactive input collection (prompted for missing required inputs)
awf run deploy
# Prompts: Enter value for 'env' (string, required): _

# With streaming output
awf run deploy -o streaming

# Dry run to see execution plan
awf run deploy --dry-run

# Interactive step-by-step
awf run deploy --interactive

# Pause only at specific steps
awf run deploy --interactive --breakpoint build,deploy

# Execute single step with mocked dependencies
awf run deploy --step deploy_step --mock states.build.Output="build-123"

# View workflow help with input parameters
awf run deploy --help

Interactive Input Collection

When required workflow inputs are missing and stdin is connected to a terminal, AWF automatically prompts for missing values:

Behavior:

  • Terminal environment: Prompts interactively for each missing required input
  • Non-terminal environment (pipes, scripts): Returns error with message to use --input flags
  • All inputs provided: Executes immediately without prompts

Prompt display:

  • Input name, type, and required/optional status
  • Description and help text from workflow definition
  • Enum options as numbered list (1-9) for constrained inputs
  • Default value shown for optional inputs

Validation:

  • Type checking (string, integer, boolean)
  • Enum constraint validation
  • Pattern matching (regex)
  • Immediate error feedback with retry on invalid input
  • Empty input accepted for optional parameters (uses default)

See Interactive Input Collection Guide for detailed examples.

Workflow-Specific Help

View input parameters and details for a specific workflow before running it:

awf run <workflow> --help

This displays:

  • Workflow description (if defined)
  • All input parameters with their types (string, integer, boolean)
  • Required/optional status for each input
  • Default values for optional inputs
  • Input descriptions

Example Output

Execute a workflow by name with optional input parameters.

Description: Deploy application to specified environment

Input Parameters:
  NAME          TYPE      REQUIRED    DEFAULT       DESCRIPTION
  env           string    yes         -             Target environment (dev, staging, prod)
  version       string    yes         -             Version tag to deploy
  dry_run       boolean   no          false         Run deployment checks without applying
  timeout       integer   no          300           Deployment timeout in seconds

Usage:
  awf run deploy [flags]

Flags:
  -h, --help              help for run
  -i, --input strings     Input parameter (key=value)
  ...

Help for Non-Existent Workflow

awf run unknown-workflow --help
# Error: workflow "unknown-workflow" not found
# exit code 1

Interactive Input Collection

When you run a workflow with missing required inputs from a terminal, AWF automatically prompts you for each missing value instead of failing immediately.

How It Works

  1. Detection: AWF detects missing required inputs not provided via --input flags
  2. Terminal Check: If stdin is connected to a terminal, AWF enters interactive mode
  3. Prompting: You are prompted for each missing required input in order
  4. Validation: Invalid input values are rejected with error messages; you can retry
  5. Execution: Once all required inputs are provided, the workflow executes

Examples

Without Interactive Input Collection (Non-Interactive Context):

# In a script or piped context:
awf run deploy < /dev/null
# Error: required input "env" not provided
# exit code 1

With Interactive Input Collection (Terminal):

# From your terminal:
awf run deploy

# Output:
# env (string, required):
# > prod
#
# version (string, required):
# > 1.2.3
#
# Workflow started...

Enum Constraints

When an input has enum constraints, AWF displays numbered options:

awf run deploy

# Output:
# env (string, required):
# Available options:
#   1) dev
#   2) staging
#   3) prod
# Select option (1-3):
# > 2
#
# Workflow started...

Optional Inputs

Optional inputs can be skipped by pressing Enter without providing a value:

awf run deploy

# Output:
# env (string, required):
# > prod
#
# timeout (integer, optional, default: 300):
# >
#
# Using default value for timeout: 300
# Workflow started...

When Interactive Mode Is NOT Available

Interactive input collection requires:

  • ✅ Running in a terminal (stdin connected to TTY)
  • ✅ Workflow has required inputs
  • Not available in scripts (< file, pipes |)
  • Not available in CI/CD pipelines
  • Not available with --input providing all required values

In non-interactive contexts, you must provide all required inputs via --input flags:

# Provide all required inputs explicitly
awf run deploy --input env=prod --input version=1.2.3

# Or in a script
awf run deploy --input env=prod --input version=1.2.3 < /dev/null

Interactive Mode Actions

When running with --interactive, you can choose at each step:

ActionKeyDescription
ContinuecExecute the current step
SkipsSkip this step and continue
AbortaStop workflow execution
InspectiShow step details
EditeModify step parameters
RetryrRetry the last step

awf resume

Resume an interrupted workflow.

awf resume [workflow-id] [flags]

Flags

FlagDescription
--list, -lList resumable workflows
--input, -iOverride input parameter on resume (key=value)
--output, -oOutput mode: silent (default), streaming, buffered

Examples

# List all resumable (interrupted) workflows
awf resume --list

# Resume a specific workflow
awf resume abc123-def456

# Resume with input override
awf resume abc123-def456 --input max_tokens=5000

awf list

List available workflows.

awf list [flags]

Subcommands

SubcommandDescription
promptsList available prompt files

Examples

# List all workflows
awf list

# JSON output
awf list -f json

# Table format
awf list -f table

awf list prompts

List available prompt files from local and global directories.

awf list prompts [flags]

Description

Displays all prompt files discovered from:

  1. .awf/prompts/ (local project)
  2. $XDG_CONFIG_HOME/awf/prompts/ (global, default: ~/.config/awf/prompts/)

Local prompts override global prompts with the same name. The output shows the source (local/global) for each prompt.

Examples

# List all prompts
awf list prompts

# JSON output
awf list prompts -f json

# Table format
awf list prompts -f table

Output Fields

FieldDescription
NameRelative path from prompts directory
SourceOrigin: local or global
PathAbsolute file path
SizeFile size in bytes
ModTimeLast modification time

Using Prompts

Reference prompts in workflow inputs using the @prompts/ prefix:

awf run my-workflow --input prompt=@prompts/system.md
awf run ai-task --input context=@prompts/ai/agents/analyzer.md

The @prompts/ prefix searches local directory first, then global.


awf status

Show execution status of a workflow.

awf status <workflow-id> [flags]

Examples

# Check status
awf status abc123-def456

# JSON output for scripting
awf status abc123-def456 -f json

awf validate

Validate workflow syntax without executing.

awf validate <workflow> [flags]

Validates

  • YAML syntax
  • State references (no missing states)
  • Transition graph (no cycles, no unreachable states)
  • Terminal states exist
  • Template references valid
  • Input definitions valid
  • Parallel strategy valid

Examples

# Validate a workflow
awf validate deploy

# Validate with verbose output
awf validate deploy -v

awf diagram

Generate a visual diagram of a workflow in DOT format (Graphviz).

awf diagram <workflow> [flags]

Flags

FlagDescription
--output, -oOutput file path (format detected from extension: .dot, .png, .svg, .pdf)
--directionGraph layout direction: TB (top-bottom, default), LR (left-right), BT, RL
--highlightStep name to visually emphasize

Output Formats

ExtensionDescriptionRequires
.dotDOT source formatNothing
.pngPNG imageGraphviz
.svgSVG vector imageGraphviz
.pdfPDF documentGraphviz

Without --output, DOT format is printed to stdout.

Step Shapes

Each step type renders with a distinct shape:

Step TypeShapeDescription
commandBoxStandard command execution
parallelDiamondParallel branch point
terminalOvalWorkflow end (doubleoval for failure)
for_eachHexagonLoop iteration
whileHexagonConditional loop
operationBox3DPlugin operation
call_workflowFolderSub-workflow invocation

Edge Styles

TransitionStyle
on_successSolid line
on_failureDashed red line

Examples

# Output DOT to stdout
awf diagram deploy

# Pipe to graphviz
awf diagram deploy | dot -Tpng -o workflow.png

# Direct image export (requires graphviz)
awf diagram deploy --output workflow.png

# Left-to-right layout
awf diagram deploy --direction LR

# Highlight a specific step
awf diagram deploy --highlight build_step

# Save DOT file
awf diagram deploy --output workflow.dot

# Combined flags
awf diagram deploy -o diagram.svg --direction LR --highlight deploy

Graphviz Installation

For image export (PNG, SVG, PDF), install Graphviz:

# macOS
brew install graphviz

# Ubuntu/Debian
apt install graphviz

# Fedora
dnf install graphviz

DOT format output works without Graphviz.


awf error

Look up error code documentation and display detailed information.

awf error [code] [flags]

Arguments

ArgumentDescription
codeError code or prefix to look up (optional)

Description

Without arguments, lists all available error codes with descriptions and resolutions. With a code argument, displays detailed information for that specific error code. Supports prefix matching to show all codes in a category.

Error codes follow a three-level hierarchy: CATEGORY.SUBCATEGORY.SPECIFIC

Examples

# List all error codes
awf error

# Look up a specific error code
awf error USER.INPUT.MISSING_FILE

# Prefix match - show all workflow validation errors
awf error WORKFLOW.VALIDATION

# JSON output for programmatic use
awf error EXECUTION.COMMAND.FAILED -f json

Output Fields

FieldDescription
CodeError code identifier (e.g., USER.INPUT.MISSING_FILE)
DescriptionWhat the error means
ResolutionHow to fix the error
Related CodesOther related error codes

See Also


awf history

Show workflow execution history.

awf history [flags]

Flags

FlagDescription
--workflow, -wFilter by workflow name
--status, -sFilter by status (success, failed, cancelled)
--sinceShow executions since date (YYYY-MM-DD)
--limit, -nMaximum entries to show (default: 20)
--statsShow statistics only

Examples

# List recent executions
awf history

# Filter by workflow
awf history --workflow deploy

# Filter by status
awf history --status failed

# Show executions since date
awf history --since 2025-12-01

# Show statistics only
awf history --stats

# JSON output for scripting
awf history -f json

# Combined filters
awf history -w deploy -s success --since 2025-12-01 -n 50

awf plugin

Manage AWF plugins.

awf plugin <subcommand> [flags]

Subcommands

SubcommandDescription
listList all discovered plugins
enable <name>Enable a disabled plugin
disable <name>Disable an enabled plugin

awf plugin list

List all installed plugins with their status.

awf plugin list [flags]

Flags

FlagDescription
-f, --formatOutput format (text, json)

Output Columns

ColumnDescription
NamePlugin identifier
VersionSemantic version
Statusenabled, disabled, or error
DescriptionBrief plugin description
CapabilitiesPlugin features: operations, commands, validators

Examples

# List all plugins
awf plugin list

# JSON output for scripting
awf plugin list -f json

awf plugin enable

Enable a disabled plugin.

awf plugin enable <name>

Arguments

ArgumentDescription
namePlugin name to enable

Examples

# Enable a plugin
awf plugin enable awf-plugin-github

awf plugin disable

Disable an enabled plugin.

awf plugin disable <name>

Arguments

ArgumentDescription
namePlugin name to disable

Examples

# Disable a plugin
awf plugin disable awf-plugin-github

awf config show

Display project configuration values from .awf/config.yaml.

awf config show [flags]

Description

Shows all configured input values from the project configuration file. If no configuration file exists, displays a message suggesting to run awf init.

Flags

FlagDescription
-f, --formatOutput format: text (default), json, quiet

Output Formats

FormatDescription
textHuman-readable table with keys and values
jsonStructured JSON with path, exists flag, and inputs
quietKeys only, one per line (sorted alphabetically)

Examples

# Display configuration in default format
awf config show

# JSON output for scripting
awf config show --format json

# List just the configured input keys
awf config show --format quiet

Example Output

Text format:

Project Configuration (.awf/config.yaml)

  project: my-project
  env: staging
  count: 42

JSON format:

{
  "path": ".awf/config.yaml",
  "exists": true,
  "inputs": {
    "project": "my-project",
    "env": "staging",
    "count": 42
  }
}

See Also


awf version

Show version information.

awf version

awf completion

Generate shell autocompletion scripts.

awf completion <shell>

Supported Shells

  • bash
  • zsh
  • fish
  • powershell

Examples

# Bash
awf completion bash > /etc/bash_completion.d/awf

# Zsh
awf completion zsh > "${fpath[1]}/_awf"

# Fish
awf completion fish > ~/.config/fish/completions/awf.fish

# PowerShell
awf completion powershell > awf.ps1