Skip to content

Configuration

Configuration

jjj uses a TOML configuration file stored at .jj/jjj-meta/config.toml within the repository.

Config File Format

# Project name
name = "my-project"
# Default reviewers for all solutions
default_reviewers = ["alice", "bob"]
# Custom key-value settings
[settings]
key = "value"
[github]
enabled = true
repo = "owner/my-project"
auto_push = false
sync_critiques = true
sync_lgtm = true
auto_close_on_solve = true
problem_label = "jjj"
[github.label_priority]
"P0" = "critical"
"P1" = "high"
"P2" = "medium"
"P3" = "low"

Fields

FieldTypeDescription
namestringProject name
default_reviewersstring[]Reviewers added to all new solutions
settingsmapArbitrary key-value pairs for custom settings

Deprecated: review.default_required has been removed. Review is now per-solution: a solution requires review when it has assigned reviewers. Use --reviewer on jjj solution new to assign reviewers at creation, or create review critiques with jjj critique new "solution" "Review requested" --reviewer @name. Solutions without assigned reviewers do not require sign-offs.

[github] Section

Controls GitHub integration. All fields are optional and have sensible defaults.

FieldTypeDefaultDescription
enabledbool | nullauto-detectEnable GitHub integration. When omitted, jjj checks for the gh CLI. Set to false to disable explicitly.
repostring | nullauto-detectOverride the repository as "owner/repo". Useful when jjj cannot infer the repo from the remote.
auto_pushboolfalseAutomatically create issues/PRs on local operations (e.g., problem new, solution new).
sync_critiquesbooltrueImport “Request Changes” PR reviews as critiques when syncing.
sync_lgtmbooltrueImport “Approve” PR reviews (LGTM) when syncing.
auto_close_on_solveboolfalseClose the linked GitHub issue automatically when jjj problem solve runs.
problem_labelstring"jjj"Label applied to GitHub issues created for problems.
label_prioritymap{}Map custom GitHub label names to jjj priorities. See below.

[github.label_priority]

Standard priority labels (p0, critical, high, p1, medium, p2, low, p3) are recognized automatically. Use label_priority only when your team uses non-standard label naming conventions.

[github.label_priority]
"P0 — Critical" = "critical"
"P1 — High" = "high"
"P2 — Medium" = "medium"
"P3 — Low" = "low"

When jjj imports an issue with one of these labels, it maps the label to the corresponding jjj priority.

Automation Rules

Automation rules let you trigger actions when jjj events occur. Rules are defined in config.toml using the [[automation]] array-of-tables syntax.

[[automation]]
on = "solution_submitted"
action = "github_pr"
[[automation]]
on = "problem_created"
action = "github_issue"
[[automation]]
on = "solution_approved"
action = "shell"
command = "echo 'Solution {{title}} approved by {{user}}'"
[[automation]]
on = "solution_withdrawn"
action = "shell"
command = "notify-team --msg '{{title}} was withdrawn'"
enabled = false

Fields

FieldTypeRequiredDescription
onstringyesEvent type that triggers this rule
actionstringyesAction to execute (shell or a built-in action)
commandstringfor shellShell command to run (supports template variables)
enabledboolnoWhether the rule is active (default: true)

Event Types

EventFires when
problem_createdA new problem is created
problem_solvedA problem is marked solved
problem_dissolvedA problem is dissolved
problem_reopenedA solved/dissolved problem is reopened
solution_createdA new solution is proposed
solution_submittedA solution is submitted for review
solution_approvedA solution is approved
solution_withdrawnA solution is withdrawn
critique_raisedA new critique is raised
critique_addressedA critique is addressed
critique_dismissedA critique is dismissed
critique_validatedA critique is validated
critique_repliedA reply is added to a critique
milestone_createdA new milestone is created
milestone_completedA milestone is completed

Built-in Actions

ActionDescription
github_issueCreate a GitHub issue for the problem
github_prCreate or update a GitHub PR for the solution
github_mergeSquash-merge the linked GitHub PR
github_closeClose the linked GitHub issue
github_syncSync state with GitHub
shellRun a custom shell command

Template Variables

Shell commands support {{var}} template expansion:

VariableDescription
{{id}}Entity UUID
{{title}}Entity title
{{user}}Current user
{{problem.title}}Title of the linked problem
{{pr_number}}GitHub PR number (if linked)

VS Code Extension

The VS Code extension uses the jjj.path setting to locate the jjj binary:

{
"jjj.path": "/usr/local/bin/jjj"
}

If not set, the extension looks for jjj on PATH.

Environment Variables

VariableDescription
JJJ_DIROverride the metadata directory (default: .jj/jjj-meta/)
JJ_PATHPath to the jj binary

Storage Location

All metadata is stored in .jj/jjj-meta/ inside an orphaned jjj bookmark. The working copy is never touched by jjj operations.

.jj/jjj-meta/
config.toml # Project configuration
problems/ # Problem markdown files
solutions/ # Solution markdown files
critiques/ # Critique markdown files
milestones/ # Milestone markdown files
events.jsonl # Append-only event log

To sync metadata with collaborators:

Terminal window
jj git push -b jjj # Push metadata bookmark
jj git fetch # Fetch collaborator changes