Majutsu is a Magit-style interface for Jujutsu (jj) in Emacs: a log you can act on, diffs you can select from, and transients for jj’s commands.
Read the manual at majutsu.org, or its source in docs/majutsu.org.
;; Doom Emacs (packages.el)
(package! majutsu :recipe (:host github :repo "0WD0/majutsu"))
;; use-package + straight.el
(use-package majutsu
:straight (:host github :repo "0WD0/majutsu"))
;; use-package + package-vc (Emacs 30+)
(use-package majutsu
:vc (:url "https://github.com/0WD0/majutsu" :rev :newest))M-x majutsu in a jj repository opens the log.
n/pmove between revisions (Evil:C-j/C-k);[and]jump to a parent or a child.TABfolds the section at point.?lists every command.RETon a revision shows its diff; in a diff it visits the file.$(Evil:`) shows what jj printed.
Commands open a transient in which you set options and pick revisions from the log before anything runs.
| Vanilla | Evil | Command |
|---|---|---|
o | o | New change |
c | c | Describe |
w | i | Edit descriptions in place |
C | C | Commit |
e | e | Edit a revision |
k | x | Abandon |
s | s | Squash |
S | S | Split |
a | a | Absorb |
R | R | Restore |
r | r | Rebase |
V | _ | Revert |
? y | ? y | Duplicate |
d | d | Diff |
E | E | Ediff |
M | M | Resolve conflicts |
b | b | Bookmarks |
? t | ? t | Tags |
G | ? G | Git: fetch, push, remotes, Gerrit |
Z | * | Workspaces |
l | L | Log options |
v | ? v | Evolution log |
X | X | Operation log, restore, revert |
C-/ | u | Undo |
C-? | C-r | Redo |
! | ! | Run a jj or shell command |
g | g r | Refresh |
In a diff, Split, Squash, Absorb, and Restore can take selected hunks, files, or lines instead of the whole change.
All optional; see Integrations in the manual.
- Evil
- Normal-state bindings are installed when Evil is present.
- Embark
embark-actworks on bookmarks, revisions, remotes, and workspaces.- Forge
(majutsu-forge-mode 1)shows pull requests and issues in the log of a colocated repository.- Org
org-store-linkin a Majutsu buffer stores a link to a revision or a repository.- TRAMP
- Repositories on remote hosts work.
- Ghostel
- Runs jj’s terminal diff editor and
jj arrangeinside Emacs.
- Emacs 31.1+
- Jujutsu (jj) 0.47.0+
- magit 4.4.0+, transient 0.13.0+
- consult 1.0+ and plz 0.9.1+ (Gerrit completion)
- with-editor (comes with magit)
- User Manual
- NEWS: what changed in each release
- Third-Party Notices: code adapted from other projects
GNU GPL v3 or later. LICENSE-MIT keeps the notice of the code from before the change of license.
Majutsu began as a fork of jj-mode.el by Brandon Olivier. It builds on Magit’s sections and transients.
Issues and pull requests are welcome at https://github.com/0WD0/majutsu