Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

172 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jj-spice

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:

Demo

asciicast

Prerequisites

  • GitHub CLI (gh) — required if your repository is hosted on GitHub. Must be authenticated (gh auth login)

Installation

Homebrew (macOS)

brew install alejoborbo/tap/jj-spice

Scoop (Windows)

scoop install alejoborbo_scoop-bucket/jj-spice

Winget (Windows)

winget install alejoborbo.jj-spice

Cargo

cargo install jj-spice-cli

From source

git clone https://github.com/alejoborbo/jj-spice.git
cd jj-spice
cargo install --path cli

Direct download

Pre-built binaries for Linux, macOS, and Windows are available on the GitHub Releases page.

Usage

Alias to use jj command directly

Register jj aliases so that jj-spice commands can be invoked directly as jj subcommands.

jj-spice util install-aliases

After installation, the following shortcuts are available:

  • jj stack <cmd> instead of jj-spice stack <cmd>
  • jj spice <cmd> instead of jj-spice <cmd>

jj-spice stack log

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()..@'

jj-spice stack submit

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 submit

jj-spice stack sync

Discover 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 --force

Shell completion

jj-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 | source

Elvish:

eval (COMPLETE=elvish jj-spice | slurp)

PowerShell:

COMPLETE=powershell jj-spice | Out-String | Invoke-Expression
Static 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-spice

Zsh (write to a directory in your $fpath):

jj-spice util completion zsh > ~/.zfunc/_jj-spice

Fish:

jj-spice util completion fish > ~/.config/fish/completions/jj-spice.fish

Nushell (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-Expression

Elvish:

eval (jj-spice util completion elvish | slurp)

License

Licensed under Apache 2.0 — see LICENSE.

About

Stacked pull requests for Jujutsu (jj) — create, sync, and visualize dependent PR chains

Topics

Resources

Stars

11 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages