TL;DR: I’m replacing all of my Makefiles with Justfiles. All of the boilerplate I’ve had in my Makefiles is just handled. I love it.
What is Just? Link to heading
Just is a command runner, not a build system. It uses a file called justfile (or Justfile) to define recipes (commands) that you can run with just <recipe-name>. Think of it as a modern, sane replacement for make when all you really want is a way to run project commands.
Why Replace Make? Link to heading
If you’ve ever used a Makefile purely as a command runner, you know the pain:
.PHONYtargets everywhere because you’re not actually building files- Tab-only indentation that silently breaks things if you use spaces
- Arcane syntax for variables and string manipulation
- No built-in way to list available targets
- Recipes run each line in a separate shell by default
Just eliminates all of this. Here’s a comparison:
Makefile:
| |
Justfile:
| |
No .PHONY. No gotchas. Just commands.
Features I Like Link to heading
just --listshows all available recipes with descriptions- Comments as documentation - add a comment above a recipe and it shows in
--list - Variables and interpolation work intuitively
- Arguments to recipes are straightforward
- OS detection built in for cross-platform recipes
- Recipes run in the same shell by default (no more
&&chaining between lines) - Spaces or tabs for indentation - your choice
Example Link to heading
| |
Running just --list outputs:
| |
Installation Link to heading
Available via most package managers:
| |
I hope this helps someone. Cheers.