Skip to content

Installation and setup

There are pre-built binaries of the last released version of jj for Windows, Mac, or Linux (the “musl” version should work on all distributions).

If you use cargo-binstall, you can install binaries of the latest jj release from GitHub as follows:

Terminal window
# Will put the jj binary for the latest release in ~/.cargo/bin by default
cargo binstall --strategies crate-meta-data jj-cli

Without the --strategies option, you may get equivalent binaries that should be compiled from the same source code.

First make sure that you have a Rust version >= 1.88 and that the build-essential package is installed by running something like this:

Terminal window
sudo apt-get install build-essential

Now run either:

Terminal window
# To install the *prerelease* version from the main branch
cargo install --git https://github.com/jj-vcs/jj.git --locked --bin jj jj-cli

or:

Terminal window
# To install the latest release
cargo install --locked --bin jj jj-cli

You can install the jujutsu package from the official extra repository:

Terminal window
pacman -S jujutsu

Or install from the AUR repository with an AUR Helper:

Terminal window
yay -S jujutsu-git

If you’re on NixOS you can install a released version of jj using the nixpkgs jujutsu package.

To install a prerelease version, you can use the flake for this repository. For example, if you want to run jj loaded from the flake, use:

Terminal window
nix run 'github:jj-vcs/jj'

You can also add this flake url to your system input flakes. Or you can install the flake to your user profile:

Terminal window
# Installs the prerelease version from the main branch
nix profile install 'github:jj-vcs/jj'

If you use Homebrew, you can run:

Terminal window
# Installs the latest release
brew install jj

dev-vcs/jj is available in the GURU repository. Details on how to enable the GURU repository can be found here.

Once you have synced the GURU repository, you can install dev-vcs/jj via Portage:

Terminal window
emerge -av dev-vcs/jj

jujutsu can be installed from the official openSUSE-Tumbleweed-Oss repository:

Terminal window
zypper install jujutsu

First make sure that you have a Rust version >= 1.88. You may also need to run:

Terminal window
xcode-select --install

Now run either:

Terminal window
# To install the *prerelease* version from the main branch
cargo install --git https://github.com/jj-vcs/jj.git \
--locked --bin jj jj-cli

or:

Terminal window
# To install the latest release
cargo install --locked --bin jj jj-cli

If you use Homebrew, you can run:

Terminal window
# Installs the latest release
brew install jj

You can also install jj via the MacPorts jujutsu port:

Terminal window
# Installs the latest release
sudo port install jujutsu

First make sure that you have a Rust version >= 1.88. Now run either:

Terminal window
# To install the *prerelease* version from the main branch
cargo install --git https://github.com/jj-vcs/jj.git --locked --bin jj jj-cli

or:

Terminal window
# To install the latest release
cargo install --locked --bin jj jj-cli

via winget:

Terminal window
# To install the latest release via winget
winget install jj-vcs.jj

via scoop:

Terminal window
# To install the latest release via scoop
scoop install main/jj

You may want to configure your name and email so commits are made in your name.

Terminal window
$ jj config set --user user.name "Martin von Zweigbergk"
$ jj config set --user user.email "martinvonz@google.com"

Jujutsu provides 2 different command-line completion scripts.

The standard completion script provides completions for jj subcommands and options.

The dynamic completion script provides completions for jj subcommands and options, as well as additional completions, including bookmarks, aliases, revisions, operations and files. Dynamic completions can be context aware, for example they respect the global flags --repository and --at-operation as well as some command-specific ones like --revision, --from, and --to.

Dynamic completions are not the default/only option since the underlying engine is still labeled unstable. We expect to transition to them as the default once the engine is stabilized. Please let us know if you encounter any issues with dynamic completions.

Terminal window
source <(jj util completion bash)
Terminal window
autoload -U compinit
compinit
source <(jj util completion zsh)
Terminal window
jj util completion fish | source
Terminal window
jj util completion nushell | save -f completions-jj.nu
use completions-jj.nu * # Or `source completions-jj.nu`
Terminal window
source-bash $(jj util completion)
Terminal window
jj util completion power-shell | Out-String | Invoke-Expression

Insert the above into your $PROFILE file (usually $HOME\Documents\PowerShell\Microsoft.PowerShell_profile.ps1).