just
just
is a handy way to save and run project-specific commands.
This readme is also available as a book.
(中文文档在 这里, 快看过来!)
Commands, called recipes, are stored in a file called justfile
with syntax
inspired by make
:
You can then run them with just RECIPE
:
$ just test-all
cc *.c -o main
./test --all
Yay, all your tests passed!
just
has a ton of useful features, and many improvements over make
:
-
just
is a command runner, not a build system, so it avoids much ofmake
’s complexity and idiosyncrasies. No need for.PHONY
recipes! -
Linux, MacOS, and Windows are supported with no additional dependencies. (Although if your system doesn’t have an
sh
, you’ll need to choose a different shell.) -
Errors are specific and informative, and syntax errors are reported along with their source context.
-
Recipes can accept command line arguments.
-
Wherever possible, errors are resolved statically. Unknown recipes and circular dependencies are reported before anything runs.
-
just
loads.env
files, making it easy to populate environment variables. -
Recipes can be listed from the command line.
-
Command line completion scripts are available for most popular shells.
-
Recipes can be written in arbitrary languages, like Python or NodeJS.
-
just
can be invoked from any subdirectory, not just the directory that contains thejustfile
. -
And much more!
If you need help with just
please feel free to open an issue or ping me on
Discord. Feature requests and bug reports are
always welcome!