什么是 just?
just is a handy command runner written in Rust by Casey Rodarmor. It saves and runs project-specific commands, called recipes, stored in a file named justfile with a syntax inspired by make. Unlike make, just is not a build system: recipes are simply commands to run, so there are no phony targets and no dependency on file modification times. With over 25k GitHub stars, it has become the go-to task runner for modern projects.
.PHONY declarations everywhere? Fed up with tab-versus-space errors and implicit build rules that fire when you least expect them? just keeps the familiar recipe feel of a Makefile but drops the build-system baggage — every recipe is just a command.
⚡ Key Features of just
📝 Make-Inspired Syntax
Write recipes in a familiar, readable justfile. If you know Makefiles, you already know most of just — minus the quirks.
🧩 Recipe Parameters
Recipes accept arguments and have default values, so a single recipe can adapt to many invocations without extra scripting.
🐚 Any Shell or Language
Write recipes in sh, bash, Python, Node, or anything else with a shebang line. just runs each recipe with the interpreter you choose.
📋 List & Discover
Run just --list to see every recipe with its documentation comment. Newcomers can explore a project's tasks instantly.
🔐 .env & Variables
Load environment files, define variables, and interpolate them into recipes. Keep configuration tidy and out of your commands.
🌍 Cross-Platform
A single static binary that works the same on Linux, macOS, and Windows — no runtime, no interpreter, no quirks.
🏆 Productivity Benefits
- Save Time: Run any project task with
just <recipe>instead of remembering long commands - Self-Documenting:
just --listshows every task and its description - Consistent: The whole team runs the same commands the same way
- No Build Quirks: Recipes are commands, not targets — no stale-timestamp surprises
- Portable: One justfile works across Linux, macOS, and Windows
apt upgrade 即可始终保持最新版本。
📦 从 deb.griffo.io 安装
步骤 1:添加仓库
sudo install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://deb.griffo.io/EA0F721D231FDD3A0A17B9AC7808B4DD62C41256.asc | sudo gpg --dearmor --yes -o /etc/apt/keyrings/deb.griffo.io.gpg
echo "deb [signed-by=/etc/apt/keyrings/deb.griffo.io.gpg] https://deb.griffo.io/apt $(lsb_release -sc 2>/dev/null) main" | sudo tee /etc/apt/sources.list.d/deb.griffo.io.list > /dev/null
sudo apt updateinstall -d -m 0755 /etc/apt/keyrings
curl -fsSL https://deb.griffo.io/EA0F721D231FDD3A0A17B9AC7808B4DD62C41256.asc | gpg --dearmor --yes -o /etc/apt/keyrings/deb.griffo.io.gpg
echo "deb [signed-by=/etc/apt/keyrings/deb.griffo.io.gpg] https://deb.griffo.io/apt $(lsb_release -sc 2>/dev/null) main" | tee /etc/apt/sources.list.d/deb.griffo.io.list > /dev/null
apt updatesudo apt install extrepo
sudo extrepo enable griffo
sudo apt update🆓 有一个永久免费的镜像。 deb-free.griffo.io 永久免费提供软件包 — 无需账号、无需订阅,最多落后上游 2 个月,安全修复立即发布。目前收录 cliamp、Ghostty、lazydocker、Oh My Posh 和 Zed;just 不在其中,因此今天只能通过上面的仓库安装 — 提出请求即可将其加入。
🧩 关于 extrepo 选项。 extrepo 是 Debian 官方用于管理第三方仓库的工具:它会替你写好 sources 文件并安装签名密钥,并在使用前先对照签名元数据校验该密钥。本仓库以 griffo 之名登记其中,永久免费镜像则为 griffo-free,因此在 Debian(bookworm、trixie、forky、sid)上,上面的命令就是全部配置。
extrepo 只负责 sources 文件和密钥,订阅凭据仍然要写入 /etc/apt/auth.conf.d/deb.griffo.io.conf。Ubuntu 不在覆盖范围内,因为 extrepo 只发布 Debian 各套件的元数据:在 Ubuntu 上请使用 sudo 或 root 的命令。
步骤 2:安装 just
# Install latest just
sudo apt install just
# Verify installation
just --version# Install latest just
apt install just
# Verify installation
just --versionStep 3: Create Your First justfile
# Create a justfile in your project
cat > justfile <<'EOF'
# Build the project
build:
cargo build --release
# Run the tests
test:
cargo test
# Say hello to someone
hello name='world':
echo "Hello, {{name}}!"
EOF
# List available recipes
just --list
# Run a recipe
just build
just hello just🎯 基本使用示例
Running recipes:
# Run the first recipe in the justfile (the default)
just
# Run a specific recipe
just test
# Pass an argument to a recipe
just hello Dario
# List every recipe with its documentation
just --listWorking with justfiles:
# Show the resolved value of a variable
just --evaluate
# Print a recipe without running it
just --show build
# Use a justfile in another directory
just --justfile ~/project/justfile --working-directory ~/project build
# Choose a recipe interactively (needs a chooser like fzf)
just --chooseShell completions:
# Completions for bash, fish and zsh are installed with the package.
# Generate them manually for any shell if you need to:
just --completions bash
just --completions zsh
just --completions fish🚀 为什么选择 deb.griffo.io?
- Official Debian: Available but often outdated versions
- Cargo Install: Requires Rust toolchain and compilation
- Install Script: Manual updates and no package management
- deb.griffo.io: Latest version with automatic updates
- ✅ Latest Features: Get the newest recipe attributes and functions
- ✅ No Rust Compilation: Pre-built binaries, no toolchain needed
- ✅ Automatic Updates: Packages updated within hours of upstream releases
- ✅ Complete Package: Includes shell completions and the man page
- ✅ Multi-Distribution: Works on Bookworm, Trixie, and Sid
- ✅ Easy Maintenance: Standard apt commands for updates
📦 软件包构建仓库
Debian 软件包在此 GitHub 仓库中自动构建和维护:
- 🤖 just-debian - Latest release builds
🔗 相关软件包
也可从 deb.griffo.io 获取:
- fzf Fuzzy Finder - Powers
just --choosefor interactive recipe selection - Jujutsu - A modern, Git-compatible version control system
- Helix Editor - A post-modern modal editor for editing your justfiles