Skip to content

Dagweave Local commands

Everything is in the one dagweave binary. Run dagweave help for a summary or dagweave COMMAND -h for a command’s flags. Flags can go before or after the file or run name. If you know the argo CLI, you can usually type dagweave in its place.

Command What it does
dagweave run FILE Run a workflow. submit does the same.
dagweave lint FILE Check a workflow for anything that can’t run locally, without running it.
dagweave expr EXPR Try out an Argo expression and see what Argo would get.
dagweave runs List the runs on this machine, newest first. list does the same.
dagweave get [RUN] Show a run’s steps and how each one finished.
dagweave logs [RUN] Print a run’s step output.
dagweave delete RUN Delete a run and its output. --all deletes every run.
dagweave prune [NAME] Delete the local cluster and its disk.
dagweave secret Store credentials that your steps read as Kubernetes Secrets.
dagweave login Sign this machine in to the Dagweave app.
dagweave logout Sign this machine out.
dagweave listen Take runs from the Dagweave app until you press Ctrl-C.
dagweave version Print the version.
Terminal window
dagweave run my-workflow.yaml
dagweave run -p message=hello -parallel 2 my-workflow.yaml
  • -p name=value sets a workflow parameter. Repeat it for more.
  • -parallel N caps how many steps run at once. The default, 0, means the smaller of your CPU count and 4 on the host, and the workflow’s own parallelism on the local cluster.

A run stays in the foreground, so there’s no wait, watch, stop or retry. Ctrl-C stops it. To retry, run the file again.

Terminal window
dagweave lint my-workflow.yaml

Runs the same checks as run, including every when, depends and {{=...}}, without running anything. Exits non-zero if the run would be stopped. See Unsupported workflows.

Terminal window
dagweave expr --param count=3 'asInt(inputs.parameters.count) * 2'
dagweave expr --when --output flip.result=heads '{{steps.flip.outputs.result}} == heads'
dagweave expr --item '{"region":"eu-west"}' 'deploy-{{=sprig.upper(item.region)}}'

Prints what Argo would get for one expression, and its type. asInt, asFloat, jsonpath, toJson and sprig all work. Pass a bare expression, as you’d write it inside {{=...}}, or a whole field with {{...}} tags. Values are strings, as in Argo, so wrap them in asInt or asFloat to do sums.

Flag What it sets
--param NAME=VALUE inputs.parameters.NAME and workflow.parameters.NAME. A name with a dot in it is used as written, such as --param workflow.name=demo.
--output STEP.NAME=VALUE The step’s result, exitCode, status or output parameter NAME, under both steps.STEP and tasks.STEP.
--item JSON The loop’s current item. A JSON object also sets item.KEY for each key. Anything that isn’t JSON is a string.
--when Tests a step’s condition, which has to come out true or false. Also prints the text after the tags are filled in.

On an error, expr exits non-zero and points at the problem:

dagweave: column 7: nothing called inputs.parameters.m is in scope.
asInt(inputs.parameters.m) * 2
^
Give it a value with --param m=VALUE.
Terminal window
dagweave runs

One line per run. Runs are named after their workflow, so running a file again replaces its earlier run.

Terminal window
dagweave get
dagweave get pipeline

Shows a run’s status and timings, step by step. With no name, the latest run.

Terminal window
dagweave logs
dagweave logs --step shout pipeline
dagweave logs --follow pipeline

Prints a run’s step output. With no name, the latest run.

  • --step NAME prints only that step.
  • --follow keeps printing while the run is going.

Output is saved on disk, so it outlives the containers. It’s the only copy.

Terminal window
dagweave delete pipeline
dagweave delete --all

Deletes a run and everything its steps wrote. It doesn’t ask first and can’t be undone.

Terminal window
dagweave prune

Deletes the local cluster and its disk to free memory and space. Runs and secrets stay. Pass a name to delete a cluster other than the default. See Housekeeping.

Terminal window
dagweave secret set git-creds username=ana password=@./git-token
dagweave secret list
dagweave secret rm git-creds

Stores credentials that steps read as Kubernetes Secrets. Every cluster run copies them into the local cluster. dagweave lint warns about a Secret you haven’t stored.

  • set NAME KEY=VALUE ... adds keys to a secret, creating it if needed. Existing keys are kept.
  • KEY=@path reads the value from a file and KEY=- from stdin. Use these for anything sensitive so it stays out of your shell history.
  • list prints names and keys, never values.
  • rm NAME deletes a secret. The next cluster run removes it from the cluster too.

Store a registry credential under the key .dockerconfigjson, or imagePullSecrets can’t pull with it:

Terminal window
dagweave secret set regcred .dockerconfigjson=@$HOME/.docker/config.json

Secrets are kept unencrypted in your state directory, readable only by your user and anything else that can read your home directory.

Terminal window
dagweave login
dagweave login -endpoint https://staging.dagweave.com

Signs this machine in to the Dagweave app. It prints a link and a code. Approve the code in your browser within ten minutes and the command finishes on its own. See Use Dagweave Local with the Dagweave app.

-endpoint URL signs in to a Dagweave server other than app.dagweave.com. It has to be https unless it’s on localhost.

login and listen are the only commands that need a Dagweave account, on a Starter plan or above.

Terminal window
dagweave logout

Signs this machine out, so its runs stop showing up in Dagweave. Local runs stay. To drop the machine from Dagweave too, remove it under Settings > Clusters > Your machines.

Terminal window
dagweave listen

Takes runs from the Dagweave app until you press Ctrl-C. While it’s running, you can pick this machine from the Run menu in the editor. Runs get the same checks as dagweave run and print here. Sign in with dagweave login first.

Terminal window
dagweave version

Prints the version. See also Update notices.