id = "worktrunk" name = "Worktrunk" homepage = "https://worktrunk.dev/" description = "A CLI for managing Git worktrees with shell integration and lifecycle hooks." executables = ["wt"] [dotfiles] # https://worktrunk.dev/config/ — the user config is ~/.config/worktrunk/config.toml # on macOS/Linux and %APPDATA%/worktrunk/config.toml on Windows. The FAQ also # documents the sibling approvals.toml created for approved user commands. 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 } [[commands.subcommand]] path = ["switch"] label = "Switch or create a worktree" description = "Go to the worktree for a branch, optionally creating the branch from a base." [[commands.subcommand.source]] id = "help" kind = "help" url = "https://worktrunk.dev/switch/" revision = "2026-10-27" evidence = """ Usage: wt switch [OPTIONS] [BRANCH] [-- ...] [BRANCH] Branch, worktree path, shortcut, or PR/MR URL -c, --create Create a new branch -b, --base Base branch -x, --execute Program to run after switch --clobber Remove stale paths at target --no-cd Skip directory change after switching --no-hooks Skip hooks wt switch --create hotfix --base production """ [[commands.subcommand.field]] id = "branch" label = "Branch" description = "Branch name or worktree path. Shortcuts: ^ (default branch), - (previous), @ (current)." type = "string" position = 0 sources = ["help"] [[commands.subcommand.field]] id = "create" label = "Create new branch" type = "boolean" option = ["--create", "-c"] sources = ["help"] [[commands.subcommand.field]] 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"] [[commands.subcommand.field]] id = "execute" label = "Run program after switch" type = "string" option = ["--execute", "-x"] effect = "exec" sources = ["help"] [[commands.subcommand.field]] id = "no_cd" label = "Do not change directory" type = "boolean" option = ["--no-cd"] sources = ["help"] [[commands.subcommand.field]] id = "no_hooks" label = "Skip hooks" type = "boolean" option = ["--no-hooks"] sources = ["help"] [[commands.subcommand.field]] id = "clobber" label = "Remove stale path at target" type = "boolean" option = ["--clobber"] effect = "delete" sources = ["help"] [[commands.subcommand.task]] id = "open" label = "Switch to a branch" fields = ["branch"] required = ["branch"] [[commands.subcommand.task]] id = "new" label = "Create a branch and worktree" fields = ["branch", "create", "base", "no_hooks"] required = ["branch"] set = { create = [true] } [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["branch", "create", "base"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["execute", "no_cd", "no_hooks", "clobber"] [[commands.subcommand]] path = ["list"] label = "List worktrees" description = "Show worktrees and their status." [[commands.subcommand.source]] id = "help" kind = "help" url = "https://worktrunk.dev/list/" revision = "2026-10-27" evidence = """ Usage: wt list [OPTIONS] --format Output format [default: table] [possible values: table, json] --branches Include branches without worktrees --remotes Include remote branches --full Show CI status and LLM summaries """ [[commands.subcommand.field]] id = "format" label = "Output format" type = "enum" option = ["--format"] choices = [{ value = "table", label = "Table" }, { value = "json", label = "JSON" }] sources = ["help"] [[commands.subcommand.field]] id = "branches" label = "Include branches without worktrees" type = "boolean" option = ["--branches"] sources = ["help"] [[commands.subcommand.field]] id = "remotes" label = "Include remote branches" type = "boolean" option = ["--remotes"] sources = ["help"] [[commands.subcommand.field]] id = "full" label = "Show CI status and summaries" description = "Also queries the forge over the network." type = "boolean" option = ["--full"] sources = ["help"] [[commands.subcommand.task]] id = "overview" label = "List worktrees" fields = ["branches", "remotes", "full", "format"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["branches", "remotes", "full", "format"] [[commands.subcommand]] path = ["remove"] label = "Remove a worktree" description = "Remove worktrees and delete their branches when merged. Defaults to the current worktree." [[commands.subcommand.source]] id = "help" kind = "help" url = "https://worktrunk.dev/remove/" revision = "2026-10-27" evidence = """ Usage: wt remove [OPTIONS] [BRANCHES]... [BRANCHES]... Branch name or worktree path [default: current] --no-delete-branch Keep branch after removal -D, --force-delete Delete unmerged branches --foreground Run removal in foreground (block until complete) -f, --force Force worktree removal --no-hooks Skip hooks """ [[commands.subcommand.field]] id = "branches" label = "Branches or worktree paths" description = "Leave empty to remove the current worktree." type = "string" position = 0 multiple = true sources = ["help"] [[commands.subcommand.field]] id = "no_delete_branch" label = "Keep the branch" type = "boolean" option = ["--no-delete-branch"] sources = ["help"] [[commands.subcommand.field]] id = "force_delete" label = "Delete unmerged branches" type = "boolean" option = ["--force-delete", "-D"] effect = "delete" sources = ["help"] [[commands.subcommand.field]] id = "force" label = "Force removal of a dirty worktree" type = "boolean" option = ["--force", "-f"] effect = "delete" sources = ["help"] [[commands.subcommand.field]] id = "foreground" label = "Wait for removal" type = "boolean" option = ["--foreground"] sources = ["help"] [[commands.subcommand.field]] id = "no_hooks" label = "Skip hooks" type = "boolean" option = ["--no-hooks"] sources = ["help"] [[commands.subcommand.task]] id = "remove" label = "Remove worktrees" fields = ["branches", "no_delete_branch", "foreground"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["branches", "no_delete_branch", "foreground"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["force_delete", "force", "no_hooks"]