just installieren: justfile schreiben, Recipes starten, Vergleich mit make

just, justfile, Recipes — wann statt Makefile.

Jedes Repo wiederholt lint/test/build — just hält Recipes in einer justfile. Dieser Leitfaden: the same dance—lint, test, build—buried in a README or locked inside language-specific scripts. just is a command runner by Casey Rodarmor: drop a justfile at the root, name recipes, and run them with just. Syntax is gentler than Make, and cross-platform setup is usually simpler. Installation macOS/Linux, justfile schreiben, Recipes ausführen, Vergleich mit make für hereink.

The query is how to install just command runner write justfile run recipes compare to make. You should finish with just installed, a first recipe, just --list for discovery, and a clear sense of when just beats a Makefile.

installbrew · cargo · mise
configjustfile · recipe
runjust · --list
install justwrite justfilejust test

Was just löst

Discoverable project commands

New teammates run just --list instead of hunting Slack snippets. Comments above recipes show up in the listing.

Lighter than ad-hoc scripts

Recipes run from the project root by default, support variables, dependencies, and arguments—without a forest of chmod +x shell files.

Upstream: github.com/casey/just, docs at just.systems. Run just --version after install.

just installieren

  1. 1
    macOS (Homebrew)

    brew install just. Verify with which just and just --version.

  2. 2
    Linux (distro packages)

    Arch: sudo pacman -S just. On Debian/Ubuntu if packages lag, use cargo install just or official prebuilt binaries from the install page on just.systems.

  3. 3
    Rust toolchain

    With Rust installed: cargo install just. Keep ~/.cargo/bin on your PATH.

  4. 4
    Version managers

    mise use -g just@latest, or asdf’s just plugin if your team already standardizes on mise/asdf.

justfile schreiben

Create justfile (or .justfile) at the repo root. Minimal starter:

default:
    just --list

# Run unit tests
test:
    cargo test

check: lint test
    echo "all green"

lint:
    cargo clippy -- -D warnings

Syntax highlights:

  • Recipe names: name: then indented commands (spaces, not tabs).
  • Parameters: deploy env: and use {{env}} in the body.
  • Variables: top-level port := "3000", reference as {{port}}.
  • Shebang recipes: start with #!/usr/bin/env bash for multi-line shell.
port := "8080"

serve:
    python -m http.server {{port}}

greet name="world":
    echo "hello {{name}}"

Recipes ausführen

cd ~/projects/my-app
just --list
just test
just check
just greet Alice
just

just searches upward for a justfile. Override with just --justfile path/to/justfile recipe. Use -n / --dry-run to print commands without executing.

just vs make

Topicjustmake
Primary jobRun project commandsBuild graph from file timestamps
SyntaxRecipes + {{var}}Targets, prerequisites, tab rules
WindowsFirst-class docs and buildsOften needs GNU make or WSL
Incremental buildsNot the default modelCore feature
OnboardingREADME-friendlyLarge Makefiles get brittle
Passt für just
Unified test / lint / dev entrypoints; polyglot repos; readable task lists outside npm or poetry scripts.
Bei make bleiben
C/C++ incremental compiles, heavy dependency graphs, or a mature Makefile the team already trusts.
Overlap with npm scripts?

Node-only repos can stay on npm scripts. just shines when Go, Python, and codegen share one task list—or when you want tasks decoupled from the package manager. Recipes can call npm run build.

Does cd inside a recipe stick?

Each recipe starts in the justfile directory; cd affects only later lines in that recipe. Use just --working-directory or a shebang script for cross-folder work.

Load .env automatically?

just supports set dotenv-load in the justfile (see the manual). Prefer direnv or CI secrets for sensitive values.

Nach den Tasks das System skizzieren

Once just dev works locally, service boundaries still belong on a shared canvas. See Raum erstellen.

Raum starten