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. |
dagweave run my-workflow.yamldagweave run -p message=hello -parallel 2 my-workflow.yaml-p name=valuesets a workflow parameter. Repeat it for more.-parallel Ncaps 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 ownparallelismon 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.
dagweave lint my-workflow.yamlRuns 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.
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.dagweave runsOne line per run. Runs are named after their workflow, so running a file again replaces its earlier run.
dagweave getdagweave get pipelineShows a run’s status and timings, step by step. With no name, the latest run.
dagweave logsdagweave logs --step shout pipelinedagweave logs --follow pipelinePrints a run’s step output. With no name, the latest run.
--step NAMEprints only that step.--followkeeps printing while the run is going.
Output is saved on disk, so it outlives the containers. It’s the only copy.
delete
Section titled “delete”dagweave delete pipelinedagweave delete --allDeletes a run and everything its steps wrote. It doesn’t ask first and can’t be undone.
dagweave pruneDeletes 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.
secret
Section titled “secret”dagweave secret set git-creds username=ana password=@./git-tokendagweave secret listdagweave secret rm git-credsStores 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=@pathreads the value from a file andKEY=-from stdin. Use these for anything sensitive so it stays out of your shell history.listprints names and keys, never values.rm NAMEdeletes 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:
dagweave secret set regcred .dockerconfigjson=@$HOME/.docker/config.jsonSecrets are kept unencrypted in your state directory, readable only by your user and anything else that can read your home directory.
dagweave logindagweave login -endpoint https://staging.dagweave.comSigns 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.
logout
Section titled “logout”dagweave logoutSigns 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.
listen
Section titled “listen”dagweave listenTakes 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.
version
Section titled “version”dagweave versionPrints the version. See also Update notices.