| title | Quick Start |
|---|
Get AWF running in 5 minutes.
⚠️ Security & Risk Disclaimer: AWF executes real shell commands and interacts with non-deterministic AI agents. Always audit workflows from untrusted sources. It is recommended to useawf run --dry-runorawf run --interactivewhen testing new or external workflows.
awf initThis creates the following structure:
.awf.yaml # Configuration file
.awf/
├── config.yaml # Project configuration with input templates
├── workflows/
│ └── example.yaml # Sample workflow
├── prompts/
│ └── example.md # Sample prompt template
└── scripts/
└── example.sh # Sample script file
awf run exampleOutput:
Hello from AWF!
Workflow completed successfully
Create a new file .awf/workflows/hello.yaml:
name: hello
version: "1.0.0"
description: A simple hello world workflow
states:
initial: greet
greet:
type: step
command: echo "Hello, {{.inputs.name}}!"
on_success: done
done:
type: terminalRun it with an input:
awf run hello --input name=WorldOutput:
Hello, World!
Workflow completed successfully
If you run a workflow with missing required inputs, AWF will automatically prompt you for them (when running from a terminal):
awf run hello
# Output:
# name (string, required):Just enter a value and press Enter. AWF will execute the workflow with your input.
Note: Interactive prompting only works in terminal sessions. In scripts or piped contexts, you must provide inputs via --input flags.
Check your workflow for errors before running:
awf validate helloSee all workflows AWF can find:
awf listAWF discovers workflows from multiple locations (priority high to low):
AWF_WORKFLOWS_PATHenvironment variable./.awf/workflows/(local project)$XDG_CONFIG_HOME/awf/workflows/(global, default:~/.config/awf/workflows/)
Local workflows override global ones with the same name.
AWF discovers prompts from multiple locations (priority high to low):
./.awf/prompts/(local project)$XDG_CONFIG_HOME/awf/prompts/(global, default:~/.config/awf/prompts/)
Local prompts override global ones with the same name.
# List all prompts
awf list prompts
# Initialize global prompts directory
awf init --globalReference prompts in workflow inputs using the @prompts/ prefix:
awf run my-workflow --input prompt=@prompts/system.mdThe @prompts/ prefix loads the file content and passes it as the input value.
AWF follows the XDG Base Directory Specification for storing runtime data:
| Data Type | Default Location | Environment Variable | Override Flag |
|---|---|---|---|
| State files | ~/.local/share/awf/states/ |
$XDG_DATA_HOME/awf/ |
--storage-path |
| Configuration | ~/.config/awf/ |
$XDG_CONFIG_HOME/awf/ |
N/A |
| History database | ~/.local/share/awf/history.db |
$XDG_DATA_HOME/awf/ |
--storage-path |
Custom storage path:
awf run example --storage-path /custom/pathThis will store state files in /custom/path/states/ and history in /custom/path/history.db.
| Flag | Description |
|---|---|
--input, -i |
Pass input values (key=value) |
--output, -o |
Output mode: silent, streaming, buffered |
--verbose, -v |
Enable verbose output |
--quiet, -q |
Suppress non-error output |
--dry-run |
Show execution plan without running |
--interactive |
Step-by-step execution with prompts |
name: analyze-code
version: "1.0.0"
inputs:
- name: file
type: string
required: true
states:
initial: read_file
read_file:
type: step
command: cat "{{.inputs.file}}"
on_success: analyze
on_failure: error
analyze:
type: step
command: |
claude -c "Review this code:
{{.states.read_file.Output}}"
timeout: 120
on_success: done
on_failure: error
done:
type: terminal
error:
type: terminal
status: failureawf run analyze-code --input file=main.go- Commands - Full command reference
- Workflow Syntax - Complete YAML syntax
- Examples - More workflow examples