Complete reference for the wat command-line interface.
wat [OPTIONS] COMMAND [ARGS]...Create a new workflow from template.
wat new <name> [OPTIONS]Arguments:
name- Name for the new workflow
Options:
--category,-c- Category subdirectory (e.g., "data-collection", "automation")
Examples:
# Create workflow in workflows/
wat new my-workflow
# Create workflow in workflows/data-collection/
wat new my-workflow --category data-collection
# Short form
wat new my-workflow -c automationWhat it creates:
workflows/my-workflow/
├── config.yaml
├── main.py
├── requirements.txt
├── .env.example
├── tools/
│ └── example_tool.py
└── workflows/
└── main.md
List all available workflows.
wat listOutput:
Available Workflows:
┌─────────────────┬─────────────────────────────────┬────────────┐
│ Name │ Description │ Category │
├─────────────────┼─────────────────────────────────┼────────────┤
│ saas-hunter │ Discover trending SaaS ideas │ data-coll… │
│ email-digest │ Weekly email digest generator │ automation │
└─────────────────┴─────────────────────────────────┴────────────┘
Validate workflow structure and configuration.
wat validate <name>Arguments:
name- Name of the workflow to validate
Checks performed:
- Required files exist (config.yaml, main.py, requirements.txt)
- config.yaml is valid YAML
- Required fields are present
- Tools referenced in config exist
- Environment variables are documented
Example:
wat validate saas-hunter
# Output on success:
# ✓ config.yaml exists and is valid
# ✓ main.py exists
# ✓ requirements.txt exists
# ✓ All tools exist
# ✓ Workflow is valid!
# Output on failure:
# ✗ Missing required file: requirements.txt
# ✗ Tool not found: missing_tool.pyRun a workflow.
wat run <name> [OPTIONS]Arguments:
name- Name of the workflow to run
Options:
--env,-e- Path to custom .env file
Examples:
# Run workflow
wat run saas-hunter
# Run with custom environment
wat run saas-hunter --env /path/to/.env.productionWhat it does:
- Loads the workflow's
.envfile - Validates the workflow
- Executes
main.py - Displays output and any errors
Deploy workflow to Modal for scheduled execution.
wat deploy <name> [OPTIONS]Arguments:
name- Name of the workflow to deploy
Options:
--dry-run- Generate modal_app.py without deploying
Examples:
# Full deployment
wat deploy saas-hunter
# Generate config only (no deploy)
wat deploy saas-hunter --dry-runPrerequisites:
- Modal CLI installed (
uv pip install modal) - Modal authenticated (
modal setup) - Workflow has deployment config in config.yaml
What it does:
- Validates Modal CLI is installed and authenticated
- Generates
modal_app.pyfrom workflow config - Creates/updates Modal secret from
.env - Deploys to Modal
- Prints dashboard URL
The CLI searches for workflows in:
./workflows/- Flat structure./workflows/<category>/- Categorized structure
Both structures are supported simultaneously.
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | General error |
| 2 | Workflow not found |
| 3 | Validation failed |
| 4 | Deployment failed |
| Variable | Description |
|---|---|
WATFLOW_WORKFLOWS_DIR |
Custom workflows directory (default: ./workflows) |
WATFLOW_DEBUG |
Enable debug output |