Often times you have a project where you quickly want to do something. This can be running tests, building a container image, generating documentation or something else.
One option is to use scripting to execute these tasks, another option is to use a ‘command runner’.
Make
Make uses a Makefile
file. It is traditionally used as a build tool, but one of the features is to run commands.
Just
Just uses a justfile
where you define ‘recipes’. These recipes are the commands or sets of commands that you want to run together. The syntax is inspired by make
, but much of its complexity is removed.
Usage
Info
There is a handy VSCode extensionthat can be used for syntax-highlighting.
Download the precompiled binary via the releases page or install it via your favorite package manager.
$ dnf install just
Create a justfile
in the root of your project.
# justfile
run-container:
podman run -ti --rm ubuntu:latest /bin/bash
Run the justfile
using the just
command and by passing the recipe
as argument.
$ just run-container
podman run -ti --rm ubuntu:latest /bin/bash
root@f15adf97df0e:/#
Task
Task uses a Taskfile.yml
file in the root of your project.