This guide demonstrates how to define a very simple CUE workflow command, and how to run it. This specific workflow command allows a -t flag to inject a value into the process so that it can be referred to.

some_tool.cue
package example

import "tool/exec"

name: *"everyone" | string @tag(who)
city: "Kinshasa"

// The "hello" command welcomes people to a place.
command: hello: {
	// The command contains a single task.
	print: exec.Run & {
		cmd: "echo Hey \(name), welcome to \(city)!"
	}
}
TERMINAL
$ cue cmd -t who=Alex hello
Hey Alex, welcome to Kinshasa!
  • Reference: cue commands – more information about CUE workflow commands
  • Reference: cue injection – injecting values into cue command invocations