What Just Does
- Recipes — named task definitions in a justfile
- Arguments — positional and named with defaults
- Dependencies — recipes can depend on other recipes
- Shebang recipes — run entire recipe with python/node/bash
- String interpolation —
{{var}}substitution - Env vars — dotenv support via
set dotenv-load - Conditional —
if os == "macos" { ... } - Private recipes — prefix with
_ - Groups — organize recipes into groups
Architecture
Parses the justfile, builds a DAG of recipes, and runs them via the configured shell (sh by default, or any shebang). No make-style file timestamps or incremental logic — simpler and more predictable.
Self-Hosting
Single Rust binary.
Key Features
- Modern clean syntax
- Cross-platform (macOS, Linux, Windows)
- Recipe arguments with defaults
- Dependencies and groups
- Shebang recipes for multi-language tasks
- Env var integration
- Nice error messages
just --listauto-help- Tab or space indentation
Comparison
| Tool | Language | Scope | Strengths |
|---|---|---|---|
| Just | Rust | Task runner | Simple modern syntax |
| Make | C | Build + tasks | Ubiquitous, incremental |
| Taskfile | Go | Task runner | YAML-based |
| npm scripts | JS | Node projects | Built into npm |
| mise tasks | Rust | Task runner | Integrated env manager |
| cargo-make | Rust | Rust projects | Rust-focused |
常见问题 FAQ
Q: 和 Make 区别? A: Just 不做增量构建(无文件时间戳追踪),专注于任务运行。语法更干净,无 tab 强制、无 .PHONY 坑。适合 project tasks,不适合 C/C++ 大型构建。
Q: 可以在 CI 用吗?
A: 非常合适。CI 上 just ci 一行跑所有检查,开发者本地完全一样的体验。
Q: 支持 include 吗?
A: 支持 import 语法(v1.14+)来复用 recipes。
来源与致谢 Sources
- Docs: https://just.systems
- GitHub: https://github.com/casey/just
- License: CC0