Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

35.6 KB
Raw Blame
---
source: tests/integration_tests/help.rs
info:
  program: wt
  args:
    - config
    - "--help"
  env:
    CLICOLOR_FORCE: "1"
    COLUMNS: "500"
    GIT_ALLOW_PROTOCOL: file
    GIT_CONFIG_COUNT: "2"
    GIT_CONFIG_GLOBAL: /nonexistent/wt/gitconfig
    GIT_CONFIG_KEY_0: user.useConfigOnly
    GIT_CONFIG_KEY_1: rerere.enabled
    GIT_CONFIG_SYSTEM: /nonexistent/wt/gitconfig
    GIT_CONFIG_VALUE_0: "true"
    GIT_CONFIG_VALUE_1: "false"
    LANG: C
    LC_ALL: C
    LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"
    TERM: alacritty
    WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
    WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
    WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
    WORKTRUNK_TEST_BASH_INSTALLED: "0"
    WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
    WORKTRUNK_TEST_CODEX_INSTALLED: "0"
    WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
    WORKTRUNK_TEST_EPOCH: "1735776000"
    WORKTRUNK_TEST_FISH_INSTALLED: "0"
    WORKTRUNK_TEST_GEMINI_INSTALLED: "0"
    WORKTRUNK_TEST_NUSHELL_ENV: "0"
    WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
    WORKTRUNK_TEST_PARENT_SHELL: ""
    WORKTRUNK_TEST_POWERSHELL_ENV: "0"
    WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
    WORKTRUNK_TEST_PROBE_TIMEOUT_MS: "60000"
    WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
    WORKTRUNK_TEST_ZSH_INSTALLED: "0"
---
success: true
exit_code: 0
----- stdout -----
wt config - Manage user & project configs

Includes shell integration, hooks, and saved state.

Usage: wt config [OPTIONS] <COMMAND>

Commands:
  shell      Shell integration setup
  create     Create configuration file
  show       Show configuration files & locations
  update     Update deprecated config settings
  approvals  Manage command approvals
  alias      Inspect and preview aliases
  plugins    Plugin management
  state      Manage internal data and cache

Options:
  -h, --help
          Print help (see a summary with '-h')

Global Options:
  -C <path>
          Working directory for this command

      --config <path>
          User config file path

      --config-set <toml>
          Override config with inline TOML, e.g. --config-set list.full=true (repeatable)

  -v, --verbose...
          Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/). Set WORKTRUNK_VERBOSE=0|1|2 to apply the same level everywhere — including shell completion, which no flag can reach

  -y, --yes
          Skip approval prompts

Examples

Install shell integration (required for directory switching):

  wt config shell install

Create user config file with documented examples:

  wt config create

Create project config file (.config/wt.toml) for hooks:

  wt config create --project

Show current configuration and file locations:

  wt config show

Configuration files

      File                 Location                                Contains                     Committed & shared 
 ────────────── ─────────────────────────────── ─────────────────────────────────────────────── ────────────────── 
 User config    ~/.config/worktrunk/config.toml Worktree path template, LLM commit configs, etc ✗                  
 Project config .config/wt.toml                 Project hooks, dev server URL                   ✓                  

Organizations can deploy a system-wide config file for shared defaults — run wt config show for the platform-specific location.

User config — personal preferences:

  # ~/.config/worktrunk/config.toml
  worktree-path = ".worktrees/{{ branch | sanitize }}"
  
  [commit.generation]
  command = "MAX_THINKING_TOKENS=0 claude -p --no-session-persistence --model=haiku --tools='' --safe-mode --setting-sources='user' --system-prompt=''"

Project config — shared team settings:

  # .config/wt.toml
  [pre-start]
  deps = "npm ci"
  
  [pre-merge]
  test = "npm test"

USER CONFIGURATION

Create with wt config create. Values shown are defaults unless noted otherwise.

Location:

- macOS/Linux: ~/.config/worktrunk/config.toml (or $XDG_CONFIG_HOME if set)
- Windows: %APPDATA%\worktrunk\config.toml

Worktree path template

Controls where new worktrees are created.

Available template variables:

- {{ repo_path }} — absolute path to the repository root (e.g., /Users/me/code/myproject. Or for bare repos, the bare directory itself)
- {{ repo }} — repository directory name (e.g., myproject)
- {{ owner }} — primary remote owner path (may include subgroups like group/subgroup)
- {{ remote_repo }} — repository name in the primary remote URL, without .git (e.g., myproject); differs from {{ repo }}, the directory on disk, when a clone was renamed
- {{ branch }} — raw branch name (e.g., feature/auth)
- {{ branch | sanitize }} — filesystem-safe: / and \ become - (e.g., feature-auth)
- {{ branch | sanitize_db }} — database-safe: lowercase, underscores, hash suffix (e.g., feature_auth_x7k)
- {{ branch | codename(2) }} — deterministic friendly name from a ~1.26M-combo pool (e.g., malleable-opah)

This is a smaller set than the variables hooks and aliases get.

Examples for repo at ~/code/myproject, branch feature/auth:

Default — sibling directory (~/code/myproject.feature-auth):

  worktree-path = "{{ repo_path }}/../{{ repo }}.{{ branch | sanitize }}"

Inside the repository (~/code/myproject/.worktrees/feature-auth):

  worktree-path = "{{ repo_path }}/.worktrees/{{ branch | sanitize }}"

Friendly branch-derived names (~/code/myproject.malleable-opah):

  worktree-path = "{{ repo_path }}/../{{ repo }}.{{ branch | codename(2) }}"

Friendly names with branch identity in a parent directory (~/code/worktrees/feature-auth/malleable-opah):

  worktree-path = "{{ repo_path }}/../worktrees/{{ branch | sanitize }}/{{ branch | codename(2) }}"

Centralized worktrees directory (~/worktrees/myproject/feature-auth):

  worktree-path = "~/worktrees/{{ repo }}/{{ branch | sanitize }}"

By remote owner path (~/development/max-sixty/myproject/feature/auth):

  worktree-path = "~/development/{{ owner }}/{{ repo }}/{{ branch }}"

Bare repository cloned to ~/code/myproject/.git (~/code/myproject/feature-auth):

  worktree-path = "{{ repo_path }}/../{{ branch | sanitize }}"

~ expands to the home directory. Relative paths resolve from repo_path.

LLM commit messages

Generate commit messages automatically during merge. Requires an external CLI tool.

Claude Code

  [commit.generation]
  command = "MAX_THINKING_TOKENS=0 claude -p --no-session-persistence --model=haiku --tools='' --safe-mode --setting-sources='user' --system-prompt=''"

Codex

Create ~/.codex/worktrunk-commit-instructions.txt containing just . (no newline). Accepting Worktrunk's first-run Codex setup creates the file for you.

  [commit.generation]
  command = "codex exec -m gpt-6-luna -c model_reasoning_effort='none' -c project_doc_max_bytes=0 -c skills.max_context_tokens=1 -c agents.enabled=false -c features.goals=false -c web_search=disabled -c 'model_instructions_file=\"~/.codex/worktrunk-commit-instructions.txt\"' -c features.shell_tool=false -c features.unified_exec=false -c features.apps=false -c features.plugins=false --ephemeral --sandbox=read-only --json - | jq -sr '[.[] | select(.item.type? == \"agent_message\")] | last.item.text'"

OpenCode

  [commit.generation]
  command = "opencode run -m anthropic/claude-haiku-5-5 --variant fast"

llm

  [commit.generation]
  command = "llm -m claude-haiku-4.5"

aichat

  [commit.generation]
  command = "aichat -m claude:claude-haiku-4.5 --code"

See LLM commits docs for setup and Custom prompt templates for template customization.

Command config

List

Persistent flag values for wt list. Override on command line as needed.

  [list]
  summary = false    # Enable LLM branch summaries (requires [commit.generation])
  
  full = false       # Show CI status and LLM summaries (--full)
  branches = false   # Include branches without worktrees (--branches)
  remotes = false    # Include remote-only branches (--remotes)
  
  json-schema = 2    # JSON output schema: 2 (envelope, default) or 1 (bare array)
  
  columns = ["branch", "status", "ci", "path"]   # Columns to show, in order — built-ins or custom headers (omit for the default set)
  
  timeout-ms = 0     # Wall-clock budget for the entire collect phase; 0 disables

columns selects and orders the columns the wt list table and the wt switch
picker render; --format json ignores it and always emits every field. Omit it
for the default set. It is meant to drive a per-invocation
alias (wt --config-set 'list.columns=[…]' list),
giving a named view without disturbing the default wt list. A static setting
works but pins one layout over a table that otherwise adapts to --full and
terminal width.

Valid built-in names:

- branch — The branch name
- status — Git status symbols, plus any user-defined status
- working-diff — Uncommitted line changes against HEAD, including untracked files (header HEAD±)
- ahead-behind — Commits ahead of and behind the default branch (header main↕)
- branch-diff — Line changes against the default branch (header main…±)
- summary — An LLM-generated summary of the branch
- upstream — Commits ahead of and behind the upstream tracking branch (header Remote⇅)
- ci — CI status of the head commit
- path — The worktree's path
- url — Dev-server URL from the [list] url template
- commit — The head commit's short hash
- age — Time since the last commit
- message — The head commit's subject

A selection mixes built-ins with custom columns, each named
by its [list.custom-columns] header (columns = ["branch", "Ticket", "ci"]),
and is exhaustive: only the listed columns render. Omit columns to keep the
default set, where custom columns append automatically.

Listing a column forces it on, space permitting: ci shows without --full. A
column whose data source is missing still stays hidden — summary needs an LLM
command ([commit.generation]), url needs a [list] url template.

Custom columns [experimental]

Custom columns add per-branch context to the wt list table. Each
[list.custom-columns] entry is a column: the key is the header, the template
renders each row's cell.

  [list.custom-columns.Ticket]
  template = "{{ vars.ticket }}"   # Required; the result is the cell text
  width = 20                       # Optional max display width (default: 40)
  priority = 9                     # Optional drop order when the terminal narrows;
                                   # lower = kept longer (default: 9, the URL band)

Templates may reference {{ branch }}, {{ worktree_path }},
{{ worktree_name }} (empty for branch-only rows), and two per-branch
namespaces:

- {{ vars.* }} — values stored with
  wt config state vars set.
- {{ git.branch.* }} — the branch's own git config under branch.<name>.*,
  read straight from git config (e.g. {{ git.branch.jira }} for a key you
  set yourself, or the git-native description). Git lowercases config variable
  names, so branch.<name>.nvciShelf reads as {{ git.branch.nvcishelf }}.

All standard filters work (sanitize, hash_port, codename, …). A row
where the template renders empty (e.g. a branch without the key) shows an
empty cell; a column that is empty for every row is dropped from the table.
wt list --format json includes the rendered values under
items[].display.columns in schema 2, or under columns in schema 1.

A Jira column reading a key kept in git config, and a Summary column
showing just the first line of the git-native branch description:

  [list.custom-columns.Jira]
  template = "{{ git.branch.jira }}"
  
  [list.custom-columns.Summary]
  template = "{{ git.branch.description | lines | first }}"

Commit

Shared by wt step commit, wt step squash, and wt merge.

  [commit]
  stage = "all"      # What to stage before commit: "all", "tracked", or "none"

Merge

Most flags are on by default. Set to false to change default behavior.

  [merge]
  squash = true      # Squash commits into one (--no-squash to preserve history)
  commit = true      # Commit uncommitted changes first (--no-commit to skip)
  rebase = true      # Rebase onto target before merge (--no-rebase to skip)
  remove = true      # Remove worktree after merge (--no-remove to keep)
  verify = true      # Run project hooks (--no-hooks to skip)
  ff = true          # Fast-forward merge (--no-ff to create a merge commit instead)

Remove

Persistent flag values for wt remove. Override on command line as needed.

  [remove]
  delete-branch = true   # Delete branch after removal (--no-delete-branch to keep)

Switch

  [switch]
  cd = true          # Change directory after switching (--no-cd to skip)
  
  [switch.picker]
  pager = "delta --paging=never"   # Example: override git's core.pager for diff preview
  preview = true                   # Show the preview panel on open (Alt-p toggles)

Step

  [step.copy-ignored]
  exclude = []   # Additional excludes (e.g., [".cache/", ".turbo/"])

Built-in excludes (VCS metadata and tool-state directories) always apply; the wt step copy-ignored docs list them. User config and project config exclusions are combined.

User aliases

Command templates that run as wt <name>. See the Extending Worktrunk guide for usage and flags.

  [aliases]
  greet = "echo Hello from {{ branch }}"
  url = "echo http://localhost:{{ branch | hash_port }}"

Aliases defined here apply to all projects. For project-specific aliases, use the project config [aliases] section instead.

User project-specific settings

User config can include a [projects] table for project-specific settings — worktree layout, setting overrides, anything else — separate from the project config shared with teammates.

Entries are keyed by project identifier — <host>/<owner>/<repo> derived from the primary remote URL (no .git suffix; an explicit port other than SSH's default 22 stays with the host, as in gitlab.example.com:2222/team/project), or the canonical repo path when there is no remote. Run wt config show inside the repo to see the identifier for the current project; it appears in the PROJECT CONFIG section as Identifier: ….

Scalar values (like worktree-path) replace the global value; everything else (hooks, aliases, etc.) appends, global first. See how the layers rank.

  [projects."github.com/user/repo"]
  worktree-path = ".worktrees/{{ branch | sanitize }}"
  list.full = true
  merge.squash = false
  remove.delete-branch = false
  pre-start.env = "cp .env.example .env"
  step.copy-ignored.exclude = [".repo-local-cache/"]
  aliases.deploy = "make deploy BRANCH={{ branch }}"

Matching several repositories with one entry

A key containing * matches any run of characters, / included, so one entry covers a whole host or namespace — including nested groups. * is the only wildcard; every other character, . among them, is literal.

  # Every repository on a self-hosted forge whose hostname carries no brand
  [projects."git.company.example/*"]
  forge.platform = "gitlab"
  
  # Everything under one namespace shares a layout
  [projects."git.company.example/platform/*"]
  worktree-path = ".worktrees/{{ branch | sanitize }}"

Every matching entry applies, least- to most-specific, following the rule above: a more specific entry — git.company.example/platform/* over git.company.example/* — wins where both set the same setting, while hooks and aliases from every matching entry all run, least-specific first. A literal key is the most specific of all; specificity is the count of non-* characters in the key. End a host-wide key with /* — a bare git.company.example* also covers hosts whose names merely start with that 
string. A remote on a non-default SSH port carries the port in its identifier, so its host-wide key is git.company.example:2222/*.

Entries in approvals.toml match the same way, so a hand-written pattern entry approves its commands for every repository it covers.

Forge platform and hostname

forge names the forge for the matched repositories — the user-level counterpart of the project config's forge platform block, for a self-hosted host whose name carries no github, gitlab, or gitea for detection to read.

  [projects."git.company.example/*"]
  forge.platform = "gitlab"                    # or "github", "gitea" (experimental), "azure-devops" (experimental)
  forge.hostname = "api.git.company.example"   # API host, when the remote's own host isn't it

A repository's own [forge] block still wins over any entry here, field by field.

Hooks support all three hook forms. A table runs multiple commands concurrently; an array-of-tables pipeline runs steps in sequence:

  # Single command
  [projects."github.com/user/repo"]
  post-start = "mise trust"
  
  # Multiple commands, running concurrently
  [projects."github.com/user/repo".post-start]
  mise = "mise trust"
  server = "npm run dev"
  
  # Pipeline: steps run in sequence
  [[projects."github.com/user/repo".post-start]]
  install = "npm ci"
  
  [[projects."github.com/user/repo".post-start]]
  build = "npm run build"
  server = "npm run dev"

Custom prompt templates

Templates use minijinja syntax.

Commit template

Available variables:

- {{ git_diff }}, {{ git_diff_stat }} — diff content
- {{ branch }}, {{ repo }} — context
- {{ recent_commits }} — recent commit messages
- {{ user_guidance }}, {{ project_guidance }} — rendered append fragments (see Appending to the prompt)

Default template:

  [commit.generation]
  template = """
  <task>Write a commit message for the staged changes below.</task>
  
  <format>
  - Subject line under 50 chars
  - For material changes, add a blank line then a body paragraph explaining the change
  - Output only the commit message, no quotes or code blocks
  </format>
  
  <style>
  - Imperative mood: "Add feature" not "Added feature"
  - Match recent commit style (conventional commits if used)
  - Describe the change, not the intent or benefit
  </style>
  {% if user_guidance %}
  <user-guidance>
  {{ user_guidance }}
  </user-guidance>
  {% endif %}{% if project_guidance %}
  <project-guidance>
  {{ project_guidance }}
  </project-guidance>
  {% endif %}
  <diffstat>
  {{ git_diff_stat }}
  </diffstat>
  
  <diff>
  {{ git_diff }}
  </diff>
  
  <context>
  Branch: {{ branch }}
  {% if recent_commits %}<recent_commits>
  {% for commit in recent_commits %}- {{ commit }}
  {% endfor %}</recent_commits>{% endif %}
  </context>
  
  """

Squash template

Available variables (in addition to commit template variables):

- {{ commit_details }} — list of commits being squashed; each renders as its subject and exposes .subject / .body
- {{ target_branch }} — merge target branch

Default template:

  [commit.generation]
  squash-template = """
  <task>Write a commit message for the change in <diff>, which is everything the squash will record. <commits> lists what it folds in.</task>
  
  <format>
  - Subject line under 50 chars
  - For material changes, add a blank line then a body paragraph explaining the change
  - Output only the commit message, no quotes or code blocks
  </format>
  
  <style>
  - Imperative mood: "Add feature" not "Added feature"
  - Match the style of commits being squashed (conventional commits if used)
  - Describe the change, not the intent or benefit
  </style>
  {% if user_guidance %}
  <user-guidance>
  {{ user_guidance }}
  </user-guidance>
  {% endif %}{% if project_guidance %}
  <project-guidance>
  {{ project_guidance }}
  </project-guidance>
  {% endif %}
  <commits branch="{{ branch }}" target="{{ target_branch }}">
  {% for detail in commit_details %}- {{ detail.subject }}
  {% endfor %}</commits>
  
  <diffstat>
  {{ git_diff_stat }}
  </diffstat>
  
  <diff>
  {{ git_diff }}
  </diff>
  
  """

Appending to the prompt

template-append adds personal conventions to the commit and squash prompts without restating the whole template:

  [commit.generation]
  template-append = """
  - Explain the rationale in the body, not just the change
  """

See the LLM commits guide for how the fragment renders and its project-config counterpart.

User hooks

See wt hook for hook types, execution order, template variables, and examples. User hooks apply to all projects; project hooks apply only to that repository.
PROJECT CONFIGURATION

Project configuration lets teams share repository-specific settings — hooks, dev server URLs, and other defaults. The file lives in .config/wt.toml and is typically checked into version control.

To create a starter file with commented-out examples, run wt config create --project.

Project hooks

Project hooks apply to this repository only. See wt hook for hook types, execution order, and examples.

  pre-start = "npm ci"
  post-start = "npm run dev"
  pre-merge = "npm test"

Dev server URL

URL column in wt list (dimmed when port not listening):

  [list]
  url = "http://localhost:{{ branch | hash_port }}"

Forge platform

The forge is read from the remote's hostname: any host carrying github, gitlab, or gitea anywhere in it, plus the Azure DevOps service domains. Name the forge explicitly for a host carrying none of those, such as a Forgejo instance at forge.example.com:

  [forge]
  platform = "github"  # or "gitlab", "gitea" (experimental), "azure-devops" (experimental)
  hostname = "github.example.com"  # Example: API host (GHE / self-hosted GitLab)

When many repositories share one self-hosted host, name it once in user config with a pattern-keyed [projects] entry instead of repeating this block in each repo. A repository's own [forge] still wins, field by field.

Commit-message append

template-append adds project-wide conventions to the LLM commit and squash prompts, shared so every teammate's LLM sees the same style guide:

  [commit.generation]
  template-append = """
  - Use conventional commits (feat:, fix:, docs:, …)
  - Reference the relevant issue ID in the body
  """

The first time the fragment is used (and whenever it changes), wt prompts the user to approve it — the same one-shot gate as project-defined hooks. Only template-append is honored from the project file; the LLM command and the main prompt template stay in user config. See the LLM commits guide for how the fragment renders.

Copy-ignored excludes

Additional excludes for wt step copy-ignored:

  [step.copy-ignored]
  exclude = [".cache/", ".turbo/"]

Built-in excludes (VCS metadata and tool-state directories) always apply; the wt step copy-ignored docs list them. User config and project config exclusions are combined.

Project aliases

Command templates that run as wt <name>. See the Extending Worktrunk guide for usage and flags.

  [aliases]
  deploy = "make deploy BRANCH={{ branch }}"
  url = "echo http://localhost:{{ branch | hash_port }}"

Aliases defined here are shared with teammates. For personal aliases, use the user config [aliases] section instead.

SHELL INTEGRATION

See wt config shell for setup, activation, and current-shell diagnostics.

First-run prompts

On first run without shell integration, Worktrunk offers to install it. On first commit without LLM configuration, it offers to configure a detected tool (claude, codex, opencode). Declining sets skip-shell-integration-prompt or skip-commit-generation-prompt automatically.

OTHER

Environment variables

All user config options can be overridden with environment variables using the WORKTRUNK_ prefix.

Naming convention

Config keys use kebab-case (worktree-path), while env vars use SCREAMING_SNAKE_CASE (WORKTRUNK_WORKTREE_PATH). The conversion happens automatically.

For nested config sections, use double underscores to separate levels:

          Config                   Environment Variable          
 ───────────────────────── ───────────────────────────────────── 
 worktree-path             WORKTRUNK_WORKTREE_PATH               
 commit.generation.command WORKTRUNK_COMMIT__GENERATION__COMMAND 
 commit.stage              WORKTRUNK_COMMIT__STAGE               

Example: CI/testing override

Override the LLM command in CI to use a mock:

  WORKTRUNK_COMMIT__GENERATION__COMMAND="echo 'test: automated commit'" wt merge

Other environment variables

             Variable                                                                   Purpose                                                       
 ───────────────────────────────── ────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
 WORKTRUNK_BIN                     Override binary path for shell wrappers; useful for testing dev builds                                             
 WORKTRUNK_CONFIG_PATH             Override user config file location                                                                                 
 WORKTRUNK_SYSTEM_CONFIG_PATH      Override system config file location                                                                               
 WORKTRUNK_PROJECT_CONFIG_PATH     Override project config file location (defaults to .config/wt.toml); relative paths resolve from the worktree root 
 WORKTRUNK_MAX_CONCURRENT_COMMANDS Max parallel git commands (default: 32). Lower if hitting file descriptor limits.                                  
 WORKTRUNK_VERBOSE                 Verbosity level (0/1/2), like -v/-vv but applied everywhere — including shell completion, which no flag can reach  
 RUST_LOG                          Logging directive (e.g. worktrunk=debug); overrides the verbosity baseline for what reaches stderr                 
 NO_COLOR                          Disable colored output (standard)                                                                                  
 CLICOLOR_FORCE                    Force colored output even when not a TTY                                                                           

Inline config overrides (--config-set)

--config-set <toml> overrides any user config key for a single invocation. The value is a TOML fragment, so arrays and tables work directly; the flag is global (works before or after the subcommand), repeatable, and a later --config-set replaces an earlier one for the same key.

  wt --config-set list.full=true list
  wt step copy-ignored --config-set 'step.copy-ignored.exclude=["target", "dist"]'

This composes with aliases — an alias body can invoke wt --config-set … <command> to render a named view without changing the saved config.

Precedence

Sources closer to the invocation rank higher (user config above system config), and within a config file a project entry outranks the global key of the same name. So worktree-path comes from the first of these that sets it:

1. --config-set 'worktree-path = …'
2. WORKTRUNK_WORKTREE_PATH
3. [projects."github.com/owner/repo"] in the config file
4. global worktree-path in the config file

A --config-set that names a project entry is both the highest layer and the most specific key, so it beats the same flag's global key:

  wt --config-set 'projects."github.com/owner/repo".worktree-path = "/tmp/scratch"' switch --create feature

Hooks, aliases and step.copy-ignored.exclude accumulate rather than replace, so an env-set hook and a project's hook both run.

----- stderr -----