百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
J

just

> 编程语言
开源

只是一个命令运行程序

35.1K stars0 点赞1 次浏览
访问官网GitHub

工具介绍

只是一个命令运行程序

just


just is a handy way to save and run project-specific commands.

This readme is also available as a book. The book reflects the latest release, whereas the readme on GitHub reflects latest master.

(中文文档在 这里, 快看过来!)

Commands, called recipes, are stored in a file called justfile with syntax inspired by make:

You can then run them with just RECIPE:

bash
$ just test-all
cc *.c -o main
./test --all
Yay, all your tests passed!

just has a ton of useful features, and many improvements over make:

  • just is a command runner, not a build system, so it avoids much of make's complexity and idiosyncrasies. No need for .PHONY recipes!

  • Linux, macOS, Windows, and other reasonable unixes are supported with no additional dependencies. (Although if your system doesn't have an sh, you'll need to choose a different shell.)

  • Errors are specific and informative, and syntax errors are reported along with their source context.

  • Recipes can accept command line arguments, including flags and options.

  • just has a rich expression language and many built-in-functions.

  • Wherever possible, errors are resolved statically. Unknown recipes and circular dependencies are reported before anything runs.

  • just loads .env files, making it easy to populate environment variables.

  • Recipes can be listed from the command line.

  • Command line completion scripts are available for most popular shells.

  • Recipes can be written in arbitrary languages, like Python or Node.js.

  • just can be invoked from any subdirectory, not just the directory that contains the justfile.

  • justfiles can be organized into multiple files using modules and imports.

  • And much more!

If you need help with just, please feel free to open an issue or ping me on Discord. Feature requests and bug reports are always welcome!

Installation

Just can be installed using your favorite package manager, by downloading pre-built binaries, or building from source with cargo install just.

Prerequisites

just should run on any system with a reasonable sh, including Linux, macOS, and the BSDs.

Windows

On Windows, just works with the sh provided by Git for Windows, GitHub Desktop, or Cygwin. After installation, sh must be available in the PATH of the shell you want to invoke just from.

If you'd rather not install sh, you can use the shell setting to use the shell of your choice.

Like PowerShell:

just
# use PowerShell instead of sh:
set shell := ["powershell.exe", "-c"]

hello:
  Write-Host "Hello, world!"

…or cmd.exe:

just
# use cmd.exe instead of sh:
set shell := ["cmd.exe", "/c"]

list:
  dir

You can also set the shell using command-line arguments. For example, to use PowerShell, launch just with --shell powershell.exe --shell-arg -c.

(PowerShell is installed by default on Windows 7 SP1 and Windows Server 2008 R2 SP1 and later, and cmd.exe is quite fiddly, so PowerShell is recommended for most Windows users.)

Packages

Cross-platform

Package Manager Package Command
arkade just arkade get just
asdf just asdf plugin add just
asdf install just <version>
Cargo just cargo install just
Cargo Binstall just cargo binstall just
Conda just conda install -c conda-forge just
Homebrew just brew install just
Nix just nix-env -iA nixpkgs.just
npm rust-just npm install -g rust-just
pipx rust-just pipx install rust-just
Snap just snap install --edge --classic just
Spack just spack install just
uv rust-just uv tool install rust-just

BSD

Operating System Package Manager Package Command
FreeBSD pkg just pkg install just
OpenBSD pkg_* just pkg_add just

Linux

Operating System Package Manager Package Command
Alpine apk-tools just apk add just
Arch pacman just pacman -S just
Debian 13 and Ubuntu 24.04 derivatives apt just apt install just
Fedora DNF just dnf install just
Gentoo Portage dev-build/just emerge -av dev-build/just
NixOS Nix just nix-env -iA nixos.just
openSUSE Zypper just zypper in just
Solus eopkg just eopkg install just
Void XBPS just xbps-install -S just

Windows

Package Manager Package Command
Chocolatey just choco install just
Scoop just scoop install just
Windows Package Manager Casey/Just winget install --id Casey.Just --exact

macOS

Package Manager Package Command
MacPorts just port install just

Pre-Built Binaries

Pre-built binaries for Linux, macOS, and Windows can be found on the releases page.

You can use the following command on Linux, macOS, or Windows to download the latest release, just replace DEST with the directory where you'd like to put just:

bash
curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to DEST

For example, to install just to ~/bin:

bash
# create ~/bin
mkdir -p ~/bin

# download and extract just to ~/bin/just
curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to ~/bin

# add `~/bin` to the paths that your shell searches for executables
# this line should be added to your shell's initia

Issues· 171 开放

查看全部 Issues在 GitHub 打开
  • #3439

    缓存配方跟踪问题

    coveted更新于 2026年9月30日
  • #3728

    评估 `--usage` 和 `--list` 的默认参数 (至少是常量表达式)

    更新于 2026年9月30日
  • #3726

    支持用户定义函数中的可变参数 `*args` 和 `+args`

    更新于 2026年9月29日
  • #3702

    `just --fmt` 应保留单值属性语法

    更新于 2026年9月28日
  • #3248

    稳定用户定义的函数

    stabilization更新于 2026年9月25日
  • #3592

    可以考虑添加一个设置,使在 `--dry-run` 期间执行反引号和 `shell()` 调用。

    更新于 2026年9月24日
  • #1582

    在成功或失败情况下运行后续操作

    coveted更新于 2026年9月18日
  • #3517

    特性: 使打印配方列表中包含配方参数

    更新于 2026年9月16日
  • #3700

    标记以列出重复的配方

    更新于 2026年8月20日
  • #3699

    支持递归式配方组,用于单一仓库服务命令

    更新于 2026年8月20日

> 标签

Rust

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月30日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言