Skip to content

Workflow Commands

Workflow Commands

Workflow commands provide high-level operations that combine multiple steps. These are the primary interface for day-to-day work with jjj.

jjj init

Initialize jjj in the current repository. Creates the jjj bookmark to store metadata.

jjj init
jjj init

jjj status

Show status and next actions — what should I work on?

jjj status [OPTIONS]
FlagTypeDescription
--allboolShow all items (no limit)
--mineboolOnly show authored work
--limitintegerShow top N items (default: 5)
--jsonboolOutput as JSON

Shows the active solution for the current jj change, next actions sorted by priority, and a summary of open problems, solutions in review, and open critiques.

jjj status
jjj status --all
jjj status --mine --limit 10
jjj status --json

jjj next

Show the top next actions — a quick summary of what to work on.

jjj next [OPTIONS]
FlagTypeDescription
--topintegerNumber of items to show (default: 1, 0 for all)
--mineboolOnly show items assigned to you
--jsonboolOutput as JSON
--claimboolClaim the top item: assign it to yourself and display it
Terminal window
jjj next
jjj next --top 5
jjj next --mine
jjj next --json
jjj next --claim # Grab the top item and assign it to you
jjj next --claim --json # Same, with JSON output

jjj overlaps

Show files touched by multiple in-progress solutions. Useful for detecting potential merge conflicts before they happen.

jjj overlaps [OPTIONS]
FlagTypeDescription
--jsonboolOutput as JSON
Terminal window
jjj overlaps
jjj overlaps --json

When overlaps exist, jjj status also shows a warning at the bottom of its output.

jjj insights

Show aggregate statistics from the event log: approval rates, cycle times, top contributors, and most active problems.

jjj insights [OPTIONS]
FlagTypeDescription
--jsonboolOutput as JSON
Terminal window
jjj insights
jjj insights --json

Statistics include:

  • Approval rate: percentage of solutions approved vs. withdrawn
  • Avg time to solve: mean time from problem creation to solved
  • Avg critique resolution: mean time from critique raised to resolved
  • Critiques per solution: ratio of critiques to solutions
  • Top contributors: most active team members by event count
  • Most active problems: problems with the most events

jjj fetch

Fetch code and metadata from remote.

jjj fetch [OPTIONS]
FlagTypeDescription
--remotestringRemote to fetch from (default: origin)
Terminal window
jjj fetch
jjj fetch --remote upstream

jjj push

Push code and metadata to remote.

jjj push [bookmarks...] [OPTIONS]
FlagTypeDescription
--remotestringRemote to push to (default: origin)
--no-promptboolSkip interactive prompts
--dry-runboolShow what would be pushed without pushing
Terminal window
jjj push
jjj push my-feature
jjj push --dry-run

jjj sync

Fetch from remote then push local changes back — shorthand for jjj fetch followed by jjj push.

jjj sync [OPTIONS]
FlagTypeDescription
--remotestringRemote to sync with (default: origin)
--no-promptboolSkip interactive prompts
--dry-runboolShow what would happen without making any changes
Terminal window
jjj sync
jjj sync --remote upstream
jjj sync --dry-run

jjj github

Bridge jjj problems and solutions with GitHub Issues and Pull Requests.

jjj github [COMMAND] [OPTIONS]
FlagTypeDescription
--dry-runboolPreview actions without making any changes

Subcommands

CommandDescription
import [issue] [--all] [--label]Import GitHub issue(s) as jjj problems
pr [solution] [--base]Create or update a GitHub PR for a solution
statusShow sync status for all linked problems and solutions
merge <solution>Squash-merge the linked GitHub PR for a solution
close <problem>Close the linked GitHub issue for a problem
reopen <problem>Reopen the linked GitHub issue for a problem
pushRefresh PR bodies and sync GitHub issue open/closed state
Terminal window
jjj github # pull review states from GitHub
jjj github import #123 # import issue #123 as a problem
jjj github import --all # import all unlinked open issues
jjj github import --all --label bug # import issues with a specific label
jjj github pr # create PR for current solution
jjj github pr "auth fix" --base dev # create PR against a specific base branch
jjj github status # show linked issue/PR status
jjj github merge "auth fix" # squash-merge the linked PR
jjj github close "old problem" # close the linked GitHub issue

jjj ui

Launch the interactive TUI dashboard.

jjj ui

The TUI provides a visual interface for browsing problems, solutions, and their relationships.

jjj completion

Generate shell completions.

jjj completion <shell>

Supported shells: bash, zsh, fish, powershell, elvish.

Terminal window
jjj completion bash >> ~/.bashrc
jjj completion zsh >> ~/.zshrc
jjj completion fish > ~/.config/fish/completions/jjj.fish

jjj events

Query the decision event log.

jjj events [OPTIONS]
FlagTypeDescription
--fromstringFilter by start date (YYYY-MM-DD or YYYY-MM)
--tostringFilter by end date
--problemstringFilter by problem ID
--solutionstringFilter by solution ID
--typestringFilter by event type
--searchstringFull-text search in rationales
--jsonboolOutput as JSON
--limitintegerNumber of events (default: 20)
Terminal window
jjj events
jjj events --from 2024-01 --to 2024-06
jjj events --problem "auth"
jjj events --type solution_approved
jjj events --search "cache"

jjj events rebuild

Rebuild events.jsonl from commit history.

jjj events validate

Validate event log against entity states.

jjj timeline

Show timeline for a problem and all related entities.

jjj timeline <problem> [OPTIONS]
FlagTypeDescription
--jsonboolOutput as JSON
Terminal window
jjj timeline "auth bug"