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 initjjj initjjj status
Show status and next actions — what should I work on?
jjj status [OPTIONS]| Flag | Type | Description |
|---|---|---|
--all | bool | Show all items (no limit) |
--mine | bool | Only show authored work |
--limit | integer | Show top N items (default: 5) |
--json | bool | Output 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 statusjjj status --alljjj status --mine --limit 10jjj status --jsonjjj next
Show the top next actions — a quick summary of what to work on.
jjj next [OPTIONS]| Flag | Type | Description |
|---|---|---|
--top | integer | Number of items to show (default: 1, 0 for all) |
--mine | bool | Only show items assigned to you |
--json | bool | Output as JSON |
--claim | bool | Claim the top item: assign it to yourself and display it |
jjj nextjjj next --top 5jjj next --minejjj next --jsonjjj next --claim # Grab the top item and assign it to youjjj next --claim --json # Same, with JSON outputjjj overlaps
Show files touched by multiple in-progress solutions. Useful for detecting potential merge conflicts before they happen.
jjj overlaps [OPTIONS]| Flag | Type | Description |
|---|---|---|
--json | bool | Output as JSON |
jjj overlapsjjj overlaps --jsonWhen 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]| Flag | Type | Description |
|---|---|---|
--json | bool | Output as JSON |
jjj insightsjjj insights --jsonStatistics 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]| Flag | Type | Description |
|---|---|---|
--remote | string | Remote to fetch from (default: origin) |
jjj fetchjjj fetch --remote upstreamjjj push
Push code and metadata to remote.
jjj push [bookmarks...] [OPTIONS]| Flag | Type | Description |
|---|---|---|
--remote | string | Remote to push to (default: origin) |
--no-prompt | bool | Skip interactive prompts |
--dry-run | bool | Show what would be pushed without pushing |
jjj pushjjj push my-featurejjj push --dry-runjjj sync
Fetch from remote then push local changes back — shorthand for jjj fetch followed by jjj push.
jjj sync [OPTIONS]| Flag | Type | Description |
|---|---|---|
--remote | string | Remote to sync with (default: origin) |
--no-prompt | bool | Skip interactive prompts |
--dry-run | bool | Show what would happen without making any changes |
jjj syncjjj sync --remote upstreamjjj sync --dry-runjjj github
Bridge jjj problems and solutions with GitHub Issues and Pull Requests.
jjj github [COMMAND] [OPTIONS]| Flag | Type | Description |
|---|---|---|
--dry-run | bool | Preview actions without making any changes |
Subcommands
| Command | Description |
|---|---|
import [issue] [--all] [--label] | Import GitHub issue(s) as jjj problems |
pr [solution] [--base] | Create or update a GitHub PR for a solution |
status | Show 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 |
push | Refresh PR bodies and sync GitHub issue open/closed state |
jjj github # pull review states from GitHubjjj github import #123 # import issue #123 as a problemjjj github import --all # import all unlinked open issuesjjj github import --all --label bug # import issues with a specific labeljjj github pr # create PR for current solutionjjj github pr "auth fix" --base dev # create PR against a specific base branchjjj github status # show linked issue/PR statusjjj github merge "auth fix" # squash-merge the linked PRjjj github close "old problem" # close the linked GitHub issuejjj ui
Launch the interactive TUI dashboard.
jjj uiThe 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.
jjj completion bash >> ~/.bashrcjjj completion zsh >> ~/.zshrcjjj completion fish > ~/.config/fish/completions/jjj.fishjjj events
Query the decision event log.
jjj events [OPTIONS]| Flag | Type | Description |
|---|---|---|
--from | string | Filter by start date (YYYY-MM-DD or YYYY-MM) |
--to | string | Filter by end date |
--problem | string | Filter by problem ID |
--solution | string | Filter by solution ID |
--type | string | Filter by event type |
--search | string | Full-text search in rationales |
--json | bool | Output as JSON |
--limit | integer | Number of events (default: 20) |
jjj eventsjjj events --from 2024-01 --to 2024-06jjj events --problem "auth"jjj events --type solution_approvedjjj 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]| Flag | Type | Description |
|---|---|---|
--json | bool | Output as JSON |
jjj timeline "auth bug"