An LSP-powered, editor-agnostic front-end for Jujutsu.
Bad Juju exposes Jujutsu VCS operations through the Language Server Protocol, so any LSP-capable editor can show jj status, conflict markers, and change information inline.
server/ Rust LSP server (tower-lsp) clients/ vscode/ VS Code extension docs/ Design documents samples/ Example jj repos used for testing
When the user runs Bad Juju: Open status window, the server regenerates
.jj/badjuju/status.jujutsu and opens it in the editor. The buffer combines jj
status, the working-copy stack, and a one-screen command reference:
STATUS:
The working copy has no changes.
Working copy (@) : kpkzwvqm 909679d0 (empty) (no description set)
Parent commit (@-): xorwskru 66bfbfdf feat(neovim): buffer-local keymaps on status.jj and log.jj (bad-juju-jb3)
STACK: ancestors(reachable(@, mutable()), 2)
@ kpkzwvqm 909679d0 1min stephen@example.com
│ (empty) (no description set)
○ xorwskru 66bfbfdf 2min stephen@example.com
│ feat(neovim): buffer-local keymaps on status.jj and log.jj (bad-juju-jb3)
○ mmqmovmy 0eca5029 3min stephen@example.com
│ feat(neovim): make status.jj/log.jj buffers read-only and reload in place on refresh (bad-juju-uga)
◆ spxlzwpr 18d66a82 20min stephen@example.com main
│ fix(ci): set DESTDIR when installing redo (bad-juju-d16)
~
COMMAND REFERENCE:
n new change
l open log
d describe
s squash file at cursor into parent
U unsquash file at cursor from parent into child (or Ctrl+K U when vim shadows U)
a abandon commit at cursor (or working copy)
u jj undo (revert last operation)
= toggle --stat on the stack log
g refresh
q closeBad Juju: Open log window writes .jj/badjuju/log.jujutsu. The first line is an
editable REVSET: header — change it and save to re-run the query. The
JJ:-prefixed lines are shortcut revsets you can apply by placing the cursor
on the line and pressing Enter:
REVSET: @
JJ: Mutable: ancestors(reachable(@, mutable()), 2)
JJ: Stack: (immutable_heads()..@)::
OUTPUT:
@ kpkzwvqm 909679d0 1min stephen@example.com
│ (empty) (no description set)
~
COMMAND REFERENCE:
Edit REVSET above and save to re-run the query.
Place the cursor on a shortcut line and press Enter to apply it.
a abandon commit at cursorInstall the extension from the marketplace or build it locally (see
clients/vscode/README.md). Open a Jujutsu repo and run
Bad Juju: Open status window from the command palette (Ctrl+Shift+P /
Cmd+Shift+P).
See clients/neovim/README.md for installation and configuration. Once the LSP is wired up, run:
:lua require('badjuju').execute('badjuju.status')Or use the default keymap (<leader>js or whichever binding you configure).
See clients/helix/README.md for the languages.toml snippet. Once
badjuju is on your PATH, open the status buffer with:
hx "$(badjuju status)"-
Rust toolchain (edition 2024)
-
pnpm 10+
-
redo (apenwarr/redo —
brew install redoon macOS)
|
Note
|
If you don’t want to install |
To work on Bad Juju locally:
-
Install the prerequisites listed above, including redo (
brew install redoon macOS). -
Install JS dependencies and build the workspace:
pnpm install redo
-
Install the
badjujuserver binary to your Cargo bin directory (~/.cargo/bin):redo server/install
The build configuration (
debugorrelease) is read from theconfigurationfile at the repo root. -
Iterate on the VS Code extension:
-
Open the
clients/vscodedirectory in VS Code (open it as the workspace root, not the repo root, so the launch config andpackage.jsonscripts resolve correctly). -
Press kbd:[F5] to launch an Extension Development Host. The checked-in
.vscode/launch.jsonruns thebuildtask first (pnpm run build) and then loads the freshly built extension. Open a Jujutsu repo inside the host window and run a command such asBad Juju: Open status windowfrom the command palette to exercise the extension. -
After editing
clients/vscode/src/, stop the Extension Development Host and press kbd:[F5] again (or runpnpm run watchfor an incremental rebuild and reload viaDeveloper: Reload Windowin the host).
-
-
Before committing, run the CI-equivalent check (formatting, clippy, tests, Biome):
redo check