Skip to content

CLI Reference

Complete reference for all WireFlow commands, options, and flags.

Global Usage

wfw <subcommand> [options]

Available Subcommands

Subcommand Description
init Initialize wireflow project
new Create new workflow
edit Edit project or workflow files
config View/edit configuration
run Execute workflow with full context
task Execute one-off task (lightweight)
batch Submit and manage batch processing jobs
cat Display workflow output to stdout
open Open workflow output in default app (macOS)
tasks Manage task templates
list List workflows in project
help Show help for subcommands

Global Options

Option Description
-h, --help Show help message
-v, --version Show version information

Quick Help

wfw help                # Main help
wfw help <subcommand>   # Detailed subcommand help
wfw <subcommand> -h     # Quick subcommand help

Environment Variables

Variable Description Required Default
ANTHROPIC_API_KEY Anthropic API key Yes None
WIREFLOW_PROMPT_PREFIX System prompt directory No ~/.config/wireflow/prompts
WIREFLOW_TASK_PREFIX Named task directory No ~/.config/wireflow/tasks
EDITOR Text editor for file editing No vi

Configuration Files

Location Scope
~/.config/wireflow/config Global defaults
<PROJECT>/.workflow/config Project settings
<PROJECT>/.workflow/run/<NAME>/config Workflow-specific

See Configuration Guide for details on the configuration cascade.

Run vs Task Comparison

Feature wfw run wfw task
Purpose Persistent workflows One-off tasks
Output Saved to .workflow/run/<name>/output.<ext> Stdout (or file with -ex)
Configuration Full cascade (global → project → workflow) Global only
Dependencies --depends-on supported Not supported
Batch API Use wfw batch instead Not supported
Default Streaming Disabled (buffered) Enabled

Exit Codes

Code Meaning
0 Success
1 General error
2 Invalid arguments