Skip to content

CLI Reference ​

Commands accept either DAG names (from YAML name field) or file paths.

  • Both formats: start, stop, status, retry, dry, enqueue
  • DAG name only: restart
  • History by DAG name or YAML path; definition by filename, stem, or configured path: rm
  • Local-only commands: ls, rm, profile, ps, test, human-task complete, human-task push-back, browser cache clear, browser session, browser writes, computer check, computer elements, computer cache clear, computer cache show, xlsx inspect, xlsx read, xlsx cache clear

Global Options ​

bash
dagu [--context NAME] command [command options] [arguments...]
  • --context - CLI context name for context-aware commands (default: current context or local)
  • --help, -h - Show help

Most commands also accept these options. version, schema, example, completion, xlsx inspect, and xlsx read do not.

  • --config, -c - Config file (default: ~/.config/dagu/config.yaml)
  • --dagu-home - Override DAGU_HOME for this command invocation
  • --quiet, -q - Suppress output
  • --cpu-profile - Enable CPU profiling

Use dagu version to print the version.

Remote Contexts ​

CLI contexts let context-aware commands target a remote Dagu server instead of the built-in local context.

Context-aware commands are:

  • start
  • enqueue
  • status
  • history
  • stop
  • retry
  • restart
  • dequeue
  • nodes

The built-in local context is always available. Remote contexts are stored under paths.contexts_dir, and their API keys are encrypted at rest.

--server is the REST API base URL, not the Web UI URL. The default API path is /api/v1. If the server uses base_path: /dagu, use https://example.com/dagu/api/v1.

bash
# Add a remote server
dagu context add staging \
  --server https://staging.example.com/api/v1 \
  --api-key dagu_xxxxxxxxxxxxxxxxxxxx \
  --description "Staging Dagu server"

# Make it the current context
dagu context use staging

# Or target a context explicitly for one command
dagu --context staging status nightly-backup

Remote command rules:

  • DAG-oriented remote commands only operate on DAGs that already exist on the remote server.
  • For start, enqueue, status, stop, retry, and restart, pass the remote DAG fileName or a unique deployed DAG name. Local YAML paths such as ./job.yaml are rejected.
  • For history, pass a deployed DAG name. Local YAML paths are rejected.
  • Commands that are not context-aware always run against the local instance and reject non-local contexts.
  • --profile is local-only for start, enqueue, and dry. To select a profile on a remote server, use the Web UI or the REST API profile field.

Commands ​

exec ​

Run a command without writing a YAML file.

bash
dagu exec [options] -- <command> [args...]

Options:

  • --name, -N - DAG name (default: exec-<command>)
  • --run-id, -r - Custom run ID
  • --env KEY=VALUE - Set environment variable (repeatable)
  • --dotenv <path> - Load dotenv file (repeatable)
  • --workdir <path> - Working directory
  • --shell <path> - Shell binary
  • --base <file> - Custom base config file (default: ~/.config/dagu/base.yaml)
  • --worker-label key=value - Set worker selector labels (repeatable)
bash
# Basic usage
dagu exec -- python script.py

# With environment variables
dagu exec --env DB_HOST=localhost -- python etl.py

See the exec guide for detailed documentation.

start ​

Run a DAG workflow.

bash
dagu start [options] DAG_NAME_OR_FILE [-- PARAMS...]

dagu start requires exactly one DAG name or file path.

A DAG with restart_policy: always or unless-stopped has one run at a time, so dagu start fails while a run of it is active. See Services.

Options:

  • --params, -p - Parameters as key=value pairs, positional values, or a JSON object
  • --name, -N - Override the DAG name (default: name from DAG definition or filename)
  • --run-id, -r - Custom run ID
  • --from-run-id - Re-run using the DAG snapshot and parameters captured from a historic run, for its schedule slot unless --scheduled-at names another
  • --scheduled-at - Run for a schedule slot: latest, a date, a time in the schedule's zone, or RFC 3339. See Running a Past Slot
  • --params-stdin - Read parameters from piped or redirected stdin, up to 1 MiB; -- and --params take precedence
  • --profile - Runtime profile to apply to this run
  • --no-reuse - Recompute eligible build steps instead of reusing prior materializations
  • --labels - Additional labels, comma-separated key=value or key (--tags is a deprecated alias)
  • --worker-label - Worker label (key=value) the run requires, replacing the DAG's worker_selector; repeatable
  • --node - Node to narrow the run to, an inventory node or a worker node; repeatable. Steps with nodes run only on listed nodes. A node: required DAG takes exactly one --node and runs bound to it. Not with --only or --from-run-id. See Narrow a Run to Listed Nodes
  • --default-working-dir - Working directory for DAGs without an explicit working directory
  • --only - Run only this step (name or ID); repeatable. Every other step is recorded as skipped
  • --outputs-from - Finished run of the same DAG whose work directory, and the outputs of the skipped steps that the --only steps depend on, feed the run
  • --output-from - Run that gives the outputs of one skipped step, as <step>=<run-id>; repeatable, and wins over --outputs-from for that step
  • --output - Deprecated; use --output-from. Output of a step skipped by --only, as <step>.<name>=<value>; repeatable, and wins over --outputs-from and --output-from
  • --reuse-from - Finished run of the same DAG whose unchanged steps the run reuses instead of running. See Rerunning Changed Steps
  • --recursive-output - Expand sub-DAG runs in the summary printed when the run ends, as status --recursive-output does. Local context only

Note: --from-run-id cannot be combined with --params, --parent, or --root. Provide exactly one DAG name or file so the command can look up the historic run.

Note: --reuse-from chooses the steps to run itself. A step is reused when its definition, the rest of the DAG's definition, the base config, the parameters, the runtime profile, and the steps it depends on are as they were in that run, and it succeeded there or carried its outputs into it. A reused step is recorded as skipped and carries its outputs, and the run takes that run's work directory. Every other step runs, with every step after it and every step that shares its browser. When nothing changed, or nothing can be reused, every step runs. --reuse-from cannot be combined with --only, --outputs-from, --output-from, --output, or --from-run-id.

Note: --only starts a new run of the current definition, with its env, secrets, and params, under the DAG's own name. Only the selected steps run. Preconditions and handler_on.init apply as usual. The success, failure, abort, wait, and exit handlers run only when a selected step is a graph end step, one that no other step depends on.

  • Only a skipped step that a selected step depends on, directly or through other steps, carries outputs. They come from --outputs-from, --output-from, --output, or none of them. Without them, a ${steps.<id>.outputs.<name>} reference to a skipped step stays unresolved.
  • With --outputs-from, only steps that succeeded in that run contribute outputs, and the run's work-directory files are copied into the new run.
  • --output-from takes one step's outputs from its own run. That run must be a finished run of the same DAG in which the step succeeded, and the step cannot also be named by --only. The work directory still comes only from --outputs-from. The new run records the run each reused step came from.
  • --output sets a declared output, or any name when the step declares none. Naming the step's output: VAR sets that variable instead. See Running One Step.
  • --only cannot be combined with --from-run-id, --parent, or --root, and is not supported for agent DAGs.
  • Retrying a failed --only run follows normal retry rules, so steps downstream of the failed step run too; use dagu retry --step to re-run one step.
bash
# Basic run
dagu start my-workflow.yaml

# With parameters (note the -- separator)
dagu start etl.yaml -- DATE=2024-01-01 ENV=prod

# Custom run ID
dagu start --run-id batch-001 etl.yaml

# Select a runtime profile
dagu start --profile prod etl.yaml

# Recompute every eligible build step
dagu start --no-reuse report-pipeline.yaml

# Override DAG name
dagu start --name my_custom_name my-workflow.yaml

# Clone parameters from a historic run
dagu start --from-run-id 20241031_235959 example-dag.yaml

# Run the slot of November 9 again
dagu start --scheduled-at 2026-11-09 etl.yaml

# Run one step on its own
dagu start --only scrape example-dag.yaml

# Run two steps with the outputs of an earlier run
dagu start --only test --only report --outputs-from 20241031_235959 example-dag.yaml

# Take one upstream step's outputs from a different run
dagu start --only report --outputs-from 20241031_235959 --output-from test=20241101_080000 example-dag.yaml

# After an edit, run only the steps that changed since a run
dagu start --reuse-from 20241031_235959 example-dag.yaml

# Show the steps and output of each sub-DAG run in the summary
dagu start --recursive-output pipeline.yaml

# Run the steps with nodes only on two of their nodes
dagu start --node web01 --node web03 deploy.yaml

stop ​

Stop a running or waiting DAG run.

bash
dagu stop [options] DAG_NAME_OR_FILE

Options:

  • --run-id, -r - Specific run ID (optional)
bash
dagu stop my-workflow                     # Stop current run
dagu stop --run-id=20240101_120000 etl   # Stop specific run

With --run-id, a root run that is waiting for an approval or a human task ends as aborted. Its waiting steps become aborted, and the steps that have not started do not run. A retry of the run opens its human tasks again.

restart ​

Restart a DAG run with a new ID.

A DAG with restart_policy: always or unless-stopped is refused, because the scheduler starts its runs. Stop the active run instead. See Services.

bash
dagu restart [options] DAG_NAME

Options:

  • --run-id, -r - Run to restart (optional)
  • --scheduled-at - Schedule slot for the new run. Without it, the new run keeps the slot of the run it restarts
bash
dagu restart my-workflow                   # Restart the currently running DAG-run
dagu restart --run-id=20240101_120000 etl  # Restart a specific running DAG-run

retry ​

Retry a previous DAG run using the same run ID.

For a DAG with restart_policy: always or unless-stopped, this fails while another run of it is active. See Services.

bash
dagu retry [options] DAG_NAME_OR_FILE

Options:

  • --run-id, -r - Run to retry (required)
  • --step - Retry only the named step
  • --downstream - Also retry reachable descendants of --step; requires --step
  • --sub-run-id - Select a persisted child run containing --step; requires --step
  • --bypass-preconditions - Skip step preconditions for the selected retry steps; requires --step and a local CLI context
bash
dagu retry --run-id=20240101_120000 my-workflow

# Retry a step whose precondition is no longer satisfied
dagu retry --run-id=20240101_120000 --step=upload --bypass-preconditions my-workflow

# Also retry its downstream steps, bypassing their step preconditions
dagu retry --run-id=20240101_120000 --step=upload --downstream --bypass-preconditions my-workflow

For example, an upload step may fail before a 10 AM cutoff and become ready to retry after that cutoff. A normal retry checks the time precondition again and skips the step. --bypass-preconditions allows that retry to execute.

The override applies only to this retry. Unrelated steps, lifecycle handlers, and DAG-level preconditions keep their normal behavior. The workflow definition is unchanged, and a later retry without the flag checks preconditions again.

Retrying a parent step does not bypass preconditions inside its child DAGs, including automatic child step retries. Use --sub-run-id with --step to target a step inside a child DAG.

--bypass-preconditions is unavailable with a remote CLI context. A local-context retry can still target a child run hosted on a worker; see retrying child runs.

Retries inherit the original run's runtime profile. dagu retry does not accept --profile.

A retried step with nodes runs again only on the nodes that did not succeed. See Retry Failed Nodes.

human-task complete ​

Complete a waiting human.task step and enqueue the same DAG run when the completion unblocks a step or no other manual steps remain waiting.

bash
dagu human-task complete [options] DAG_NAME_OR_FILE

Options:

  • --run-id, -r - Root DAG-run ID containing the waiting task (required)
  • --step - Explicit human-task step ID (required)
  • --input key=value - String input, repeatable for multiple properties
  • --inputs-json object - Typed input as one JSON object
bash
# Complete an acknowledgement-only task
dagu human-task complete \
  --run-id maintenance-42 \
  --step maintenance_started \
  maintenance.yaml

# Submit values that are coerced using the form schema
dagu human-task complete \
  --run-id release-42 \
  --step release_review \
  --input environment=production \
  --input replicas=3 \
  release.yaml

# Submit typed JSON values
dagu human-task complete \
  --run-id release-42 \
  --step release_review \
  --inputs-json '{"environment":"production","replicas":3,"notify":false}' \
  release.yaml

--input and --inputs-json are mutually exclusive. Omitting both submits an empty object. The command matches --step against the explicit step id, not its display name.

The command is local-only and rejects remote CLI contexts, but the target root DAG run may have executed locally or on a distributed worker. Human tasks are not supported in sub-DAGs. Each resume enqueues the run; completion never starts it immediately. Keep the scheduler running so the queued run can resume. See Human Tasks for form validation, persistence, idempotency, and recovery behavior.

human-task push-back ​

Send a waiting human.task step that declares with.push_back back to its rewind target. The rewind target and every step that depends on it, directly or transitively, run again with the feedback, then the task opens again.

bash
dagu human-task push-back [options] DAG_NAME

Options:

  • --run-id, -r - Root DAG-run ID containing the waiting task (required)
  • --step - Explicit human-task step ID (required)
  • --input key=value - String feedback value, repeatable for multiple properties
  • --inputs-json object - Typed feedback as one JSON object
  • --expected-iteration n - Fail unless the task is at this push-back iteration (0 before the first push-back)
bash
dagu human-task push-back \
  --run-id review-42 \
  --step review \
  --input feedback="Add coverage for the empty input case" \
  --expected-iteration 0 \
  review-loop

Feedback is validated against with.push_back.form with the same parsing rules as completion and is limited to 16 KiB as JSON. The command prints Pushed back human task <step> to <target>; followed by whether the DAG-run was queued for resume or remains waiting. The push-back is stored before the run is queued; if queueing fails, run the same command again. Until the task opens again, an identical repeat only retries the queue and prints Human task <step> was already pushed back to <target>. Like human-task complete, the command is local-only.

status ​

Display current status of a DAG.

bash
dagu status [options] DAG_NAME_OR_FILE

Options:

  • --run-id, -r - Check specific run (optional)
  • --sub-run-id, -s - Check a sub DAG-run of --run-id (optional)
  • --recursive-output - Expand each sub-DAG run in the tree, with its steps and output
bash
dagu status my-workflow  # Latest run status
dagu status --recursive-output my-workflow  # Include sub-DAG runs

Output:

Succeeded - 2026-11-04T14:48:38.856+09:00

dag: my-workflow (110ms)
├─log: .../logs/my-workflow/dag-run_.../dag-run_....log
│
├─download (39ms) [succeeded]
│ ├─echo downloaded
│ │
│ └─stdout: .../download....out
│     downloaded
│
└─process (25ms) [succeeded]
  ├─echo processed
  │
  └─stdout: .../process....out
      processed

Result: Succeeded

Log paths are shortened here.

A step that runs a sub-DAG lists each sub-DAG run as a subdag: <run-id> line. With --recursive-output, the line also names the child DAG and its status, and the child's steps and output follow it:

└─load (164ms) [failed]
  ├─subdag: 12qQXWdFzFVm8A2eSvg5RY (child: failed)
  │ ├─fetch (61ms) [succeeded]
  │ │ ...
  │ └─check (53ms) [failed]
  │   ├─stderr: .../check....err
  │   │   row 42 is invalid
  │   │
  │   └─error: exit status 1
  │
  └─error: exit status 1

Expansion covers up to 5 levels of nesting, 20 failed sub-runs, and 30 other sub-runs, failed ones first. Sub-runs past these limits, or whose status cannot be read, keep their subdag: line, and a notice after the tree counts them and prints the dagu status <dag> --run-id <id> --sub-run-id <sub-run-id> command that shows one. --recursive-output works with local and remote contexts.

ps ​

List DAG runs with a fresh heartbeat in the local process store.

bash
dagu ps [options]

Options:

  • --dag, -d - Filter by exact DAG name
  • --run-id, -r - Filter by run ID; partial matches are accepted
  • --format, -f - Output format: table (default) or json
bash
# List all running processes
dagu ps

# List processes for one DAG
dagu ps --dag my-workflow

# Combine the DAG filter with a partial run ID
dagu ps -d my-workflow -r 019c1ca4

The output includes the DAG name, run ID, attempt ID, UTC start time, process group, and heartbeat freshness. The process group is the configured queue name, or the DAG name when the DAG does not use a queue. Stale process entries are omitted.

dagu ps is local-only and reads the process store configured for the local Dagu installation. If the current CLI context is remote, select the built-in local context explicitly:

bash
dagu --context local ps

ls ​

List DAG definitions in the local Dagu installation. An optional pattern filters by a substring of the DAG name or filename.

bash
dagu ls [options] [PATTERN]

Options:

  • --next, -n - Show the next scheduled run and sort by it, earliest first
  • --last, -l - Show the latest run status and start time
  • --history, -H - Show a compact summary of the five most recent run statuses
  • --sort-last, -t - Sort by latest run time, newest first
  • --reverse, -r - Reverse the selected sort direction
bash
# List all local DAG definitions
dagu ls

# Filter by DAG name or filename
dagu ls nightly

# Show the scheduler's next-run projection and latest run details
dagu ls -n -l

# Sort by latest run, oldest first
dagu ls -t -r

# Show recent status history for matching DAGs
dagu ls -H batch-

NEXT_RUN follows the scheduler's recorded projection for both display and sorting. Suspended DAGs and profile-scoped schedules that are inactive for the DAG's effective default profile show -, as does every DAG while the scheduler is paused. A pending one-off schedule keeps its scheduled timestamp after it becomes overdue until the scheduler marks it consumed. See Scheduling for schedule behavior and profile activation rules.

dagu ls is local-only. If a remote CLI context is selected, target the built-in local context explicitly:

bash
dagu --context local ls -n

history ​

Display execution history of DAG runs with filtering and pagination.

Usage:

bash
dagu history [flags] [DAG_NAME]

Flags:

  • --from - Start date/time in UTC (formats: 2006-01-02 or 2006-01-02T15:04:05Z)
  • --to - End date/time in UTC (formats: 2006-01-02 or 2006-01-02T15:04:05Z)
  • --last - Relative time period (examples: 7d, 24h, 1w, 30d). Cannot combine with --from/--to
  • --status - Filter by one or more statuses. Use a single status or a comma-separated list with OR logic: running, succeeded, failed, aborted, queued, waiting, rejected, not_started, partially_succeeded
    • Aliases: success (succeeded), failure (failed), canceled/cancelled/cancel (aborted)
  • --run-id - Filter by run ID (partial match supported)
  • --labels - Filter by labels, comma-separated with AND logic: key, key=value, key= (no value), globs with * and ?, and ! before any term to negate it (e.g., critical,!env=dev). See Label Filters
  • --format, -f - Output format: table (default), json, or csv
  • --limit, -l - Max results (default: 100, max: 1000)

Default Behavior:

  • Shows last 30 days of runs
  • Table format with columns: DAG NAME, RUN ID, STATUS, STARTED (UTC), DURATION, PARAMS
  • Sorted newest first
  • Limit 100 results
  • Run IDs are never truncated

Examples:

bash
# All runs from last 30 days
dagu history

# Specific DAG runs
dagu history my-workflow

# Recent failures and aborted runs for debugging
dagu history my-workflow --status failed,aborted --last 7d

# Date range query
dagu history --from 2026-01-01 --to 2026-01-31

# JSON export for analysis
dagu history --format json --limit 500 > history.json

# CSV export for spreadsheets
dagu history --format csv --limit 500 > history.csv

# Label filtering (AND logic)
dagu history --labels "prod,critical"

# Critical runs not labeled env=dev
dagu history --labels "critical,!env=dev"

# Combined filters
dagu history my-workflow --status failed,partially_succeeded --last 24h --limit 10

Output (table):

DAG NAME      RUN ID                                STATUS     STARTED (UTC)        DURATION  PARAMS
my-workflow   019c1ca4-ba96-7599-80c9-773862801abc  Succeeded  2026-02-02 04:38:03  2m30s     -
my-workflow   019c1ca3-f123-4567-89ab-cdef01234567  Failed     2026-02-01 14:22:15  45s       env=prod

Output (JSON):

json
[
  {
    "name": "my-workflow",
    "dagRunId": "019c1ca4-ba96-7599-80c9-773862801abc",
    "status": "succeeded",
    "startedAt": "2026-02-02T04:38:03Z",
    "finishedAt": "2026-02-02T04:40:33Z",
    "duration": "2m30s",
    "params": "",
    "labels": ["prod", "backend"],
    "workerId": "",
    "error": ""
  }
]

Output (CSV):

csv
DAG NAME,RUN ID,STATUS,STARTED (UTC),DURATION,PARAMS
my-workflow,019c1ca4-ba96-7599-80c9-773862801abc,Succeeded,2026-02-02 04:38:03,2m30s,-
my-workflow,019c1ca3-f123-4567-89ab-cdef01234567,Failed,2026-02-01 14:22:15,45s,env=prod

Note: CSV output follows RFC 4180. Fields containing commas, quotes, or newlines are automatically quoted and escaped.

Error Examples:

bash
# Conflicting flags
$ dagu history --last 7d --from 2026-01-01
Error: cannot use --last with --from or --to

# Invalid status
$ dagu history --status invalid
Error: invalid status 'invalid'. Valid values: running, succeeded, failed, ...

# Date validation
$ dagu history --from 2026-02-01 --to 2026-01-01
Error: --from date (2026-02-01) must be before --to date (2026-01-01)

# Invalid label filter term
$ dagu history --labels "env==prod"
Error: invalid label filter "env==prod": a term is key, key=value, or a glob of either, and a leading ! negates it

See Also:

  • status - Current run status
  • rm - Remove run history or a DAG definition

rm ​

Remove DAG run history, the DAG YAML definition, or both. At least one of --history or --definition is required.

bash
dagu rm [options] DAG

Options:

  • --history, -H - Delete DAG run history
  • --definition, -d - Delete the DAG YAML definition
  • --older-than, -t - With --history, delete runs older than a duration such as 10d, 24h, or 1w; when omitted, delete all history
  • --force, -f - Skip the confirmation prompt
  • --dry-run - Preview deletions without changing history or the definition

History removal also deletes the logs and artifact directories recorded for each removed run. Removing all history, without --older-than, also clears the DAG's browser and computer replay caches on this host; --dry-run lists them. Active runs are preserved. Definition removal is refused while the DAG has an active local or distributed run.

With --definition, identify the DAG by its filename, file stem, or configured path. If the YAML name differs from its filename, Dagu resolves the definition first and removes history under the configured DAG name.

bash
# Preview all history that would be removed
dagu rm --history --dry-run my-workflow

# Remove history older than 30 days
dagu rm -H --older-than 30d my-workflow

# Remove only the YAML definition
dagu rm --definition my-workflow.yaml

# Remove history and the YAML definition together
dagu rm -H -d my-workflow.yaml

# Skip confirmation in a non-interactive script
dagu rm -H -t 24h --force my-workflow

The command prompts before making changes unless --force is set. --quiet suppresses regular output but does not bypass confirmation. Definition-only removal leaves run history intact; include --history to remove both.

dagu rm is local-only. If a remote CLI context is selected, target the built-in local context explicitly:

bash
dagu --context local rm -H my-workflow

prune-artifacts ​

Remove artifact directories and index records that no surviving DAG run points to, such as those left after a run record was deleted another way or the artifact root moved.

bash
dagu prune-artifacts [options]

Options:

  • --older-than, -t - Only remove entries older than a duration such as 10d, 24h, or 1w (default: 24h; at least 1h is always enforced)
  • --root - Artifact root to prune (default: paths.artifact_dir), such as a previous <data_dir>/artifacts or a DAG's artifacts.dir. Roots holding run history or logs are refused
  • --dry-run - Preview what would be removed without removing it
  • --yes, -y - Skip confirmation prompt
bash
dagu prune-artifacts --dry-run
dagu prune-artifacts -t 7d -y
dagu prune-artifacts --root /old/data/artifacts

context ​

Manage CLI contexts for local and remote Dagu servers.

bash
dagu context list
dagu context add <name> [flags]
dagu context update <name> [flags]
dagu context remove <name>
dagu context use <name|local>
dagu context test <name|local>

Add / Update Flags:

  • --server - Remote API base URL, including its API path
  • --api-key - Remote API key (dagu_...)
  • --description - Optional description shown in dagu context list
  • --skip-tls-verify - Skip TLS certificate verification
  • --timeout - HTTP timeout in seconds
bash
# List contexts and show the current one
dagu context list

# Add a context (if --api-key is omitted in a terminal, Dagu prompts for it)
dagu context add prod \
  --server https://dagu.example.com/api/v1 \
  --api-key dagu_xxxxxxxxxxxxxxxxxxxx \
  --timeout 60

# Update selected fields
dagu context update prod --description "Production cluster"

# Switch back to the built-in local context
dagu context use local

# Test connectivity
dagu context test prod

context add and context use only update local context settings. Run context test to verify the API URL, credentials, and network connection.

server ​

Start the web UI server.

bash
dagu server [options]

Options:

  • --host, -s - Host (default: localhost)
  • --port, -p - Port (default: 8080)
  • --dags, -d - DAGs directory
  • --tunnel, -t - Enable tunnel mode for remote access
  • --tunnel-funnel - Enable Tailscale Funnel for public internet access
  • --tunnel-https - Use HTTPS for Tailscale (requires HTTPS enabled in the Tailscale admin panel)
  • --tunnel-token - Tailscale auth key for headless authentication
bash
dagu server                               # Default settings
dagu server --host=0.0.0.0 --port=9000  # Custom host/port

scheduler ​

Start the DAG scheduler daemon.

bash
dagu scheduler [options]

Options:

  • --dags, -d - DAGs directory
bash
dagu scheduler                  # Default settings
dagu scheduler --dags=/opt/dags # Custom directory

start-all ​

Start scheduler, web UI, and optionally coordinator service.

bash
dagu start-all [options]

Options:

  • --host, -s - Host (default: localhost)
  • --port, -p - Port (default: 8080)
  • --dags, -d - DAGs directory
  • --coordinator.host - Coordinator bind address (default: 127.0.0.1)
  • --coordinator.advertise - Address to advertise in service registry
  • --coordinator.port - Coordinator gRPC port (default: 50055)
  • --peer.cert-file, --peer.key-file, --peer.client-ca-file, --peer.ca-cert-file, --peer.ca-key-file, --peer.insecure, --peer.skip-tls-verify - Peer TLS settings, as for coordinator
bash
# Default: coordinator listens on 127.0.0.1:50055
dagu start-all

# Without the coordinator
DAGU_COORDINATOR_ENABLED=false dagu start-all

# Coordinator reachable from remote workers
dagu start-all --coordinator.host=0.0.0.0 --coordinator.port=50055

# Production mode
dagu start-all --host=0.0.0.0 --port=9000 --coordinator.host=0.0.0.0

Note: The coordinator is enabled by default and binds to 127.0.0.1. Set coordinator.enabled: false or DAGU_COORDINATOR_ENABLED=false to run without it.

validate ​

Validate DAG files without running them.

bash
dagu validate [options] DAG_FILE_DAG_NAME_OR_DIRECTORY...

Checks structure and references, such as step dependencies, without evaluating variables or running steps.

  • A file argument validates that file. An argument that is not an existing path is a DAG name, resolved in the DAGs directory.
  • A directory argument validates the DAG files the server loads from it, by the dag_discovery settings of the configuration: the .yaml and .yml files at its top, and with dag_discovery.recursive, the ones below it too. Test files are skipped. The child DAGs those files call by a fixed name are validated too, wherever they are. A directory with no DAG file is an error.
  • A test file argument is an error that names dagu test.
  • Every file is validated, even after one is invalid.

Options:

  • -v, --verbose - Also print notes, such as the dependencies inferred from step output references
  • --show-unresolved - Also report references whose value only exists during a run
  • -q, --quiet - Print errors only
bash
dagu validate my-workflow.yaml
dagu validate workflows/
dagu validate workflows/release.yaml workflows/etl.yaml

Each finding is one line: ERROR for an error of an invalid file, WARN for a warning, and, with -v, NOTE for a note. With more than one file, a summary ends the output:

text
$ dagu validate workflows/
ERROR  workflows/cleanup.yaml: Step "prune": unknown field "depnds". Did you mean "depends"?
WARN   workflows/legacy.yaml: Step "fetch": command is deprecated. Use run.

DAGs: 2 valid, 1 invalid, 1 with warnings

A valid DAG with nothing to report prints nothing. -v prints a note such as NOTE workflows/release.yaml: build -> check is inferred from steps[1].run. for a dependency taken from a step output reference. The output goes to stderr, colored only on a terminal.

Exits 0 when every file is valid, 1 when a file is invalid, and 2 when the arguments are invalid.

dry ​

Validate a DAG without executing it.

bash
dagu dry [options] DAG_NAME_OR_FILE [-- PARAMS...]

Options:

  • --params, -p - Parameters as key=value pairs, positional values, or a JSON object
  • --name, -N - Override the DAG name (default: name from DAG definition or filename)
  • --profile - Runtime profile to use during the dry run
  • --no-reuse - Preview a build run with reuse disabled
  • --format, -f - Output format for dry-run checks: text (default) or json
  • --scheduled-at - Simulate the run of a schedule slot, including one that has not come yet, and print the slot and its window

For a DAG with dates, the text output also lists the dates the run of that slot loads. Without --scheduled-at, the dates come from the default slot.

bash
dagu dry my-workflow.yaml
dagu dry --scheduled-at 2026-11-30 etl.yaml  # Preview the month-end slot
dagu dry etl.yaml -- DATE=2024-01-01  # With parameters
dagu dry --name my_custom_name my-workflow.yaml  # Override DAG name
dagu dry --profile prod my-workflow.yaml
dagu dry --no-reuse report-pipeline.yaml

test ​

Run workflow tests. Each case of a test file runs the DAG beside it, or the one its dag field names, through the same runner as start, with step actions replaced by mocks, in a temporary directory. A step the case lists under real runs its real action. Requires Dagu v2.28.0 or later.

bash
dagu test [options] [TEST_FILE_DAG_FILE_DAG_NAME_OR_DIRECTORY...]

A test file argument ends in .test.yaml or .test.yml. A DAG file argument, a .yaml or .yml file that is not a test file, runs the test files beside it: release.yaml runs release.test.yaml and release.test.yml, whichever exist. An argument that is not an existing path is a DAG name, resolved in the DAGs directory as start resolves one. A DAG with no test file exits 2 with an error that names dagu test --init. A directory argument runs every test file under it, skipping directories whose names start with . and not following symbolic links, and loads each DAG the server loads from it that no test file tests, so a DAG that fails to load exits 2. See DAGs Without Tests. Without an argument, the DAGs directory is used the same way. A directory argument that holds no test file and no DAG file exits 2.

With --init, the one argument is a DAG file, and Dagu writes its test file beside it instead of running tests. See Generate a Test File.

Options:

  • --run - Run only the cases whose name this RE2 regular expression matches
  • --timeout - Longest a case may run, such as 30s (default: 5m)
  • --format, -f - Report format: text (default), json, or junit
  • --keep - Keep each case directory and print its path
  • -v, --verbose - Also print the steps the default mock replaced, the waits approved automatically, and the notifications each case would have sent
  • --init - Write the test file of the DAG file given as the one argument, with default_mock: {}, a mock for each step the default mock cannot handle, and one case that expects the result of a run with those mocks. It never replaces a test file and takes no --update, --run, --keep, or --format json or junit
  • --update - After you change a DAG on purpose, rerun the selected cases and replace the expected results in the test file with what the DAG does now. Check the change with git diff. It never removes an expectation. It combines with --run, --timeout, --keep, and --format, and not with --init. See Update Expectations After a Change
bash
dagu test workflows/
dagu test workflows/release.yaml
dagu test release
dagu test --run 'not a version' --timeout 30s workflows/release.test.yaml
dagu test --format json --keep workflows/
dagu test --init workflows/release.yaml
dagu test --update workflows/release.test.yaml

Exits 0 when every case passed, 1 when a case failed, and 2 when a test file, a case, a DAG without tests, or the arguments are invalid. With --update, a test file edited during the run is left unwritten, and the command exits 1 even when every case passed, or 2 when a test file or case is invalid. See Running Tests in CI.

browser cache clear ​

Clear the recorded act and upload operations that browser steps replay, so the next run asks the model again.

bash
dagu browser cache clear [options] DAG

Options:

  • --step - Clear only the step with this ID, or its name when the step has no ID

Without --step, every step of the DAG is cleared. The cache lives on the host that ran the step; in distributed mode, run the command on the worker.

bash
dagu browser cache clear billing
dagu browser cache clear billing --step login

browser writes ​

List, approve, and revoke the commit points of a DAG's browser steps, the writes a step behind the write gate may send. Identify the DAG by name or YAML file path. Each command prints JSON. Commit points are kept on the host that ran the step; in distributed mode, run the command on the worker.

bash
dagu browser writes list [--step ID] DAG
dagu browser writes approve [options] DAG
dagu browser writes revoke [options] DAG

Options:

  • --step - Only this step (ID, or name when the step has no ID)
  • --signature - With approve or revoke, only the commit points of this write signature; repeatable
  • --from-dag - With approve, copy the commit points of this DAG's steps, such as a copy of the DAG that ran the rehearsal, into the steps of the same name and approve them
bash
dagu browser writes list books
dagu browser writes approve books --step enter_deal
dagu browser writes approve books --from-dag books-trial
dagu browser writes revoke books --step enter_deal

browser session ​

Work a site in a browser kept open between commands, one operation at a time, and turn what worked into a browser step. Every command prints one JSON object. A command that fails prints {"error": {"code", "message"}} and exits 1; the codes are invalid_input, session_not_found, session_busy, session_ended, model_required, profile_in_use, launch_failed, operation_failed, write_blocked, write_gate_lost (the write gate stopped, closing the browser), export_invalid, and failed. Sessions are kept on the host that runs the commands.

browser session open ​

Open a browser, go to the URL if given, and leave the browser waiting for the session's commands.

bash
dagu browser session open [options] [URL]

Options:

  • --provider, --model, --base-url, --api-key-name - The model acts, extracts, and judged conditions ask. The API key is read from the environment variable named by --api-key-name, or the provider's usual one, on every command
  • --llm - The model as a step's llm field, in YAML or JSON, such as '{provider: openai, model: gpt-5-mini}'; use it or the flags above
  • --profile - Keep cookies and storage under this profile, shared with browser steps that name it
  • --headed - Show the browser window
  • --viewport - Size of the page area, as WIDTHxHEIGHT
  • --executable, --proxy - As in a step's browser options
  • --allowed-domain - Keep the browser on this host or *.domain; repeat for more
  • --idle-timeout - Close the browser when no command arrives for this long (default: 30m, at most 24h)
  • --outline-chars - Most characters of the page outline to report (default: 4000; 0 leaves it out)
  • --write-gate - Write gate mode (default: the host's browser.write_gate, which the flag can only tighten)
  • --write-policy - Write policy file naming the sign-in endpoints whose writes are sent

The result carries the session id the other commands take, the page's url, title, and outline, and cdp_url, the browser's DevTools address, where an application can show the page and let a person act on it. Without a model, the session runs only operations that need none.

With --write-gate rehearse, every write the page sends is blocked and reported under writes, by the command that sent it or, for a write sent while the session waited, by the next command. With --write-gate record, writes are blocked the same way unless the do command that sends one allows its signature with --allow-write; a blocked write fails the operation with write_blocked.

Sessions use the host's browser.client_certificates and browser.trusted_cas settings. Open a new session after changing certificates.

The tls_verified result describes the certificate proxy's check of the final HTTPS host:

  • true: the proxy verified the server certificate.
  • false: no verification result is available. Check warnings for errors.

Check url and title to confirm the page opened as expected. TLS verification does not confirm login or identify which CA was used.

open, do, and describe report a page its site refused as refused: the host, the HTTP status, bot_check naming the check, such as cloudflare, when the site answered with one, and a message saying so in a sentence. An operation that failed on the page ends its error with that sentence, and describe --format text prints it on a Refused: line. Later commands keep reporting the bot check while the browser stays on the page.

browser session do ​

Read one operation from stdin, in JSON or YAML, and run it in the session.

bash
echo '{"act": "Click the Sign in button"}' | dagu browser session do [options] ID

Options:

  • --outline-chars - Most characters of the page outline to report (default: 4000)
  • --allow-write - In a session whose write gate records, let the operation send the write of this signature; repeatable

The operation is written as an item of a browser step's with.do: goto, act, upload, extract, expect, wait, or screenshot, with when and timeout. An upload's relative paths are under the command's working directory. Give the values of the variables an act uses under variables:

json
{"act": "Type %password% into the Password field",
 "variables": {"password": {"env": "PORTAL_PASSWORD"}}}

A variable given as {"env": NAME} is read from the environment on this and every later command of the session, which then need it set, and is masked like a secret in everything the session reports. A plain string serves this command only. Values are never kept.

An element the outline shows with its ID can be acted on by that ID, without the model: {"click": "0-131"}, {"type": {"into": "0-229", "text": "%user%"}}, {"select": {"in": "0-106", "option": "未出荷"}}, or {"upload": {"into": "0-57", "files": "/path/to/invoice.pdf"}}, each with when and timeout as an act takes them. The session keeps a click, typing, or pick as the act a step writes, such as Click the "Sign in" button, reported as act, and an upload as the upload into the element in words, such as the "Receipt" file input, reported as into, with the action it took as its recording.

The result reports the operation's index in the session's history, its status (done, failed, or skipped when its when does not hold), the actions an act or upload performed and whether an exported step replays them (recorded), what an extract read (outputs), saved files, accepted dialogs, blocked requests, the writes the write gate decided, tokens, and the page the browser is on next with its outline. A failed operation exits 1, but the session stays open.

--allow-write sends only the write of the signature a blocked write reported. A form whose write was blocked stays on the page as it was filled in; allowing its write sends the values the form holds then, so check them first.

browser session describe ​

Report what the session's page shows, without asking a model.

bash
dagu browser session describe [options] ID

Options:

  • --find - Show only the outline's entries containing this text, with the entries they sit in
  • --max-chars - Most characters of the outline (default: 8000)
  • --tree - Report the page's accessibility tree as the model sees it, in place of the outline
  • --screenshot - Also save a screenshot of the page under this name
  • --format, -f - json (default) or text

The outline lists headings, fields with their labels, selects with their choice and options, file inputs, buttons, checkboxes, links with their addresses, messages, and tables and lists by their columns and rows, the page's own content before the site's header, menus, and footer. Each element do can act on shows its ID in brackets, and a link to the page's own site shows its path; a long run of alike rows shows the first three and counts the rest. Text typed into fields is never shown.

browser session export ​

Build a browser.run step from the operations the session ran.

bash
dagu browser session export [options] ID

Options:

  • --dag - The DAG the step goes in, by name or YAML file path (required)
  • --step - The step's ID (required)
  • --skip - Leave out the operation with this index in the session's history; repeat for more
  • --dry-run - Build the step without writing its recordings
  • --close - Close the session afterwards
  • --format, -f - json (default), or yaml for the step alone

The step holds the operations that succeeded and those skipped because their when did not hold, in order; failed operations and screenshots are left out. A variable read from the environment becomes ${NAME}, which the DAG declares under its secrets; a literal one becomes a parameter of its own name. The recordings of the acts and uploads are written to the step's replay cache on this host, so its first run replays them without a model request when it meets the pages the session met. Each upload keeps the files the session was given, and export warns about it, until you point files at what each run uploads. A session whose browser has closed can still be exported for a day.

browser session close ​

Close the session's browser and remove the session with its history.

bash
dagu browser session close [--force] [--keep] ID

--force closes it even while another command holds it. --keep ends the session instead: its browser closes and its profile is free for a step, and its history can still be exported for a day.

browser session gate ​

Tell the session's write gate that a person holds the browser, or hands it back.

bash
dagu browser session gate (--person | --guard) ID

With --person, the gate sends the writes the page makes while a person works in the browser, in a --headed window or through cdp_url, and still reports each with the next command. --guard returns the browser to the session's write gate mode.

browser session list ​

List the host's sessions, oldest first, after closing those idle past their timeout. Each has a state: idle while it waits for a command, busy while one runs, or ended once its browser closed.

bash
dagu browser session list

The response lists sessions and supported features:

json
{"sessions": [], "capabilities": ["trusted_cas", "write_gate"]}

trusted_cas means this build supports private CAs and the tls_verified result. Update Dagu if it is missing. It reports feature support, regardless of whether any CA is configured. write_gate means the build supports the write gate flags and writes results.

computer check ​

Check that computer steps can capture the screen and send input on this host. Run it as the same user and in the same session as the worker that runs computer steps.

bash
dagu computer check [--format json]

Options:

  • --format, -f - Output format: text (default) or json

On macOS, the command also asks macOS to show the Screen Recording and Accessibility prompts for the permissions that are missing. Grant Screen Recording and Accessibility to the application that starts Dagu, such as Terminal, or to the dagu binary when it runs on its own. On Windows, the worker must run in a logged-in user session, not as a service, and the screen must stay unlocked.

Output:

System:  darwin
Display: 3024x1964 pixels
Ready:   computer steps can operate this desktop

When the desktop cannot be automated, the command prints a Problem: line for each missing condition and exits nonzero.

With --format json, it prints one object for programs to read, and exits nonzero the same way:

json
{
  "os": "darwin",
  "width": 3024,
  "height": 1964,
  "ready": false,
  "problems": [
    {
      "code": "accessibility",
      "message": "Accessibility permission is missing; grant it in System Settings > Privacy & Security > Accessibility"
    }
  ]
}

width and height are 0 when the display size is unknown, and problems is empty when ready is true. Each problem has one of these codes:

CodeMeaning
unsupportedThe system is not macOS or Windows.
load_failedThe macOS system frameworks could not be loaded.
no_sessionThere is no graphical login session (macOS).
other_sessionAnother user's session has the display (macOS).
service_sessionThe process runs as a Windows service, in session 0.
screen_lockedThe screen is locked, or on Windows a secure prompt is shown.
screen_recordingScreen Recording permission is missing (macOS).
accessibilityAccessibility permission is missing (macOS).
no_displayThe display size is unavailable.
session_disconnectedThe Remote Desktop or child session's client has disconnected, so its display does not draw (Windows).

computer elements ​

List the accessible elements of the window in front, to find the role and name an exact check or a pinned step selects. Elements are read on macOS, with the Accessibility permission, and on 64-bit Windows.

bash
dagu computer elements [options]

Options:

  • --format, -f - Output format: text (default) or json
  • --limit - Most elements to list. Defaults to 400
  • --at-pointer - Report the element under the pointer instead
  • --after - With --at-pointer, how long to wait first, such as 3s, to move the pointer onto the element
  • --watch - Report the element under the pointer whenever it changes, one JSON object per line, until stdin closes or the command is interrupted
  • --match - Report the elements a selector matches, and succeed only when exactly one does. The selector is JSON, or - to read it from stdin

Each element has its role, name, id, value, the label it is linked to, its bounds in display pixels, its window, and its path from the window down. In JSON, an element that takes no input, such as a grayed-out button, also has "disabled": true, and on macOS an empty field has the hint it shows as placeholder.

bash
dagu computer elements --at-pointer --after 3s
dagu computer elements --match '{"role": "button", "name": "Save", "in": {"role": "group", "name": "Payment"}}'

With --format json, the result is one object. A failing command prints {"error": {"code", "message"}} and exits 1, with one of the codes invalid_input, unsupported, load_failed, no_elements, not_found, ambiguous, failed, or a computer check problem code.

computer cache clear ​

Clear the recorded act operations that computer steps replay, so the next run asks the model again.

bash
dagu computer cache clear [options] DAG

Options:

  • --step - Clear only the step with this ID, or its name when the step has no ID
  • --op - With --step, forget only the task at this position in with.do, counted from 1

Without --step, every step of the DAG is cleared. The cache lives on the host that ran the step; in distributed mode, run the command on the worker.

bash
dagu computer cache clear invoices
dagu computer cache clear invoices --step post
dagu computer cache clear invoices --step post --op 3

computer cache show ​

Show what a DAG's computer steps recorded on this host, written the way a step pins it: an act's recorded steps and an extract's fields, keyed by the system the recording was made on. Written into the step, they run on every host of that system with no model and no recording of its own.

bash
dagu computer cache show [options] DAG

Options:

  • --step - Show only the step with this ID, or its name when the step has no ID
  • --op - With --step, show only the task at this position in with.do, counted from 1
  • --format, -f - Output format: text (default) or json

A task whose instruction changed, or that ran with other parameters, has a recording for each, and the newest comes first. An act with an action that has no pinned form, such as a drag, a click where no element could be read, or a click near an element's edge, cannot be pinned; each such action is listed with its turn and the reason instead. An act whose actions never used a variable its task names, as one recorded where a field already showed the value, says so in a comment above its steps: pinned, they leave that field as each run finds it. An act recorded by an older release, which did not note such variables, says to check its steps instead.

With --format json, the result is {"operations": [...]}, each with step, op, kind, system, saved_at, assumes (the variables the steps never use), assumes_unknown (set for an act recorded by an older release), and either recorded, fields, or unpinnable, whose items carry turn, action, code, and reason.

bash
dagu computer cache show invoices --step post --op 2

xlsx inspect ​

Describe every sheet of a workbook before writing xlsx steps for it: its used range, the detected data block, the header row and column names, the type and a profile of each column, the number of data rows, its tables, and a few typed sample rows. Named ranges and the date system are listed for the workbook. This is what xlsx.info publishes, read directly from the workbook; nothing is written and no run is created.

Types and the profile come from every data row of the block, up to 5000: how many cells are filled and blank, how many distinct values there are, the values themselves when a few repeat, the lowest and highest number or date, and the cells that do not read as the column's type, such as 未定 in a number column. The text format shows the profile after each column name:

text
Columns: 状態 (string: 済, 未; 40 blank), 数量 (number; 1..250; 1 odd: D300 "未定")
bash
dagu xlsx inspect <path> [options]

Use - as <path> to read the workbook from standard input, up to 64 MiB. Larger input fails before workbook parsing. This limit applies only to standard input. With --format json, the result reports "path": "-" for stdin.

Options:

  • --sheet - Describe this sheet only
  • --rows, -n - Typed sample rows to show per sheet (default: 5)
  • --format, -f - Output format: text (default) or json
bash
dagu xlsx inspect orders.xlsx
dagu xlsx inspect orders.xlsx --sheet Orders --rows 10
dagu xlsx inspect orders.xlsx --format json
cat orders.xlsx | dagu xlsx inspect - --format json

With --format json, the result is one object with path, date_system, sheets (each with name, used_range, range, header_row, headers, types, row_count, columns, profile_truncated, tables, and sample), named_ranges, and warnings. Each entry of columns has name, type, filled, blank, distinct, and, when there is something to report, values, min, max, odd, and odd_cells; see Looking at a Workbook First. The command exits nonzero with the error on stderr when the workbook cannot be read.

xlsx read ​

Print the rows of a sheet the way xlsx.read publishes them: numbers stay numbers, dates become ISO 8601 text, text keeps its leading zeros, and each row carries _row, its sheet row number.

bash
dagu xlsx read <path> [options]

Use - as <path> to read the workbook from standard input, up to 64 MiB. Larger input fails before workbook parsing. This limit applies only to standard input.

Options:

  • --sheet - Sheet name; the first sheet by default
  • --range - Cell range, Sheet!A2:F reference, named range, or table name
  • --header - true (default), false, a row number, or rows such as 3,4
  • --columns - Columns to keep, comma-separated, with optional name:alias renames
  • --types - Column types to pin, as comma-separated name:type pairs or a JSON object when a name holds a comma; a type is string, number, integer, boolean, date, or datetime, converted as types converts them
  • --on-type-error - What a cell that does not convert to its pinned type does: fail (default) fails the read, warn (also spelled null) reads it as null, and keep keeps the value as read; warn and keep add a warning
  • --max-rows - Most rows to print (default: 5000)
  • --skip-hidden - Leave out rows hidden by a filter or by hand
  • --password - Password of a protected workbook; DAGU_XLSX_PASSWORD supplies it when the flag is omitted
  • --format, -f - Output format: text (default) or json

Prefer DAGU_XLSX_PASSWORD on a shared host: a --password value is visible in the process list and kept in shell history. The flag wins when both are set.

bash
dagu xlsx read orders.xlsx
dagu xlsx read orders.xlsx --sheet Orders --range A2:F --header false
dagu xlsx read orders.xlsx --columns "Invoice No,Amount" --format json
dagu xlsx read orders.xlsx --types "Amount:number,Due:date" --on-type-error keep
dagu xlsx read orders.xlsx --skip-hidden
cat orders.xlsx | dagu xlsx read - --sheet Orders --format json

The text format prints a tab-separated header line and one line per row. With --format json, the result is one object with rows, count, headers, sheet, range, warnings, and truncated.

xlsx cache clear ​

Remove the cells an xlsx.extract step cached by sheet layout on this host, so its next run asks the model again.

bash
dagu xlsx cache clear [options] DAG

Options:

  • --step - Clear one step by its ID or name; by default every extract step of the DAG
bash
dagu xlsx cache clear quotes
dagu xlsx cache clear quotes --step fields

Prints Removed xlsx replay cache for step "fields" of DAG "quotes" for each step cleared, or No xlsx replay cache for DAG "quotes". dagu rm --history removes the cache together with the run history.

enqueue ​

Add a DAG to the execution queue.

For a DAG with restart_policy: always or unless-stopped, this fails while a run of it is active. See Services.

bash
dagu enqueue [options] DAG_NAME_OR_FILE [-- PARAMS...]

Options:

  • --run-id, -r - Custom run ID
  • --params, -p - Parameters as key=value pairs, positional values, or a JSON object
  • --name, -N - Override the DAG name (default: name from DAG definition or filename)
  • --queue, -u - Override DAG-level queue name for this enqueue
  • --scheduled-at - Run for a schedule slot, as for start
  • --params-stdin - Read parameters from piped or redirected stdin, up to 1 MiB; -- and --params take precedence
  • --profile - Runtime profile to apply when the queued run starts
  • --no-reuse - Recompute eligible build steps when the queued run starts
  • --labels - Additional labels, comma-separated key=value or key (--tags is a deprecated alias)
  • --worker-label - Worker label (key=value) the run requires, replacing the DAG's worker_selector; repeatable
  • --node - Node to narrow the run to, as for start; repeatable. The queued run keeps the list
  • --default-working-dir - Working directory for DAGs without an explicit working directory
bash
dagu enqueue my-workflow.yaml
dagu enqueue --run-id=batch-001 etl.yaml -- TYPE=daily
# Enqueue to a specific queue (override)
dagu enqueue --queue=high-priority my-workflow.yaml
# Override DAG name
dagu enqueue --name my_custom_name my-workflow.yaml
# Select a runtime profile
dagu enqueue --profile prod my-workflow.yaml
dagu enqueue --no-reuse report-pipeline.yaml

See Build Workflows for reuse decisions and dry-run behavior.

profile ​

Manage runtime profiles in the local Dagu data directory.

bash
dagu profile <command>

Subcommands:

  • list - List runtime profiles.
  • show <profile> - Show profile metadata and entries. Secret values are masked.
  • create <profile> - Create a profile.
  • enable <profile> - Enable a disabled profile.
  • disable <profile> - Disable a profile so new runs cannot use it.
  • delete <profile> - Delete a profile.
  • set-var <profile> <key> <value> - Set a plain variable entry.
  • set-secret <profile> <key> - Set or rotate a secret entry.
  • delete-key <profile> <key> - Delete one profile entry.

Examples:

bash
dagu profile create prod --description "Production runtime settings"
dagu profile set-var prod LOG_LEVEL info
printf '%s\n' "$PROD_API_TOKEN" | dagu profile set-secret prod API_TOKEN --value-stdin
dagu profile show prod

The profile command is local-only. Use Profiles in the Web UI or the REST API for a remote server.

See Runtime Profiles for behavior, permissions, and retry rules.

secret ​

Read secrets from the local Dagu data directory.

bash
dagu secret resolve <ref> [--workspace <name>]

resolve prints the current value of a DAG secret ref to stdout without a trailing newline. With --workspace, it checks that workspace first and then Global, like a DAG run. It fails for an unknown workspace and for disabled, missing, or empty secrets.

bash
export OPENAI_API_KEY="$(dagu secret resolve prod/openai-api-key)"

Each read is recorded in the audit log when audit logging is enabled. If the entry cannot be written, the value is not printed.

The secret command is local-only. The Web UI and REST API do not return secret values.

nodes ​

Work with nodes: the hosts of node inventories and the workers that set worker.id.

bash
dagu nodes list [--labels <selector>] [--inventory <name|id>] [--format/-f table|json]
dagu nodes show <name> [--format/-f table|json]
dagu nodes add <name> --host <host> [--inventory <name|id>] [flags]
dagu nodes remove <name>
dagu nodes forget <name>
dagu nodes test [<name>...] [--labels <selector>]
dagu nodes import <file> [--replace] [--dry-run]
dagu nodes export [--inventory <name|id>]

Subcommands:

  • list - Nodes the selector matches, or every node without --labels, in name order, with each inventory's defaults applied. Worker nodes are included, except with --inventory. The table has the columns NAME, INVENTORY, KIND, HOST, LABELS, and STATUS.
  • show <name> - One node with its inventory, labels, and connection settings. The name is compared without case.
  • add <name> - Add a new node to an inventory. It tests the connection first and asks before it trusts an unknown host key.
  • remove <name> - Remove a node from the inventory that holds it, and forget its trusted host key.
  • forget <name> - Forget an offline worker node until its worker connects again.
  • test - Test the named nodes, the nodes --labels matches, or every node: host key, authentication, and true. It asks before it trusts unknown keys or replaces changed ones, and exits non-zero when any node fails.
  • import <file> - Import a JSON array of inventories. --replace replaces inventories whose name exists, keeping their IDs. --dry-run checks the import and stores nothing.
  • export - Print inventories as a JSON array in name order, without their IDs.

Options:

  • --labels - Selector: label filter terms separated by commas, all of which must match, such as site=tokyo,web,!canary
  • --inventory - Inventory, by name or ID. For add, it may be left out when there is one inventory
  • --format, -f - table (default) or json, for list and show

add options:

  • --host - Host name or IP address (required)
  • --port - SSH port (default: the inventory's, or 22)
  • --user - SSH user (default: the inventory's)
  • --key - Path of the SSH private key. A relative path is stored as an absolute path
  • --key-secret - Secret ref of the SSH private key, in place of --key
  • --password-secret - Secret ref of the SSH password
  • --passphrase-secret - Secret ref of the key's passphrase
  • --bastion - Node of the same inventory to connect through
  • --labels - Labels of the node, comma-separated: key or key=value
  • --description - Description of the node
  • --no-test - Add the node without testing its connection
bash
dagu nodes import inventories.json --dry-run
dagu nodes import inventories.json
dagu nodes list --labels 'site=tokyo,web,!canary'
dagu nodes show tokyo-db01 --format json
dagu nodes add tokyo-web03 --inventory "Tokyo production" --host 10.0.1.13 --labels web
dagu nodes test --labels web
dagu nodes export > inventories.json

Every subcommand also runs against a remote context, with the same output. add and test then connect from the server, and a remote add needs a --key path the server can read: absolute, or starting with ~ or $. Forgetting a worker node on a remote server needs the admin role.

dequeue ​

Remove a DAG from the execution queue.

bash
dagu dequeue <queue-name> --dag-run=<dag-name>:<run-id>  # remove specific run
dagu dequeue <queue-name>                                # pop the oldest item

Example:

bash
dagu dequeue default --dag-run=my-workflow:batch-001
dagu dequeue default

version ​

Display version information.

bash
dagu version

config ​

Show the resolved filesystem paths used by Dagu.

bash
dagu config
dagu config --dagu-home /custom/path
dagu config --values
dagu config --values --format json

Options:

  • --values - Print each setting that has an environment variable, with its value and source: default, file, or env:<NAME>. Secret values are masked
  • --format, -f - Output format for --values: table (default) or json. Requires --values

Values are shown as read from the file, the environment, or the defaults, before Dagu derives its own values, so a derived setting can show as empty. auth.mode shows the mode Dagu runs in. See Check Effective Settings.

schema ​

Browse the JSON schema for DAG definitions, server configuration, calendar files, or workflow test files.

bash
dagu schema dag
dagu schema dag steps
dagu schema dag steps.container
dagu schema config
dagu schema config server
dagu schema calendar
dagu schema calendar holidays
dagu schema test
dagu schema test cases.expect

Save the test file schema for an editor with dagu schema test > workflow-test.schema.json. See Editor Support.

calendar ​

Check business calendars and preview the runs they allow. Calendar files live in paths.calendars_dir.

calendar check ​

bash
dagu calendar check [calendar files...]

Validates every <name>.yaml calendar file in paths.calendars_dir, or the files given. A file given as a path must be named <name>.yaml, and its includes are read from the files beside it. Each problem is printed on its own line with its position. The command exits non-zero when any calendar is invalid.

ok   jp-banking: 2 holidays, through 2027-12-31
FAIL ops: [1:17] field 'weekdays[1]': unknown day FUN; use MON, TUE, WED, THU, FRI, SAT, or SUN
FAIL ops: [3:5] field 'holidays[0]': invalid date "2027-13-01": use YYYY-MM-DD
Error: 1 of 2 calendars are invalid

To check that the DAGs naming a calendar find it, run dagu validate on them.

calendar fires ​

bash
dagu calendar fires [--from <RFC 3339 time>] [--count <n>] <DAG>

Lists the next times a DAG's start schedules fire, ten by default, with the business day each fire matched and the holidays it skipped. For a DAG with dates, a DATES column shows the dates each fire's run gets: each entry as name=date, and a list as name=first..last. --from sets only where the listing starts, so a past --from lists past fires; schedules without a time zone prefix are still evaluated in core.tz.

bash
dagu calendar fires payroll
dagu calendar fires payroll.yaml --from 2027-01-01T00:00:00+09:00 --count 20

backfill ​

Run a scheduled DAG for past schedule slots. See Backfill.

backfill start ​

bash
dagu backfill start <DAG> (--from <time> [--to <time>] [--by <dates entry>] | --slot <time>...) [flags]

Plans a backfill, prints the plan, and starts it once confirmed. The scheduler queues the runs.

FlagMeaningDefault
--fromFirst slot, inclusive: a date, a time without an offset, or an RFC 3339 timerequired without --slot
--toLast slot, inclusivenow
--byA dates entry: --from and --to then name its dates, and the slots whose entry falls in that range run-
--slotA slot to run; repeatable. Excludes --from, --to, and --rerun-
--rerunnone, failed, or allnone
--max-concurrencyRuns of the backfill at once1
--on-failurestop or continuestop
--paramsParams for every runthe DAG's defaults
--profileRuntime profile for every runthe DAG's default
--dry-runPrint the plan and start nothingoff
--formattext or jsontext
--yes, -yStart without asking; required without a terminaloff
bash
dagu backfill start etl --from 2026-10-02 --to 2026-11-01
dagu backfill start etl --from 2026-10-02 --rerun failed --dry-run
dagu backfill start etl --slot 2026-10-05T02:00 --slot 2026-10-09T02:00 --yes

backfill ls ​

bash
dagu backfill ls [<DAG>]

Lists backfills, oldest first, with their status and number of slots.

backfill status ​

bash
dagu backfill status <backfill id> [--watch] [--format text|json]

Shows a backfill's status, the state and run of each slot, and why an open backfill makes no progress. --watch follows the backfill until it ends and exits 0 only when it succeeds.

backfill cancel ​

bash
dagu backfill cancel <backfill id> [--stop-running]

Withdraws the backfill's queued runs and cancels the slots it has not reached. Running runs finish unless --stop-running stops them.

backfill resume ​

bash
dagu backfill resume <backfill id> [--max-concurrency <n>] [--on-failure stop|continue] [--dry-run] [--format text|json] [--yes]

Plans again the slots that have not succeeded, with the DAG's current definition, and runs them with new runs.

example ​

List bundled example DAGs or print one example by numeric ID.

bash
dagu example
dagu example 1
dagu example 7

completion ​

Generate shell completion scripts.

bash
dagu completion bash
dagu completion fish
dagu completion powershell
dagu completion zsh

upgrade ​

Upgrade the Dagu binary to the latest release or a specified version.

bash
dagu upgrade --check
dagu upgrade
dagu upgrade --version vX.Y.Z
dagu upgrade --dry-run

Use --yes to skip prompts in automation. --backup keeps a copy of the current binary, --pre-release includes pre-release versions, and --force, -f allows a downgrade. Self-upgrade is unavailable for package-manager or container installs such as Homebrew, Snap, go install, Docker, Podman, and Kubernetes. After a successful upgrade, the command offers to restart the service the installer set up, or with --yes prints how to restart it; see Restarting After an Upgrade.

license ​

Connect to Dagu Console, activate, deactivate, or check Dagu license status.

bash
dagu license activate [--report errors|runs|health|off]
dagu license activate <key>
dagu license check
dagu license deactivate
  • activate without a key asks what the server reports to Dagu Console, unless --report or cloud.report sets it, then prints a Dagu Console URL and a short code and waits up to an hour for a workspace owner to approve this server. Open the URL in any browser; the license and the report level are saved once the request is approved. Press Ctrl-C to cancel. Without a terminal, for example in a script, it fails at once instead of waiting. See Connect a Server.
  • activate <key> exchanges a server key or license key from Dagu Console for a license.
  • check prints the plan, features, expiry, and status, plus the workspace, server name and ID, license ID, how the license reached this server, the last check-in, and the server's Dagu Console page.
  • deactivate frees the server's slot in Dagu Console and returns to community mode. If the console cannot be reached, the server still deactivates locally and prints the Dagu Console page where you can disconnect it.

activate and deactivate write the license to the data directory. Restart a running dagu start-all or dagu server to load the change, or use Plan & features in the web UI, which applies it immediately.

cleanup ​

cleanup is a deprecated compatibility alias for dagu rm --history. It removes DAG run history only; use dagu rm --definition to remove a DAG YAML definition.

bash
dagu cleanup [options] DAG_NAME

Options:

  • --retention-days - Number of days to retain (default: 0 = delete all)
  • --dry-run - Preview what would be deleted without actually deleting
  • --yes, -y - Skip confirmation prompt

Active runs (running, queued) are never deleted for safety. Unlike dagu rm --history, it does not clear the DAG's browser and computer replay caches; use dagu browser cache clear or dagu computer cache clear.

bash
# Deprecated: delete all history
dagu cleanup my-workflow

# Preferred equivalent
dagu rm --history my-workflow

# Deprecated: keep the last 30 days
dagu cleanup --retention-days 30 my-workflow

# Preferred equivalent
dagu rm -H --older-than 30d my-workflow

# Preview without deleting
dagu cleanup --dry-run my-workflow
dagu rm -H --dry-run my-workflow

# Skip confirmation
dagu cleanup -y my-workflow
dagu rm -H --force my-workflow

Output:

# Dry run output
Dry run: Would delete 5 run(s) for DAG "my-workflow":
  - 019b1c4b-1b1e-7232-b12d-e822dac72613
  - 019b1c4b-13e1-7251-a713-aaad60dfa88c
  ...

# Actual deletion output
Successfully removed 5 run(s) for DAG "my-workflow"

sync ​

Manage Git synchronization for workflows, Wiki content, calendars, and supporting files.

bash
dagu sync <subcommand>

Requires git_sync.enabled: true in configuration. See Git Sync for full documentation.

sync status ​

Show current sync status.

bash
dagu sync status

Displays repository URL, branch, last sync info, status counts per state, and a table of non-synced items. Supporting-file IDs include their file extensions.

sync pull ​

Pull changes from remote repository.

bash
dagu sync pull

Reports how many items were synchronized and how many unchanged local DAGs, Wiki pages, attachments, and supporting files were removed after a remote deletion. Locally edited items remain as conflicts; untracked items are left alone.

sync publish ​

Publish local changes to remote.

bash
dagu sync publish <item-id> [options]
dagu sync publish --all [options]

Options:

  • -m, --message - Commit message
  • --all - Publish all modified and untracked items
  • -f, --force - Force publish even with conflicts

Provide either an item ID or --all, not both.

bash
dagu sync publish my-dag -m "Update dag"
dagu sync publish wiki/operations/runbook -m "Update runbook"
dagu sync publish scripts/report.py -m "Update report script"
dagu sync publish skills/review/SKILL.md -m "Update review skill"
dagu sync publish --all -m "Batch update"
dagu sync publish my-dag --force -m "Overwrite remote"

sync discard ​

Discard local changes for an item.

bash
dagu sync discard <item-id> [options]

Options:

  • -y, --yes - Skip confirmation prompt
bash
dagu sync discard my-dag
dagu sync discard scripts/report.py -y

sync forget ​

Remove state entries for missing, untracked, or conflict items.

bash
dagu sync forget <item-id> [item-id...] [options]

Options:

  • -y, --yes - Skip confirmation prompt

Does not touch files on disk or remote. Rejects synced and modified items. Accepts multiple item IDs.

bash
dagu sync forget missing-dag
dagu sync forget item-a item-b item-c -y

sync cleanup ​

Remove all missing entries from sync state.

bash
dagu sync cleanup [options]

Options:

  • --dry-run - Show what would be cleaned without making changes
  • -y, --yes - Skip confirmation prompt

Does not touch files on disk or remote.

bash
dagu sync cleanup --dry-run
dagu sync cleanup -y

sync delete ​

Delete items from remote repository, local disk, and sync state.

bash
dagu sync delete <item-id> [options]
dagu sync delete --all-missing [options]

Options:

  • -m, --message - Commit message
  • --force - Force delete even with local modifications
  • --all-missing - Delete all missing items
  • --dry-run - Show what would be deleted without making changes
  • -y, --yes - Skip confirmation prompt

Provide either an item ID or --all-missing, not both. Untracked items cannot be deleted (use forget instead).

bash
dagu sync delete my-dag -m "Remove old dag"
dagu sync delete wiki/operations/runbook -m "Remove old runbook"
dagu sync delete scripts/report.py -m "Remove report script"
dagu sync delete my-dag --force -m "Remove despite modifications"
dagu sync delete --all-missing -m "Clean up missing"
dagu sync delete my-dag --dry-run
dagu sync delete --all-missing --dry-run

sync mv ​

Rename a tracked item locally and in the remote repository.

bash
dagu sync mv <old-id> <new-id> [options]

Options:

  • -m, --message - Commit message
  • --force - Force move even with conflicts
  • --dry-run - Show what would be moved without making changes
  • -y, --yes - Skip confirmation prompt

Both source and destination must be of the same kind.

bash
dagu sync mv old-dag new-dag -m "Rename workflow"
dagu sync mv wiki/operations/runbook wiki/operations/deploy -m "Rename runbook"
dagu sync mv scripts/report.py scripts/render.py -m "Rename report script"
dagu sync mv old-dag new-dag --force -m "Move despite conflict"
dagu sync mv old-dag new-dag --dry-run

External AI Coding Tool Integration ​

Install the Dagu skill for external AI coding tools with GitHub CLI:

bash
gh skill install dagucloud/dagu dagu --scope user

The skill helps AI coding tools write correct Dagu workflow YAML. To let MCP-capable clients operate a running Dagu server, start Dagu and configure the client to use:

text
http://localhost:8080/mcp

gh asks which tool to install the skill for; add --agent, such as --agent codex, to skip the question. For details, see Skills and MCP Server.

coordinator ​

Start the coordinator gRPC server for distributed task execution.

bash
dagu coordinator [options]

Options:

  • --coordinator.host - Host address to bind (default: 127.0.0.1)
  • --coordinator.advertise - Address to advertise in service registry (default: auto-detected hostname)
  • --coordinator.port - Port number (default: 50055)
  • --coordinator.health-port - HTTP health check port (default: 8091, 0 disables)
  • --peer.cert-file - Path to TLS certificate file for peer connections
  • --peer.key-file - Path to TLS key file for peer connections
  • --peer.client-ca-file - Path to CA certificate file for client verification (mTLS)
  • --peer.ca-cert-file - Path to the peer CA certificate for built-in TLS
  • --peer.ca-key-file - Path to the private key of --peer.ca-cert-file
  • --peer.insecure - How this process calls a coordinator: true uses h2c only, and false uses TLS only (default: unset). Unset lets Dagu choose per address. It tries built-in TLS with a usable TLS source and can fall back to h2c. It does not change what the coordinator serves; to refuse h2c calls, set coordinator.require_tls: true. See Distributed Transport Security
  • --peer.skip-tls-verify - Skip TLS certificate verification (insecure)
bash
# Basic usage
dagu coordinator --coordinator.host=0.0.0.0 --coordinator.port=50055

# Bind to all interfaces and advertise service name (for containers/K8s)
dagu coordinator \
  --coordinator.host=0.0.0.0 \
  --coordinator.advertise=dagu-server \
  --coordinator.port=50055 \
  --coordinator.health-port=8091

# With TLS
dagu coordinator \
  --peer.cert-file=server.pem \
  --peer.key-file=server-key.pem

# With mutual TLS
dagu coordinator \
  --peer.cert-file=server.pem \
  --peer.key-file=server-key.pem \
  --peer.client-ca-file=ca.pem

The coordinator service enables distributed task execution by:

  • Accepting task polling requests from workers
  • Matching tasks to workers based on labels
  • Tracking worker health via heartbeats
  • Providing the task distribution API, with workers failing over between the coordinators they are given, which must share server state
  • Receiving run status, logs, artifacts, and state requests over gRPC

When run directly, the coordinator also exposes GET /health on --coordinator.health-port for per-instance liveness checks. dagu start-all does not expose this dedicated coordinator health port.

worker ​

Start a worker that polls the coordinator for tasks.

bash
dagu worker [options]

Options:

  • --worker.coordinators - Required coordinator addresses (format: host1:port1,host2:port2)
  • --worker.id - Worker instance ID (default: hostname@PID)
  • --worker.max-active-runs - Maximum number of active runs (default: 100)
  • --worker.health-port - HTTP health check port (default: 8092, 0 disables)
  • --worker.labels, -l - Worker labels for capability matching (format: key1=value1,key2=value2); keys and values are lowercased, and an invalid label stops the worker
  • --worker.shutdown-timeout - How long a stopping worker drains running DAG runs before it cancels them (default: 60s, 0 waits without a bound)
  • --worker.invite - Invite from Add worker or dagu worker invite, to join over built-in TLS; see Add Workers With Invites
  • --check - Check the connection to each coordinator and exit, without taking tasks; see Check Worker Connections
  • --peer.insecure - true uses h2c only, and false uses TLS only (default: unset). Unset lets Dagu choose per address. It tries built-in TLS with a usable TLS source and can fall back to h2c. See Distributed Transport Security
  • --peer.cert-file - Path to TLS certificate file for peer connections
  • --peer.key-file - Path to TLS key file for peer connections
  • --peer.client-ca-file - Path to CA certificate file for server verification
  • --peer.ca-cert-file - Path to the peer CA certificate for built-in TLS
  • --peer.skip-tls-verify - Skip TLS certificate verification (insecure)
bash
export DAGU_WORKER_COORDINATORS=coordinator-1:50055

# Basic usage
dagu worker

# With custom configuration
dagu worker \
  --worker.id=worker-1 \
  --worker.max-active-runs=50 \
  --worker.health-port=8092

# With labels for capability matching
dagu worker --worker.labels gpu=true,memory=64G,region=us-east-1
dagu worker --worker.labels cpu-arch=amd64,instance-type=m5.xlarge

# With TLS connection
dagu worker \
  --peer.insecure=false \
  --peer.client-ca-file=ca.pem

# With mutual TLS
dagu worker \
  --peer.insecure=false \
  --peer.cert-file=client.pem \
  --peer.key-file=client-key.pem \
  --peer.client-ca-file=ca.pem

# Join with an invite
dagu worker \
  --worker.coordinators=192.168.1.20:50055 \
  --worker.invite='REPLACE_WITH_INVITE'

# Temporarily skip certificate verification
dagu worker \
  --peer.insecure=false \
  --peer.client-ca-file=ca.pem \
  --peer.skip-tls-verify

Workers connect to the configured coordinators, send regular heartbeats, and poll for tasks matching their labels. They report status, logs, artifacts, and state operations over gRPC. Each worker also exposes GET /health on --worker.health-port for per-instance liveness checks, and GET /ready, which answers 503 until the worker receives its first successful heartbeat response from a coordinator.

--check prints any ignored-setting warnings and the start line. A completed coordinator check shows Transport, Reachable, Handshake, Credential, and Coordinator answered. With worker.invite set, a successful TLS handshake also shows Invite pin. It registers no worker, takes no task, and exits with code 0 when every coordinator passes, and with code 1 otherwise. See Check Worker Connections for sample output.

worker invite ​

Create an invite for a worker on another host, and print the command to run there.

text
dagu worker invite --address <host:port> [--reusable] [--expires <duration>]

Options:

  • --address - Required. The host:port workers dial. It appears in the start command. See The Address Rule.
  • --reusable - Create a reusable invite, which any number of workers can join with. Without it, the invite is single use
  • --expires - Expiry as a positive duration, such as 72h. A single-use invite expires after 24 hours when not given; a reusable one does not expire
text
$ dagu worker invite --address 192.168.1.20:50055
Invite (single use, expires 2026-11-29T07:48:19Z):
  dagu1.<pin>.<secret>
Run on the worker host:
  dagu worker --worker.coordinators=192.168.1.20:50055 --worker.invite=dagu1.<pin>.<secret>
  • It calls the coordinators in worker.coordinators when set, else the live coordinators in the service registry of its data directory, with the peer token. Run it on a host whose processes have the coordinator's peer token.
  • It first checks that each coordinator can accept workers from other hosts. While one cannot, it prints the change to make to standard error, creates no invite, and exits with code 1.
  • A refusal for the peer token says to set the same peer.token on the calling host. For a connection failure, run dagu worker --check on the calling host.
  • The invite appears only in this output. When it cannot write the output, it exits with code 1 and reports whether it deleted the invite. If deletion failed, delete the invite using the reported ID.
  • --reusable prints Invite (reusable, no expiry):, or Invite (reusable, expires <time>): with --expires. An IPv6 address is quoted in the printed command.

See Add Workers With Invites.

peer init ​

Generate a peer CA and a peer token, for coordinators that should share one CA, such as in Kubernetes.

text
dagu peer init --out <dir>
  • It prints the CA certificate, CA key, and peer token paths, in that order.
  • Set peer.ca_cert_file and peer.ca_key_file on the coordinator to the certificate and key paths. Set peer.token to the token value. For other peer processes, set peer.ca_cert_file and the same peer.token.
  • It reads no config file and needs no running Dagu.
  • When any of the three files exists, it writes none, names the file, and exits with code 1.

See Processes on Another Host.

Configuration ​

Priority: CLI flags > Environment variables > Config file

Using Custom Home Directory ​

The --dagu-home flag allows you to override the application home directory for a specific command invocation. This is useful for:

  • Testing with different configurations
  • Running multiple Dagu instances with isolated data
  • CI/CD scenarios requiring custom directories
bash
# Use a custom home directory for this command
dagu --dagu-home=/tmp/dagu-test start my-workflow.yaml

# Start server with isolated data
dagu --dagu-home=/opt/dagu-prod start-all

# Run scheduler with specific configuration
dagu --dagu-home=/var/lib/dagu scheduler

When --dagu-home is set, it overrides the DAGU_HOME environment variable and uses a unified directory structure:

$DAGU_HOME/
├── dags/              # DAG definitions
├── logs/              # All log files
├── data/              # Application data
│   └── suspend/       # DAG suspend flags
├── config.yaml        # Main configuration
└── base.yaml          # Shared DAG defaults

Key Environment Variables ​

  • DAGU_HOME - Set all directories to this path
  • DAGU_HOST - Server host (default: 127.0.0.1)
  • DAGU_PORT - Server port (default: 8080)
  • DAGU_DAGS_DIR - DAGs directory
  • DAGU_LOG_DIR - Log directory
  • DAGU_DATA_DIR - Data directory
  • DAGU_AUTH_BASIC_USERNAME - Basic auth username
  • DAGU_AUTH_BASIC_PASSWORD - Basic auth password

Dagu is open source under the GNU General Public License v3.0.