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/ metadata directory.

jjj init
jjj init

jjj submit

Submit current changes by rebasing onto main and squashing. Automatically accepts the solution and solves the problem when conditions are met.

jjj submit [OPTIONS]
FlagTypeDescription
--forceboolBypass critique and sign-off checks (sets force_accepted flag)

Submit performs these steps:

  1. Checks for open critiques (unless --force).
  2. Checks that all assigned reviewers have signed off (unless --force).
  3. Rebases the current change onto main and squashes.
  4. Auto-accepts the solution if it was in review or proposed status.
  5. Auto-solves the problem if the accepted solution is the only active one and there are no open sub-problems.

Using --force bypasses the critique and sign-off gates and sets the force_accepted flag on the solution.

Terminal window
jjj submit
jjj submit --force

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 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
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_accepted
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"