How to install and use just: write a justfile and run a first recipe
Install just, write a justfile, run a first recipe with just.
Make syntax is easy to trip over, and a long npm script list is hard to scan. just is Casey’s command runner: drop a justfile at the repo root and call short recipe names.
Follow just.systems and github.com/casey/just to install and use just: install the binary, write a justfile, and run a first recipe with just. A developer-tools tutorial, not a brainstorm product guide.
Install the runner, then write recipes
just does not replace Make, npm, or cargo; it only invokes tools you already have. Homebrew is common on macOS. If you have a Rust toolchain, cargo install just works. Windows: Scoop, Chocolatey, or WinGet. The canonical list is Installation on just.systems and the README.
| Method | You need | Best when |
|---|---|---|
| Homebrew | macOS / Linuxbrew | brew install just |
| cargo | Rust toolchain | cargo install just |
| Scoop / Chocolatey / WinGet | Windows | You do not want to unzip by hand |
Five steps to the first recipe
- 1
Install just
On macOS:
brew install just. Orcargo install just. Checkjust --version. Treat just.systems as source of truth if package names move. - 2
Create a justfile at the repo root
cdto the repository root and addjustfile(orJustfile). just walks upward from the current directory. Keep it next topackage.jsonorCargo.toml. - 3
Write a default recipe
A bare
justruns the first recipe, or the one marked[default]. Prefix a line with@to hide the echo. Indent the commands under the name. - 4
List and run recipes
just --listprints names and comments.justruns the default;just testruns test. Parameters look likegreet name:— calljust greet Ada. - 5
Add dependencies or variables
release: testruns test first. Variables usename := "value"and{{name}}in the body. For a full script, use a shebang recipe (manual: Recipes).
brew install just
# cargo install just
# scoop install just
just --version
just --list
just
just greet AdaA minimal justfile
# justfile — first recipes
default:
@echo "hello from just"
test:
@echo "run tests here"
# pass an argument
greet name:
@echo "hi {{name}}"
Recipes and indent
A recipe is a name plus a colon. Commands underneath use spaces or tabs — pick one per file. # comments show up in just --list.
Dependencies and arguments
Names after the colon are dependencies. Positional parameters follow the recipe name. If arguments fail, check spaces and quotes.
Versus Make / npm
just does not skip work from file timestamps by default; it is a command runner. npm scripts can still be called from a recipe, e.g. npm test.
Common pitfalls
No justfile found: wrong directory or a typo in the filename. Recipe does nothing: mixed tabs/spaces, or commands not indented under the name. just: command not found: PATH was not refreshed after install. On Windows, read the official Windows section for newlines and the default shell.
When the recipe works and you need a shared sketch, wbstorm is a room ID — see create or join a room and whiteboard basics. Terminal Git: how to install and use lazygit.
Is just a Make replacement?
Different job. Make is a build system and often skips steps from timestamps. just is a command runner and always runs the recipe. They can coexist.
Do I have to use Homebrew?
No. just.systems lists Homebrew, cargo, prebuilt packages, and other managers. Use whatever your machine already has.
Must the file be named justfile?
justfile or Justfile is typical. You can also pass just --justfile path. Teams should pick one name and keep it.
Is this a wbstorm feature?
No. This article is only casey/just: install, justfile, first recipe. wbstorm is a browser brainstorm room and is unrelated to command runners.