{
  "id": "worktrunk",
  "name": "Worktrunk",
  "homepage": "https://worktrunk.dev/",
  "description": "A CLI for managing Git worktrees with shell integration and lifecycle hooks.",
  "executables": [
    "wt"
  ],
  "dotfiles": {
    "paths": [
      "~/.config/worktrunk/config.toml",
      "~/.config/worktrunk/approvals.toml",
      "%APPDATA%/worktrunk/config.toml",
      "%APPDATA%/worktrunk/approvals.toml"
    ],
    "secret": [],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "Manage worktrees",
    "description": "Switch to or create a worktree, list worktrees, or remove one. Hooks, the interactive picker, PR/MR shortcuts and config subcommands are left to the command line.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "subcommand": [
      {
        "path": [
          "switch"
        ],
        "label": "Switch or create a worktree",
        "description": "Go to the worktree for a branch, optionally creating the branch from a base.",
        "source": [
          {
            "id": "help",
            "kind": "help",
            "url": "https://worktrunk.dev/switch/",
            "revision": "2026-10-27",
            "evidence": "Usage: wt switch [OPTIONS] [BRANCH] [-- <EXECUTE_ARGS>...]\n[BRANCH]  Branch, worktree path, shortcut, or PR/MR URL\n-c, --create               Create a new branch\n-b, --base <BASE>          Base branch\n-x, --execute <EXECUTE>    Program to run after switch\n--clobber                  Remove stale paths at target\n--no-cd                    Skip directory change after switching\n--no-hooks                 Skip hooks\nwt switch --create hotfix --base production\n"
          }
        ],
        "field": [
          {
            "id": "branch",
            "label": "Branch",
            "description": "Branch name or worktree path. Shortcuts: ^ (default branch), - (previous), @ (current).",
            "type": "string",
            "position": 0,
            "sources": [
              "help"
            ]
          },
          {
            "id": "create",
            "label": "Create new branch",
            "type": "boolean",
            "option": [
              "--create",
              "-c"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "base",
            "label": "Base branch",
            "description": "Branch to start the new branch from; defaults to the default branch.",
            "type": "string",
            "option": [
              "--base",
              "-b"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "execute",
            "label": "Run program after switch",
            "type": "string",
            "option": [
              "--execute",
              "-x"
            ],
            "effect": "exec",
            "sources": [
              "help"
            ]
          },
          {
            "id": "no_cd",
            "label": "Do not change directory",
            "type": "boolean",
            "option": [
              "--no-cd"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "no_hooks",
            "label": "Skip hooks",
            "type": "boolean",
            "option": [
              "--no-hooks"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "clobber",
            "label": "Remove stale path at target",
            "type": "boolean",
            "option": [
              "--clobber"
            ],
            "effect": "delete",
            "sources": [
              "help"
            ]
          }
        ],
        "task": [
          {
            "id": "open",
            "label": "Switch to a branch",
            "fields": [
              "branch"
            ],
            "required": [
              "branch"
            ]
          },
          {
            "id": "new",
            "label": "Create a branch and worktree",
            "fields": [
              "branch",
              "create",
              "base",
              "no_hooks"
            ],
            "required": [
              "branch"
            ],
            "set": {
              "create": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "branch",
              "create",
              "base"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "execute",
              "no_cd",
              "no_hooks",
              "clobber"
            ]
          }
        ]
      },
      {
        "path": [
          "list"
        ],
        "label": "List worktrees",
        "description": "Show worktrees and their status.",
        "source": [
          {
            "id": "help",
            "kind": "help",
            "url": "https://worktrunk.dev/list/",
            "revision": "2026-10-27",
            "evidence": "Usage: wt list [OPTIONS]\n--format <FORMAT>   Output format [default: table] [possible values: table, json]\n--branches          Include branches without worktrees\n--remotes           Include remote branches\n--full              Show CI status and LLM summaries\n"
          }
        ],
        "field": [
          {
            "id": "format",
            "label": "Output format",
            "type": "enum",
            "option": [
              "--format"
            ],
            "choices": [
              {
                "value": "table",
                "label": "Table"
              },
              {
                "value": "json",
                "label": "JSON"
              }
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "branches",
            "label": "Include branches without worktrees",
            "type": "boolean",
            "option": [
              "--branches"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "remotes",
            "label": "Include remote branches",
            "type": "boolean",
            "option": [
              "--remotes"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "full",
            "label": "Show CI status and summaries",
            "description": "Also queries the forge over the network.",
            "type": "boolean",
            "option": [
              "--full"
            ],
            "sources": [
              "help"
            ]
          }
        ],
        "task": [
          {
            "id": "overview",
            "label": "List worktrees",
            "fields": [
              "branches",
              "remotes",
              "full",
              "format"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "branches",
              "remotes",
              "full",
              "format"
            ]
          }
        ]
      },
      {
        "path": [
          "remove"
        ],
        "label": "Remove a worktree",
        "description": "Remove worktrees and delete their branches when merged. Defaults to the current worktree.",
        "source": [
          {
            "id": "help",
            "kind": "help",
            "url": "https://worktrunk.dev/remove/",
            "revision": "2026-10-27",
            "evidence": "Usage: wt remove [OPTIONS] [BRANCHES]...\n[BRANCHES]...   Branch name or worktree path [default: current]\n--no-delete-branch   Keep branch after removal\n-D, --force-delete   Delete unmerged branches\n--foreground         Run removal in foreground (block until complete)\n-f, --force          Force worktree removal\n--no-hooks           Skip hooks\n"
          }
        ],
        "field": [
          {
            "id": "branches",
            "label": "Branches or worktree paths",
            "description": "Leave empty to remove the current worktree.",
            "type": "string",
            "position": 0,
            "multiple": true,
            "sources": [
              "help"
            ]
          },
          {
            "id": "no_delete_branch",
            "label": "Keep the branch",
            "type": "boolean",
            "option": [
              "--no-delete-branch"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "force_delete",
            "label": "Delete unmerged branches",
            "type": "boolean",
            "option": [
              "--force-delete",
              "-D"
            ],
            "effect": "delete",
            "sources": [
              "help"
            ]
          },
          {
            "id": "force",
            "label": "Force removal of a dirty worktree",
            "type": "boolean",
            "option": [
              "--force",
              "-f"
            ],
            "effect": "delete",
            "sources": [
              "help"
            ]
          },
          {
            "id": "foreground",
            "label": "Wait for removal",
            "type": "boolean",
            "option": [
              "--foreground"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "no_hooks",
            "label": "Skip hooks",
            "type": "boolean",
            "option": [
              "--no-hooks"
            ],
            "sources": [
              "help"
            ]
          }
        ],
        "task": [
          {
            "id": "remove",
            "label": "Remove worktrees",
            "fields": [
              "branches",
              "no_delete_branch",
              "foreground"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "branches",
              "no_delete_branch",
              "foreground"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "force_delete",
              "force",
              "no_hooks"
            ]
          }
        ]
      }
    ]
  }
}
