Documentation for just and justfile. This skill should be used before editing any justfile, running just commands, or writing any `just ...` shell invocation in Bash, pueue, or scripts.
Expert guidance for Just, a command runner with syntax inspired by make. Use this skill for creating justfiles, writing recipes, configuring settings, and implementing task automation workflows.
Key capabilities:
set allow-duplicate-recipes # Allow recipes to override imported ones
set allow-duplicate-variables # Allow variables to override imported ones
set shell := ["bash", "-euo", "pipefail", "-c"] # Strict bash with error handling
set unstable # Enable unstable features (modules, script attribute)
set dotenv-load # Auto-load .env file
set positional-arguments # Pass recipe args as $1, $2, etc.
| Attribute | Purpose |
|---|---|
[arg("p", long, ...)] | Configure parameter as --flag option (v1.46) |
[group("name")] | Group recipes in just --list output |
[no-cd] | Don't change to justfile directory |
[private] | Hide from just --list (same as _ prefix) |
[script] | Execute recipe as single script block |
[script("interpreter")] | Use specific interpreter (bash, python, etc.) |
[confirm("prompt")] | Require user confirmation before running |
[doc("text")] | Override recipe documentation |
[positional-arguments] | Enable positional args for this recipe only |
The [arg()] attribute configures parameters as CLI-style options:
# Long option (--target)
[arg("target", long)]
build target:
cargo build --target {{ target }}
# Short option (-v)
[arg("verbose", short="v")]
run verbose="false":
echo "Verbose: {{ verbose }}"
# Combined long + short
[arg("output", long, short="o")]
compile output:
gcc main.c -o {{ output }}
# Flag without value (presence sets to "true")
[arg("release", long, value="true")]
build release="false":
cargo build {{ if release == "true" { "--release" } else { "" } }}
# Help string (shown in `just --usage`)
[arg("target", long, help="Build target architecture")]
build target:
cargo build --target {{ target }}
Usage examples:
just build --target x86_64
just build --target=x86_64
just compile -o main
just build --release
just --usage build # Show recipe argument help
Multiple attributes can be combined:
[no-cd, private]
[group("checks")]