Cheatsheet#
doit
CLI invocations#
command |
example |
command description |
---|---|---|
|
|
run all default tasks |
|
|
run named tasks (generally in order) |
|
|
run tasks matching a pattern |
|
|
show all top level tasks |
|
|
show full information about a single task |
|
|
reset a task’s |
doit
tasks#
Put these in
doitoml.tasks.{task name}
to do things.
field title |
|
field data type |
field description |
---|---|---|---|
|
|
list of (string or list of strings) |
the shell, token or function actions to peform |
|
all |
string |
identifier for |
|
|
string |
diplayed with |
|
|
|
file dependencies which, if changed, invalidate a task status |
|
|
list of strings or |
files created by a task |
|
|
string or function |
extra information to print with |
|
|
list of strings |
other task ids which must have been run once before this task: uses |
|
|
list of |
extra data which, if all false, invalidate a task status |
|
|
|
files to delete with |
|
|
|
custom verbosity: |
|
|
dict |
custom metadata for tasks |
|
|
list of (string, |
string shell commands or custom updaters indicating a task is up-to-date |
Why these fields? What about...
The pydoit documentation provides a number of other fields: many of these only make sense in a
dodo.py
, or otherwise don’t lend themselves cleanly to declarative, portable tasks.
actions
#
action kind |
TOML example |
description |
---|---|---|
string |
|
passed directly to |
token |
|
each token expanded by the DSL |
actor |
|
each token in |
doitoml
task metadata#
Put these in your
task.{task name}.meta.doitoml
to fune-tune the behavior of tasks.
field title |
field data type |
field description |
---|---|---|
|
string or |
the current working directory for shell, token, and actor tasks |
|
dictionary of strings |
environment variables to overload for a specific task |
|
string or |
if falsey, this task will not appear in |
|
(list of) string or |
file(s) to capture output of actions, e.g. |
skip
values#
skip
uses simple, normalized JSON bool
-like values directly.
More complex behaviors can be built from dictionary-based values.
skip kind |
true TOML example |
will skip if… |
---|---|---|
|
|
any value is truthy |
|
|
all values is truthy |
|
|
the value is falsey |
|
|
all paths exist |
|
|
|
doitoml
configuration#
key |
default |
field data type |
field description |
---|---|---|---|
|
|
list of strings |
relative paths to find more |
|
|
|
try to emit short, helpful errors with context |
|
|
|
use the |
|
|
|
use |
|
parent of first config |
list of strings |
paths that are considered “safe” for doitoml to work with. |