Installation and setup¶
Installation¶
Download pre-built binaries for a release¶
There arepre-built binaries of the last released version ofjj forWindows, Mac, or Linux (the "musl" version should work on all distributions).
Cargo Binstall¶
If you usecargo-binstall, youcan install binaries of the latestjj release from GitHub as follows:
# Will put the jj binary for the latest release in ~/.cargo/bin by defaultcargobinstall--strategiescrate-meta-datajj-cliWithout the--strategies option, you may get equivalent binaries that shouldbe compiled from the same source code.
Note
If you'd like to install a prerelease version, you'll need to use one of theoptions below.
Linux¶
From Source¶
First make sure that you have a Rust version >= 1.88 and that thebuild-essential package is installed by running something like this:
sudoapt-getinstallbuild-essentialNow run either:
# To install the *prerelease* version from the main branchcargoinstall--githttps://github.com/jj-vcs/jj.git--locked--binjjjj-clior:
# To install the latest releasecargoinstall--locked--binjjjj-cliArch Linux¶
You can install thejujutsu package from theofficial extra repository:
pacman-SjujutsuOr install from theAUR repository with anAUR Helper:
yay-Sjujutsu-gitNixOS¶
If you're on NixOS you can install areleased version ofjj using thenixpkgsjujutsu package.
To install aprerelease version, you can use the flake for this repository.For example, if you want to runjj loaded from the flake, use:
nixrun'github:jj-vcs/jj'You can also add this flake url to your system input flakes. Or you caninstall the flake to your user profile:
# Installs the prerelease version from the main branchnixprofileinstall'github:jj-vcs/jj'Homebrew¶
If you use Homebrew, you can run:
# Installs the latest releasebrewinstalljjGentoo Linux¶
dev-vcs/jj is available in theGURU repository.Details on how to enable the GURU repository can be foundhere.
Once you have synced the GURU repository, you can installdev-vcs/jj via Portage:
emerge-avdev-vcs/jjopenSUSE Tumbleweed¶
jujutsu can be installed from the officialopenSUSE-Tumbleweed-Oss repository:
zypperinstalljujutsuMac¶
From Source¶
First make sure that you have a Rust version >= 1.88. You may also need to run:
xcode-select--installNow run either:
# To install the *prerelease* version from the main branchcargoinstall--githttps://github.com/jj-vcs/jj.git\--locked--binjjjj-clior:
# To install the latest releasecargoinstall--locked--binjjjj-cliHomebrew¶
If you use Homebrew, you can run:
# Installs the latest releasebrewinstalljjMacPorts¶
You can also installjj viathe MacPortsjujutsuport:
# Installs the latest releasesudoportinstalljujutsuWindows¶
First make sure that you have a Rust version >= 1.88. Now run either:
# To install the *prerelease* version from the main branchcargoinstall--githttps://github.com/jj-vcs/jj.git--locked--binjjjj-clior:
# To install the latest releasecargoinstall--locked--binjjjj-clivia winget:
# To install the latest release via wingetwingetinstalljj-vcs.jjvia scoop:
# To install the latest release via scoopscoopinstallmain/jjInitial configuration¶
You may want to configure your name and email so commits are made in your name.
$jjconfigset--useruser.name"Martin von Zweigbergk"$jjconfigset--useruser.email"martinvonz@google.com"Command-line completion¶
Jujutsu provides 2 different command-line completion scripts.
Standard completions¶
The standard completion script provides completions forjj subcommands andoptions.
Dynamic completions¶
The dynamic completion script provides completions forjj subcommands andoptions, as well as additional completions, including bookmarks,aliases, revisions, operations and files. Dynamic completions can be contextaware, 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 engineis still labeled unstable. We expect to transition to them as thedefault once the engine is stabilized. Please let us know if you encounter anyissues with dynamic completions.
Which completion script should I use?
Generally, dynamic completions provide a much better completion experience.Although the underlying engine is deemed unstable, there have not been manyissues in practice. Dynamic completions are the preferred option for manycontributors and users.
We recommend using the dynamic completion script, and falling back to thestandard completion script if there are any issues.
Bash¶
source<(jjutilcompletionbash)source<(COMPLETE=bashjj)Zsh¶
autoload-Ucompinitcompinitsource<(jjutilcompletionzsh)source<(COMPLETE=zshjj)Fish¶
Note
No configuration is required with fish >= 4.0.2 which loads dynamic completions by default.
jjutilcompletionfish|sourceCOMPLETE=fishjj|sourceNushell¶
jj util completion nushell | save -f completions-jj.nuuse completions-jj.nu * # Or `source completions-jj.nu`Xonsh¶
source-bash$(jjutilcompletion)Powershell¶
jjutilcompletionpower-shell|Out-String|Invoke-Expression$env:COMPLETE="powershell"jj|Out-String|Invoke-ExpressionRemove-ItemEnv:\COMPLETEInsert the above into your$PROFILE file(usually$HOME\Documents\PowerShell\Microsoft.PowerShell_profile.ps1).
Note
Note that to execute scripts in PowerShell on Windows, including$PROFILE,theexecution policy needs to be set toRemoteSignedat minimum.