Submit, sync, and track stacked change requests in your jj (Jujutsu) repository without the busywork.
Unlike a wrapper, jj-spice is a complement to jj and built directly on jj-lib for deep, native integration.
Stacked change requests break a large change into a chain of small, reviewable
PRs that depend on each other. jj-spice automates the tedious parts — creating
the PRs, keeping their base branches in sync, and tracking their status.
jj-spice allows you to:
- Submit a stack of change requests
- Sync the current stack with a remote repository
- Visualize the stack and its review status
The following version control systems are supported:
- GitHub CLI (
gh) — required if your repository is hosted on GitHub. Must be authenticated (gh auth login)
brew install alejoborbo/tap/jj-spicescoop install alejoborbo_scoop-bucket/jj-spicewinget install alejoborbo.jj-spicecargo install jj-spice-cligit clone https://github.com/alejoborbo/jj-spice.git
cd jj-spice
cargo install --path cliPre-built binaries for Linux, macOS, and Windows are available on the GitHub Releases page.
Register jj aliases so that jj-spice commands can be invoked directly as jj
subcommands.
jj-spice util install-aliasesAfter installation, the following shortcuts are available:
jj stack <cmd>instead ofjj-spice stack <cmd>jj spice <cmd>instead ofjj-spice <cmd>
Visualize the bookmark DAG with the status of each change request.
# Show the full stack
jj-spice stack log
# Filter to a specific revset
jj-spice stack log -r 'trunk()..@'Create or update change requests for every bookmark in the stack. Prompts interactively for the title, description, and draft status of new PRs.
jj-spice stack submitDiscover existing change requests on the remote and start tracking them locally.
# Sync untracked bookmarks
jj-spice stack sync
# Re-sync already-tracked bookmarks
jj-spice stack sync --forcejj-spice supports two completion methods: dynamic (recommended) and
static.
Dynamic completion calls back into jj-spice at TAB-time, so completions
stay in sync with the installed version and can complete config keys and
values. Static completion generates a one-time script that only knows about
subcommands and flags.
Dynamic completion (recommended)
Add one of the following to your shell startup file:
Bash (~/.bashrc):
source <(COMPLETE=bash jj-spice)Zsh (~/.zshrc):
source <(COMPLETE=zsh jj-spice)Fish (~/.config/fish/config.fish):
COMPLETE=fish jj-spice | sourceElvish:
eval (COMPLETE=elvish jj-spice | slurp)PowerShell:
COMPLETE=powershell jj-spice | Out-String | Invoke-ExpressionStatic completion
Generate a static script with jj-spice util completion <SHELL>. This is
useful when dynamic completion is not available (e.g. Nushell) or when you
prefer a pre-generated script.
Bash:
jj-spice util completion bash > ~/.local/share/bash-completion/completions/jj-spiceZsh (write to a directory in your $fpath):
jj-spice util completion zsh > ~/.zfunc/_jj-spiceFish:
jj-spice util completion fish > ~/.config/fish/completions/jj-spice.fishNushell (static only — dynamic completion is not supported):
jj-spice util completion nushell | save -f "completions-jj-spice.nu"
use "completions-jj-spice.nu" *PowerShell:
jj-spice util completion power-shell | Out-String | Invoke-ExpressionElvish:
eval (jj-spice util completion elvish | slurp)Licensed under Apache 2.0 — see LICENSE.