just
Run project-specific commands defined in a file
TLDR
View documentation for the command runner
View documentation for the V8 JavaScript runtime
SYNOPSIS
just [OPTIONS...] [RECIPE] [ARGUMENTS...]
PARAMETERS
--list, -l
Lists all available recipes defined in the justfile.
--dry-run, -n
Prints the commands that just would run without executing them.
--dump, -d
Prints the justfile to standard output after parsing and interpolation.
--evaluate, -e <EXPRESSION>
Evaluates and prints the value of a variable or a recipe expression.
--shell <SHELL>
Specifies the shell to use for executing recipes (e.g., bash, zsh).
--shell-arg <ARG>
Adds an argument to pass to the shell. Can be used multiple times.
--set <VAR> <VALUE>
Sets a variable to a specific value, overriding justfile definitions.
--init
Creates a boilerplate justfile in the current directory.
--color <WHEN>
Controls when just outputs colors (auto, always, never).
DESCRIPTION
just is a command runner that simplifies project automation by providing a straightforward way to define and execute project-specific commands. It's often seen as a modern alternative to make, offering a simpler syntax and improved error messages. just finds a justfile (or Justfile) in the current directory or its parents, which contains "recipes" – sequences of commands. Users can then execute these recipes by typing just <recipe-name>. It automatically parallelizes recipes where possible, provides robust argument handling, and integrates well with shell environments. Its primary goal is to make common development tasks, such as building, testing, or deploying, easily runnable and discoverable for anyone working on a project.
CAVEATS
While powerful, just is primarily a command runner, not a full-fledged build system like CMake or Bazel. Its simplicity comes from its focus on executing shell commands, which means complex dependency graphs or cross-compilation setups might be better handled by dedicated build tools. Security considerations are important; as justfiles execute arbitrary commands, they should be reviewed before running them from untrusted sources, similar to Makefiles.
<I>JUSTFILE</I> SYNTAX
just recipes are defined in a file named justfile (or Justfile) located in the project root or parent directories. Recipes are declared as recipe_name: followed by a block of indented commands. It supports variables, parameters, and conditional execution.
AUTOMATIC PARALLELIZATION
When multiple recipes are invoked (e.g., just foo bar), just can automatically run independent recipes in parallel, potentially speeding up execution time.
ARGUMENTS TO RECIPES
Recipes can accept arguments, which are passed as positional parameters to the underlying shell commands (e.g., just build debug). This allows for flexible and reusable task definitions.
HISTORY
just was created by Casey Rodarmor and first released around 2017. It emerged from a desire for a simpler, more robust command runner than make, particularly appealing to developers working with modern toolchains like Rust. Its development focused on providing better error messages, simpler syntax, and automatic parallelization, addressing common pain points with traditional build systems. It gained significant traction within the Rust community due to its ease of use and often being included as a recommended task runner in Rust projects, though its utility extends to any language or project requiring task automation.