This is the manual page for the yatte
command-line interface (CLI).
If yatte
is installed on your system,
you can view the same information locally by running yatte --help
.
If you prefer to view the manual with man yatte
,
download the man
-format file
and place it on your $MANPATH
,
e.g. in ~/.local/share/man/man1/
.
yatte – a simple task runner
yatte [-h | -V]
yatte task [ task_args ... ]
Runs tasks defined in a Python script (named tasks.py by default).
Pass the task name as the first argument, followed by any additional arguments expected by the task:
$ yatte task [task_args ...]
Run without arguments to print the list of available tasks and the arguments expected by each:
$ yatte
Use the following flags to display information about the program:
The default behaviour can be modified by setting the following environment variables:
yatte expects the task file to be a Python module containing one or more function definitions decorated with yatte.task(). See below for an example.
The first line of the function docstring is used as the task description when printing the task list.
The function can take one or more positional arguments of type str, which must then be supplied on the command line when running the task.
Exits with return code 0 upon successful completion, or ≥ 1 in case of failure, the exact value depending on the return code of any subprocesses invoked.
Running yatte against this task file:
from yatte import task
@task("echo")
def print_echo(word):
"Echoes a word."
print(word.upper(), word.title(), word.lower())
will produce output like the following:
$ yatte
echo word Echoes a word.
$ yatte echo hello
HELLO Hello hello
= Yatta! =
invoke(1), make(1)