Just is a command runner designed to streamline the management and execution of commands in a project. Just is a modern alternative to traditional tools like the make command, offering developers a simplified and intuitive approach to managing project workflows. This tutorial explains how to install Just command runner on Ubuntu 24.04.
Install Just
Get the latest Just version from its GitHub repository:
JUST_VERSION=$(curl -s "https://api.github.com/repos/casey/just/releases/latest" | grep -Po '"tag_name": "\K[0-9.]+')
Download Just using the previously identified version:
wget -qO just.tar.gz https://github.com/casey/just/releases/latest/download/just-$JUST_VERSION-x86_64-unknown-linux-musl.tar.gz
Extract the executable to /usr/local/bin:
sudo tar xf just.tar.gz -C /usr/local/bin just
Run the command to verify the Just version:
just --version
Remove the downloaded file:
rm -rf just.tar.gz
Testing Just
To use Just, first create a file named justfile and define commands (recipes) using its syntax, like:
printf "hello:\n echo 'Hello world'" > justfile
Now, run the command to execute the previously created recipe:
just hello
It will invoke the hello recipe defined in justfile and output "Hello world":
echo 'Hello world'
Hello world
Uninstall Just
To remove Just, delete the associated file:
sudo rm -rf /usr/local/bin/just
Leave a Comment
Cancel reply