-
Notifications
You must be signed in to change notification settings - Fork 6
jj fzf help
jj-fzf - Terminal interface for the jj version control system based on
fzf
jj-fzf [OPTIONS]
jj-fzf COMMAND [ARGUMENTS...]
--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.
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.
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.
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
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.
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.
Use jj abandon to abandon the currently selected revisions.
Create, move, delete jj bookmarks and git tags.
Use jj commit to describe the currently selected revision and create a
new child revision as working-copy.
Use jj diffedit to interactively select content diff hunks to be kept
in the currently selected revision, the rest is discarded.
Use jj split in a loop to split each file modified by the currently
selected revision into its own commit.
Use jj split to interactively select content diff hunks to be split
into a new commit with an empty description.
Inject the currently selected revision(s) as historic commit(s) before @.
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.
Use jj absorb to split the content diff of the current revision and
squash pieces into related mutable ancestors.
Change parent(s) of the current revision by adding a new or removing an existing parent, and optionally simplify the parent list.
Use jj squash to move the changes from all selected revisions into the
revision under the cursor.
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.
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.
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.
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.
Use jj redo to redo the last undo operation performed by jj undo.
Use jj undo to undo the last operation performed by jj that was not
previously undone.
Use jj describe to describe the currently selected revision.
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.
Use jj log to browse the history including patches, for the selected
revisions, or the ancestry of a single revision.
Use jj new to create a new revision on top of the currently selected
revision(s).
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.
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.
Use jj describe to edit a synthetic LLM generated description of the
currently selected revision.
Use jj evolog to browse the evolution of the selected revision. Inject
historic commits into the ancestry without changing descendants.
Start interactive subshell.
Reload the revset.
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.
Create new or move existing bookmark
Create new tag
Delete bookmark or tag
Toggle tracking of bookmark @ origin
View details
Inject the selected commit as historic parent before the input revision.
Show evolution of the change ID in the input revision up to the currently selected commit.
Inject working copy of the selected operation as historic commit before @
Restore repository to the selected operation via jj op restore
Revert the effects of the selected operation via jj op revert
Redo the last undo operation (marked ⋯)
Undo the next operation (not already marked ⋯)
Info browser for the selected operation
Add currently selected revisions as new parents
Delete selected revisions from list of existing parents
Ignore-immutable permits rebasing immutable commits
Simplify-parents of the revision (after any rebasing)
Duplicate — copies the specified revisions
Children — duplicate the revisions with descendants
Branch — rebase whole branches relative to destination's ancestors
Source — rebase a revision together with descendants
Revision — rebase only given revisions, moves descendants onto parent
Simplify-Parents of the revisions after rebasing
Ignore-Immutable permits rebasing immutable commits
Destination — pick the target to rebase onto
After — pick the target to insert after
Before — pick the target to insert before
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.
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:
-
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 -
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" -
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" -
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
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