Duck
A versatile task orchestration tool that allows you to model tasks and shell invocations into complex and useful workflows.
Inspired by numerous examples of tools like gnu make being used to orchestrate complex workflows outside of building software. Duck is designed as a system by which these types of versatile orchestrations can be built and executed.
Installation and Building
Via go install
If you have Go installed, you can install the duck tool directly using go install:
go install -ldflags="-s -w" github.com/mad-weaver/duck
This will download the source code, build the executable, and place it in your Go binary directory ($GOPATH/bin or $HOME/go/bin). Make sure this directory is in your system's PATH.
Building from Source
Alternatively, you can clone the repository and build the executable manually:
-
Clone the repository:
git clone https://github.com/mad-weaver/duck.git
-
Change into the source directory:
cd duck
-
Build the executable:
go build -o duck main.go -ldflags="-s -w"
This will create a duck executable. You can then run it using ./duck [options].
Usage
duck -f <duckfile> [options]
Global Options
| Option |
Alias |
Description |
Default |
Environment Variable |
--file value |
-f |
REQUIRED - Specify duckfile as path or URL (can be used multiple times) |
|
DUCK_FILE |
--help |
-h |
Show help |
|
|
--list-targets |
-l |
List all available targets |
|
DUCK_LIST_TARGETS |
--target value |
-t |
Specify target to run |
"default" |
DUCK_TARGET |
--daemon |
-d |
Enable daemon mode |
false |
DUCK_DAEMON |
--daemon-interval value |
-i |
Time in seconds to pause between runs |
60 |
DUCK_DAEMON_INTERVAL |
--daemon-iterations value |
|
Terminate daemon after this many runs (0 = no limit) |
0 |
DUCK_DAEMON_ITERATIONS |
--daemon-timeout value |
|
Terminate daemon after this many seconds (0 = no timeout) |
0 |
DUCK_DAEMON_TIMEOUT |
--logformat value |
|
Specify log format (json, text, rich) |
"text" |
DUCK_LOGFORMAT |
--loglevel value |
|
Specify log level (debug, info, warn, error) |
"info" |
DUCK_LOGLEVEL |
TODO
Usage documentation coming soon