Skip to content

jj fzf help

Tim Janik edited this page Oct 3, 2025 · 8 revisions

date: 2025-10-02 footer: jj-fzf-0.34.0 title: JJ-FZF(1) | jj-fzf Manual Page

NAME

jj-fzf - Terminal interface for the jj version control system based on fzf

SYNOPSIS

jj-fzf [OPTIONS]
jj-fzf COMMAND [ARGUMENTS...]

OPTIONS

--version
Print version information.

--help
Print brief usage information.

--man
Browse this man page.

--no-preview
Hide the preview window.

-c, +c
Start as a commit picker, -c picks a single commit, +c picks multiple commits.

-r, +r
Start as a revision (change ID) picker, -r picks a single revision, +r picks multiple revisions.

-s
Start as a revset picker, returns the edited / current revset expression.

DESCRIPTION

jj-fzf is a text-based user interface for the jj version control system, built on top of the fuzzy finder fzf. jj-fzf centers around the jj log graph view, providing previews of jj diff or jj evolog for each revision. Several key bindings are available for actions such as squashing, swapping, rebasing, splitting, branching, committing, or abandoning revisions. A separate view for the operations log, jj op log, allows fast previews of diffs and commit histories of past operations and enabling undo of previous actions. The available hotkeys are displayed on-screen for easy discoverability. The commands and key bindings can also be found in the man page (displayed with jj-fzf --man) and are documented in the jj-fzf wiki.

JJ LOG VIEW

The jj log view in jj-fzf displays a list of revisions with commit information on each line. Each entry contains the following elements:

@
Marks the working copy


Indicates a mutable commit, a commit that has not yet been pushed


Indicates an immutable commit, that has been pushed or tagged

Change ID
The (mostly unique) identifier to track this change across commits

Username
The abbreviated username of the author

Date
The day when the commit was authored

Commit ID
The unique hash for this commit and its meta data

Refs
Any tags or bookmarks associated with the revisions

Message
A brief description of the changes made in the revisions

Note, in jj, the set of immutable commits can be configured via the revset-aliases."immutable_heads()" config setting.

PREVIEW WINDOW

The preview window on the right displays detailed information for the currently selected revisions. The meaning of the preview items are as follows:

First Line
The jj log -T builtin_log_oneline output for the selected commit

Commit ID
The unique identifier for the Git commit

Change ID
The jj revision identifier for this revisions

Parents
A list of parent revisions (more than one for merge commits)

Tags / Bookmarks
Tags and bookmarks (similar to branch names) for this revisions

Author
The author of the revision, including name and email, timestamp

Committer
The committer, including name and email, timestamp

Message
Detailed message describing the changes made in the revision

File List
A list of files modified by this revision

Diff
A jj diff view of changes introduced by the revision

COMMAND EXECUTION

For all repository-modifying commands, jj-fzf prints the actual jj commands executed to stderr. The output aids users in learning how to use jj directly to achieve the desired effects. This output can also be useful when debugging and helps users determine which actions they might wish to undo.

Most commands can also be run directly from the command line. The supported commands are the same as the key bindings listed below (e.g., abandon, squash, etc.). The arguments are typically one or more commit or change IDs.

KEY BINDINGS

Most jj-fzf commands operate on the current revision under the fzf pointer and/or a set of previously selected revisions (use Tab or Shift-Tab to change selection). All dialogs can be closed at any point with Escape.

KEY BINDINGS FOR JJ-FZF

 

Alt-A: abandon

Use jj abandon to abandon the currently selected revisions.

Alt-B: bookmark

Create, move, delete jj bookmarks and git tags.

Alt-C: commit

Use jj commit to describe the currently selected revision and create a new child revision as working-copy.

Alt-E: diffedit

Use jj diffedit to interactively select content diff hunks to be kept in the currently selected revision, the rest is discarded.

Alt-F: filesplit

Use jj split in a loop to split each file modified by the currently selected revision into its own commit.

Alt-I: split

Use jj split to interactively select content diff hunks to be split into a new commit with an empty description.

Alt-J: inject

Inject the currently selected revision(s) as historic commit(s) before @.

Alt-N: new-a

Use jj new --no-edit --insert-after to create and insert a new revision after the currently selected revision. Add Ctrl to use --insert-before instead.

Alt-O: absorb

Use jj absorb to split the content diff of the current revision and squash pieces into related mutable ancestors.

Alt-P: reparent

Change parent(s) of the current revision by adding a new or removing an existing parent, and optionally simplify the parent list.

Alt-Q: squash

Use jj squash to move the changes from all selected revisions into the revision under the cursor.

Alt-R: rebase

Use jj rebase or jj duplicate to move or copy a set of revisions (possibly with descendants), onto, before or after another revision. Also supports jj simplify-parents afterwards.

Alt-S: restore

Use jj restore to interactively select changes to be restored from a selected revisions into the revision under the cursor. Add Ctrl to run with --restore-descendants.

Alt-V: revert

Use jj revert to create new commits that undo the changes made by the currently selected revisions and apply the changes on top of the working-copy.

Alt-X: swap

Use jj rebase --insert-before to quickly swap the currenly selected revision with the revision immediately before it. Add Ctrl to use --insert-after instead.

Alt-Y: redo

Use jj redo to redo the last undo operation performed by jj undo.

Alt-Z: undo

Use jj undo to undo the last operation performed by jj that was not previously undone.

Ctrl-D: describe

Use jj describe to describe the currently selected revision.

Ctrl-E: edit

Use jj {edit|new} to set the currently selected revision (or divergent commit) as the working-copy revision. Will create a new empty commit if the selected revision is immutable.

Ctrl-L: log

Use jj log to browse the history including patches, for the selected revisions, or the ancestry of a single revision.

Ctrl-N: new

Use jj new to create a new revision on top of the currently selected revision(s).

Ctrl-O: oplog

Use jj operation log to browse the recent operations log. Use hotkeys to view operation diffs and history. Undo operations or restore its working copy into a new commit.

Ctrl-P: push

Use jj git fetch and jj git push --tracked --deleted to update the local and remote repositories. Pushing needs confirmation after a dry-run. Tries to push all refs if no revisions are currently selected.

Ctrl-S: synth

Use jj describe to edit a synthetic LLM generated description of the currently selected revision.

Ctrl-V: evolog

Use jj evolog to browse the evolution of the selected revision. Inject historic commits into the ancestry without changing descendants.

Ctrl-Z: shell

Start interactive subshell.

F5: reload

Reload the revset.

KEY BINDINGS FOR BOOKMARKS & TAGS

The "Bookmarks & Tags" dialog (Alt-B) displays bookmarks and their states. Since jj tracks bookmarks locally and on remotes (like @origin), a bookmark can exist in several states. The dialog simplifies this by showing a single, most significant state for each bookmark and only takes @origin as remote into consideration:

[Deleted]
The bookmark is deleted locally but is still tracked on a remote, the deletion still needs to be pushed to the remote.

[Conflicted]
The local and remote bookmarks have diverged and need to be resolved by moving the bookmark.

[Tracked]
The bookmark exists locally and is tracking the bookmark at the remote.

[Untracked]
The bookmark exists locally and on a remote, but is not tracked.

[Local]
The bookmark exists only locally, but not on a remote.

[Remote]
The bookmark exists only on a remote.

Consequently, only a subset of the key bindings will have an effect on bookmarks in certain states.  

Alt-B: Create

Create new or move existing bookmark

Alt-T: Create

Create new tag

Alt-D: Delete

Delete bookmark or tag

Alt-O: Toggle

Toggle tracking of bookmark @ origin

Alt-V: View

View details

KEY BINDINGS FOR THE EVOLOG

 

Alt-J: Inject

Inject the selected commit as historic parent before the input revision.

Enter: Show

Show evolution of the change ID in the input revision up to the currently selected commit.

KEY BINDINGS FOR THE OPERATION LOG

 

Alt-J: Inject

Inject working copy of the selected operation as historic commit before @

Alt-R: Restore

Restore repository to the selected operation via jj op restore

Alt-V: Revert

Revert the effects of the selected operation via jj op revert

Alt-Y: Redo

Redo the last undo operation (marked )

Alt-Z: Undo

Undo the next operation (not already marked )

Enter: Info

Info browser for the selected operation

KEY BINDINGS FOR CHANGE PARENTS

 

Alt-A: Add

Add currently selected revisions as new parents

Alt-D: Delete

Delete selected revisions from list of existing parents

Alt-I: Ignore-immutable

Ignore-immutable permits rebasing immutable commits

Alt-P: Simplify-parents

Simplify-parents of the revision (after any rebasing)

KEY BINDINGS FOR REBASE

 

Alt-D: Duplicate

Duplicate — copies the specified revisions

Alt-C: Children

Children — duplicate the revisions with descendants

Alt-B: Branch

Branch — rebase whole branches relative to destination's ancestors

Alt-S: Source

Source — rebase a revision together with descendants

Alt-R: Revision

Revision — rebase only given revisions, moves descendants onto parent

Alt-P: Simplify-Parents

Simplify-Parents of the revisions after rebasing

Alt-I: Ignore-Immutable

Ignore-Immutable permits rebasing immutable commits

Ctrl-D: Destination

Destination — pick the target to rebase onto

Ctrl-A: After

After — pick the target to insert after

Ctrl-B: Before

Before — pick the target to insert before

CONFIGURATION

The default set of revisions for the main jj-fzf log view is configured via jj-fzf.log_revset, with a fallback to revsets.log (the standard jj log revset). To use a different revset, type it into the jj-fzf query field which will live update the log view. To persist the revset in the repository's local jj-fzf.log_revset configuration, press Alt-Enter.

The default commit display template for the log view is configured via jj-fzf.log_template, with a fallback to templates.log (the standard jj log template). For example, to configure one-line display as the default, use: jj config set --user jj-fzf.log_template builtin_log_oneline

The configuration setting jj-fzf.show-keys determines if an fzf header is shown that displays active key bindings. Pre-generated commit messages for jj describe are provided as a temporary config value in template-aliases.default_commit_description.

LLM CONFIGURATION

Commit messages can be generated using different Large Language Models (LLMs). The LLM is chosen based on environment variables, in the following order of precedence:

  1. Generic llama.cpp-compatible API: Set LLM_API_BASE to the base URL of your API endpoint. Optionally, set LLM_API_KEY if the API requires an authorization key. Example:

    export LLM_API_BASE="http://llm-server.local:8080/v1"
    export LLM_API_KEY="your-api-key"  # optional
    
  2. Google Gemini: Set GEMINI_API_KEY to your Google AI Studio API key. Get a free key from: https://aistudio.google.com/ Example:

    export GEMINI_API_KEY="AI-gemini-api-key"
    
  3. OpenAI: Set OPENAI_API_KEY to your OpenAI API key. Optionally, set OPENAI_API_BASE to use a different endpoint (e.g., for Azure OpenAI or other compatible services). Example:

    export OPENAI_API_KEY="sk-openai-api-key"
    # Optionally, to use a different endpoint:
    export OPENAI_API_BASE="https://api.llm-server.local/v1"
    
  4. Local llama.cpp server (default): If none of the above are set, a connection attempt is made to a local llama.cpp server at http://localhost:8080/v1. You can set LLM_API_KEY if your local server requires it. For more info on llama.cpp server:

    https://github.com/ggml-org/llama.cpp/blob/master/tools/server

SEE ALSO

For screencasts, workflow suggestions or feature requests, visit the jj-fzf project page at:
https://github.com/tim-janik/jj-fzf

For revset expressions, see:
https://martinvonz.github.io/jj/latest/revsets

For using default_commit_description in draft_commit_description customization, see:
https://jj-vcs.github.io/jj/latest/config/#default-description