just — command runner
💬 "just command"
just is a command runner that manages project-specific commands with a justfile. It is an alternative to makefile.
It executes commands defined in the justfile. It defines commands without the unnecessary tab rules of makefile.
- Concept: Executes commands defined in the justfile.
- Key Features: Defines commands without the unnecessary tab rules of makefile.
- Advantages: Consolidates development, deployment, and testing commands into a single file.
- Usage: Allows defining dependencies between commands.
Installation and Download
just can be installed via a package manager or an official script.
| Environment | Command |
|---|---|
| Ubuntu / Debian | sudo apt install just |
| Fedora / RHEL | sudo dnf install just |
| Arch | sudo pacman -S just |
| macOS (brew) | brew install just |
| Rust cargo | cargo install just |
| Binary download | github.com/casey/just/releases |
Installation can be verified with just --version.
Commonly Used Options
| Option | Description |
|---|---|
| just | Execute default recipe |
| just recipe | Execute specific recipe |
| just --list | Display list of available recipes |
| just --summary | List recipe names only |
| just -f file | Use a different justfile |
Three Essential Command Combinations
just --list— Check command list of current projectjust build— Execute build recipejust --summary | tr ' ' '\n'— List recipe names one per line
💬 "Show me an example of using just on a real server"
I've organized common situations encountered on real servers in order.
Step 1 · Installation Check
Check if it's installed.
just --version || sudo apt install -y just
Step 2 · Create justfile
Create a justfile in the project root.
printf 'build:\n python3 build.py\n\ndeploy:\n ./deploy.sh\n' > justfile
Step 3 · Check list and execute
Check the defined recipes and execute them.
just --list && just build
Real Execution Screen
This is the result after creating the justfile and checking the recipe list.
!just command execution result
Real server in operation
In Practice, It's Used Like This
1. Organize Project Commands
Situation — Consolidate multiple deploy scripts into a justfile.
just --list
Result — build, deploy, test, etc., are gathered in one place.
Point — Team members don't need to memorize commands.
2. Execute Dependencies
Situation — Make deploy run automatically after build.
just deploy
Result — build runs first.
Point — No chance of messing up the order.
Real Execution Screen
This is the result after executing the deploy recipe with just.
!just command execution result 2
Real server in operation
Cautions
- justfile recipes can be indented with spaces instead of tabs.
- just passes environment variables as-is.
- When used with makefile, be careful not to overlap command names.
- Check what commands are available in the current project with
just --list.
Source (HTML): https://games.aidebatehub.com/programs/linux/modern/just.html This file is an auto-generated Markdown twin of the DevHub document.
AI Knowledge Hub
Visitor Comments