Skip to content

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

3.9 KB
Raw Blame
---
source: tests/integration_tests/help.rs
info:
  program: wt
  args:
    - config
    - state
    - "--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 state - Manage internal data and cache

Usage: wt config state [OPTIONS] <COMMAND>

Commands:
  get             Get all stored state
  clear           Clear all stored state
  cache           Regenerable caches
  default-branch  Default branch detection and override
  logs            Operation and debug logs
  marker          Branch markers
  vars            Custom variables per branch

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

State is stored in .git/ (config entries and log files), separate from configuration files.

Keys

- cache: Regenerable caches — CI status, summaries, git commands, hints, and the wt switch - target
- default-branch: The repository's default branch (main, master, etc.)
- marker: Custom status marker for a branch (shown in wt list)
- vars: Custom variables per branch
- logs: Operation and debug logs

Examples

Get the default branch:
  wt config state default-branch

Set the default branch manually:
  wt config state default-branch set main

Set a marker for current branch:
  wt config state marker set 🚧

Store arbitrary data:
  wt config state vars set env=staging

Drop the regenerable caches:
  wt config state cache clear

Show all stored state:
  wt config state get

Clear all stored state:
  wt config state clear

----- stderr -----