Skip to content
Oeiuwq Faith Blog OpenSource Porfolio

eliaskc/kajji

A simple terminal interface for jj

eliaskc/kajji.json
{
"createdAt": "2025-12-30T19:10:19Z",
"defaultBranch": "main",
"description": "A simple terminal interface for jj",
"fullName": "eliaskc/kajji",
"homepage": "",
"language": "TypeScript",
"name": "kajji",
"pushedAt": "2026-03-21T12:42:32Z",
"stargazersCount": 7,
"topics": [],
"updatedAt": "2026-03-21T12:42:34Z",
"url": "https://github.com/eliaskc/kajji"
}

kajji

A simple jj terminal UI with custom diff rendering.

![normal mode]!(./assets/normal-mode.png)

Reviewing local code has never been as prominent as it is today. Coding agents are writing line upon line, and your sorry eyes are the ones that need to trudge through it.

Kajji makes this new reality less painful with polished jj navigation and manipulation alongside Shiki-powered diff rendering with syntax highlighting and word-level diffs. To allow for jj’s log to get the real estate it deserves when you’re looking at the diff, while also allowing the width required for side-by-side diff rendering, kajji has two view modes: normal and diff. Switch with ctrl+x and try it out.

![diff mode]!(./assets/diff-mode.png)

Why build this? While learning jj I found myself coming back to lazygit to do this quickly and easily - the options for jj didn’t quite scratch that lazygit itch of speed, simplicity and polish.

Kajji is my attempt to bring the UX of lazygit to jj, while also aiming for top-class diff rendering and exploring leveraging coding agents effectively. I’m building this for myself first and foremost, but I hope it can be helpful to others too.

Requirements: jj

Terminal window
# recommended (standalone binary, no dependencies)
curl -fsSL https://kajji.sh/install.sh | bash
# or via package manager
npm install -g kajji
bun install -g kajji
pnpm add -g kajji
yarn global add kajji
# or run directly without installing
npx kajji
bunx kajji

Requirements: Bun

Terminal window
git clone https://github.com/eliaskc/kajji.git
cd kajji
bun install
bun dev
  • Polish & simplicity - Do less, but do it well.
  • Intuitive UX - Sensible defaults, consistent patterns.
  • Snappy - If it feels slow, it’s a bug.

Core jj operations:

  • View commit log with graph
  • View diffs with syntax highlighting and word-level emphasis
  • New / edit / describe / squash / abandon
  • Rebase with revision picker
  • Split (suspends TUI for jj’s native split)
  • Undo / redo with preview
  • Bookmarks (create, delete, rename, move)
  • Git fetch / push
  • Operation log with restore
  • Conflict resolution

TUI polish:

  • Vim-style navigation (j/k, ctrl+u/d)
  • Mouse support (click, double-click, horizontal scroll)
  • Collapsible file tree with status colors
  • Help palette with fuzzy search (?)
  • Focus modes for normal browsing vs diff viewing
  • Line wrapping toggle (w) and split/unified view (v)
  • Binary file detection
  • Recent repository switcher
  • Automatic update notifications
  • Revset filtering and fuzzy search
  • JSONC config with live reload and schema autocomplete
  • Open files in editor from file view (e/E)
  • Multi-select for batch operations

Run kajji in any jj repository:

Terminal window
kajji # current directory
kajji /path/to/repo # specific directory

Kajji includes a small CLI for scripting and agent workflows:

Terminal window
# List changes with addressable hunk IDs
kajji changes -r @
# Comments
kajji comment list -r @
kajji comment set -r @ --hunk h1 -m "note"
kajji comment set -r @ --file src/App.tsx --line 12 -m "note"
kajji comment delete -r @ --hunk h1
kajji comment delete -r @ --file src/App.tsx --line 12
kajji comment delete -r @ --file src/App.tsx
kajji comment delete -r @ --all -y

Kajji reads JSONC config from ~/.config/kajji/config.json (comments and trailing commas are supported).

  • Open it from the command palette (?) with open config
  • Changes from open config are reloaded when you return to kajji
  • Schema autocomplete is available via $schema in the generated config
{
"$schema": "https://kajji.sh/schema.json",
"ui": {
"theme": "lazygit", // "lazygit" | "opencode"
"showFileTree": true
},
"diff": {
"layout": "auto", // "auto" | "unified" | "split"
"autoSwitchWidth": 120, // only used when layout is "auto"
"wrap": true,
"useJjFormatter": false // use jj's ui.diff-formatter output in Detail
},
"whatsNewDisabled": false
}

Not yet wired from config (#16):

  • keybind overrides
KeyAction
j / kMove down / up
TabCycle focus between panels
EnterDrill into commit / file
EscapeBack / close modal
ctrl+xToggle focus mode (normal / diff)
ctrl+oOpen recent repository
o / OOpen commit/PR on GitHub (prompt / direct)
-Toggle tree/list (Files) or jj formatter (Detail)
wToggle line wrapping in diff (built-in renderer)
vToggle split / unified diff (built-in renderer)
ctrl+pShow commands (or ?)
qQuit
KeyAction
n / NNew change / new before
eEdit change
dDescribe change
sSquash
aAbandon change
rRebase
SSplit
u / UUndo / redo
fGit fetch
FGit fetch options
pGit push
PGit push options
KeyAction
cCreate bookmark
dDelete bookmark
rRename bookmark
bSet bookmark on commit
mMove bookmark

See GitHub issues for the roadmap.

  • lazygit - The inspiration for this project
  • jjui - Go-based jj TUI
  • lazyjj - Rust-based jj TUI

MIT