TIL

A Justfile.local for Your Own Recipes

An optional import lets a Justfile load recipes from a second file that is not committed. The ? makes the import do nothing when the file is missing.

# Justfile, committed
import? 'Justfile.local'

test:
    npm test
# Justfile.local, in .gitignore

# Push main to the staging branch and start a build.
deploy-staging:
    git push origin main:deploy/staging
    apppack build start -wa myapp-staging

just --list shows both recipes, and the local one can use variables from the committed file.

It works like docker-compose.override.yml, with one difference: the local file can only add recipes, not replace them. A recipe name that exists in both files is an error.