Skip to content

Global Justfiles

Global justfiles are available in every directory. They are the right place for personal utilities — git helpers, Docker shortcuts, SSH tools, and anything else you reach for regardless of which project you are in.

Example layout

~/.justx/
├── docker.just           # container management shortcuts
├── git.just              # git workflow helpers
├── kubernetes.just       # kubectl shortcuts
├── ssh.just              # SSH utilities
└── user.just             # created by `justx init`

~/.config/just/
└── justfile              # optional — global justfile shared with `just -g`

Each *.just file in ~/.justx/ becomes a named global source in the TUI. justx also parses the global justfile and presents it in the TUI, see below for more details.

The above example could look as follows in the TUI:

justx
Global
docker
git
kubernetes
ssh
user
justfile
lg
Pretty one-line log
wip <message>
Stage all and commit
sync
Pull with rebase and push
branches
List branches sorted by date
cleanup
Delete merged branches
q Quit   s Search   d Details   enter Run

File discovery

Named sources

All *.just files in ~/.justx/ are loaded alphabetically. The name of the file becomes the source name in the TUI. For example,docker.just appears as docker, git.just as git, and so on. It is recommended to organise by tool or topic, one file per concern.

Override the directory that justx will use to scan for source files with the environment variable JUSTX_HOME:

export JUSTX_HOME=/path/to/my/justx-home

Use justx init --download-examples to get a starter set of files. See Examples for details.

Note: A bare justfile inside ~/.justx/ is not loaded. Use one of the global justfile locations below instead.

Default global justfile

justx also discovers a global justfile from the same locations as just --global-justfile (docs). The first path that exists wins:

  1. $XDG_CONFIG_HOME/just/justfile (defaults to ~/.config/just/justfile)
  2. ~/justfile
  3. ~/.justfile

This is optional — it is useful if you already have a global justfile for just -g and want those recipes to show up in justx as well.