jjui——一个美观的 Jujutsu 终端用户界面
Jjui – A Nice TUI for Jujutsu

原始链接: https://github.com/idursun/jjui

jjui 是 Jujutsu 版本控制系统的终端用户界面,提供了一种更交互的方式来管理您的代码库。它提供诸如自动完成 revset、变基分支、压缩修订以及检查修订细节(拆分、恢复、文件差异)等功能。 主要功能包括移动书签、通过 op 日志查看和恢复操作,以及用于检查 `jj show`、`jj diff` 和 `jj op show` 输出的预览窗口。预览窗口具有滚动和差异比较功能。 除了基本的导航功能外,jjui 还允许编辑描述、创建新的修订版本、拆分、放弃、吸收和编辑现有修订版本。还支持 Git push/fetch、撤销和 evolog 查看。 安装方式灵活:Homebrew、AUR、Nix、Go 安装(最新版本、HEAD 或特定分支)、从源代码构建或预构建二进制文件都是可行的选择。最低支持的 jj 版本为 v0.21+。欢迎贡献和功能请求。

Hacker News 的讨论围绕着 jjui 展开,jjui 是用于 Jujutsu (jj) 版本控制系统的基于文本的用户界面 (TUI)。用户称赞 jjui 比其他 jj TUI 更快速、按键绑定更直观且更稳定。许多人对 jj 作为 Git 的替代方案表示热情,强调其更清晰的历史管理、改进的 rebase 冲突解决以及对本地更改的更好处理。然而,一些人错过了 Sapling 中存在的用于堆叠 diff 的 GitHub PR 同步功能,并希望有原生 push/pull 支持。用户提到了某些解决方法,例如复制 `.jj` 目录以在机器之间同步,以及使用 `--colocate` 来兼容依赖 `.git` 的工具。讨论还涉及 GitHub 在审查提交堆栈方面的局限性以及支持它们的替代 Git 代码库的存在,以及关于 JJ 中超越 Git 的原生后端讨论。还重点介绍了几个 JJ 的 GUI 选项,尽管没有一个被认为是完全成熟的。

原文

Build & Test

jjui is a terminal user interface for working with Jujutsu version control system. I have built it according to my own needs and will keep adding new features as I need them. I am open to feature requests and contributions.

Currently, you can:

Change revset with auto-complete

You can change revset while enjoying auto-complete and signature help while typing.

GIF

You can rebase a revision or a branch onto another revision in the revision tree.

GIF

See Rebase for detailed information.

You can squash revisions into one revision, by pressing S. The following revision will be automatically selected. However, you can change the selection using j and k.

GIF

Pressing l (as in going right into the details of a revision) will open the details view of the revision you selected.

In this mode, you can:

  • Split selected files using s
  • Restore selected files using r
  • View diffs of the highlighted by pressing d

GIF

For detailed information, see Details wiki page.

You can move bookmarks to the revision you selected.

GIF

You can switch to op log view by pressing o. Pressing r restores the selected operation. For more information, see Op log wiki page.

GIF

You can open the preview window by pressing p. If the selected item is a revision, then the output of jj show command is displayed. Similarly, jj diff output is displayed for selected files, and jj op show output is displayed for selected operations.

While the preview window is showing, you can press; ctrl+n to scroll one line down, ctrl+p to scroll one line up, ctrl+d to scroll half a page down, ctrl+u to scroll half a page up.

Additionally, you can press d to show the contents of preview in diff view.

For detailed information, see Preview wiki page.

GIF

Additionally,

  • View the diff of a revision by pressing d.
  • Edit the description of a revision by pressing D
  • Create a new revision by pressing n
  • Split a revision by pressing s.
  • Abandon a revision by pressing a.
  • Absorb a revision by pressing A.
  • Edit a revision by pressing e
  • Git push/fetch by pressing g
  • Undo the last change by pressing u
  • Show evolog of a revision by pressing v

See configuration section in the wiki.

The latest release of jjui is available on Homebrew core:

The built jjui binary from latest release is available on the AUR:

paru -S jjui-bin
# OR
yay -S jjui-bin

You can install jjui using nix from the unstable channel.

If you need to use a particular branch/revision that has not yet landed into nixpkgs. You can install it via our provided flake.

nix profile install github:idursun/jjui/main

To install the latest released (or pre-released) version:

go install github.com/idursun/jjui/cmd/jjui@latest

To install the latest commit from main:

go install github.com/idursun/jjui/cmd/jjui@HEAD

To install the latest commit from main bypassing the local cache:

GOPROXY=direct go install github.com/idursun/jjui/cmd/jjui@HEAD

You can build jjui from source.

git clone https://github.com/idursun/jjui.git
cd jjui
go install ./...

You can download pre-built binaries from the releases page.

Minimum supported jj version is v0.21+.

Feel free to submit a pull request.

联系我们 contact @ memedata.com