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 initjjj initjjj 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]| Flag | Type | Description |
|---|---|---|
--force | bool | Bypass critique and sign-off checks (sets force_accepted flag) |
Submit performs these steps:
- Checks for open critiques (unless
--force). - Checks that all assigned reviewers have signed off (unless
--force). - Rebases the current change onto main and squashes.
- Auto-accepts the solution if it was in review or proposed status.
- 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.
jjj submitjjj submit --forcejjj 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 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 |
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_acceptedjjj 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"