Skip to content

CLI usage

Install with the [cli] extra:

pip install athena-sdk[cli]

Subcommands

athena validate PATH     # structural checks, non-zero exit if issues
athena visualize PATH    # print mermaid (default) or ASCII DAG
athena deploy PATH       # create the workflow on nexus-backend
athena run PATH          # deploy + trigger on the configured nexus-backend

PATH accepts a JSON or YAML file (auto-detected by extension). Pass - to read from stdin.

Examples

# Build + validate in one pipeline
python - <<'PY' | athena validate -
from athena_sdk import Workflow
wf = Workflow("pipe")
wf.postgres("l", operation="select", query="SELECT 1") >> wf.output("s")
print(wf.to_json())
PY

# Visualize as ASCII
athena visualize --fmt ascii workflow.json