@ogpoyraz/wtx 0.6.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -10
- package/completions/_wtx.zsh +33 -2
- package/completions/wtx.bash +8 -6
- package/completions/wtx.fish +13 -5
- package/dist/cli.mjs +3200 -2041
- package/package.json +1 -1
- package/skills/claude.md +18 -6
- package/skills/cursor.md +18 -6
- package/skills/opencode.md +18 -6
package/README.md
CHANGED
|
@@ -59,13 +59,16 @@ Run any command without a config and `wtx` walks you through setup: it scans com
|
|
|
59
59
|
# create a worktree (deps + sync_files handled automatically)
|
|
60
60
|
wtx create ogp/my-feature --repo my-frontend
|
|
61
61
|
|
|
62
|
+
# create a dependent worktree from another branch
|
|
63
|
+
wtx create ogp/my-ui --repo my-frontend --base ogp/my-api
|
|
64
|
+
|
|
62
65
|
# hand it to a coding agent
|
|
63
66
|
wtx create ogp/my-feature --repo my-frontend --agent claude --prompt "add OAuth login"
|
|
64
67
|
|
|
65
68
|
# list everything across all repos
|
|
66
69
|
wtx ls
|
|
67
70
|
|
|
68
|
-
# rebase onto main
|
|
71
|
+
# rebase onto the recorded base (main for independent branches)
|
|
69
72
|
wtx rebase ogp/my-feature
|
|
70
73
|
|
|
71
74
|
# remove when merged — refuses dirty worktrees unless forced
|
|
@@ -80,17 +83,20 @@ If origin already has a branch with that name owned by someone else, `wtx` warns
|
|
|
80
83
|
|
|
81
84
|
| Command | Args | Flags | Description |
|
|
82
85
|
|---|---|---|---|
|
|
83
|
-
| `create` | `<branch>` | `--repo`, `--base`, `--open`, `--ide`, `--track`, `--local`, `--agent <name>`, `--prompt <text>` | Create worktree(s), sync files, prepare deps, optionally spawn an agent |
|
|
86
|
+
| `create` | `<branch>` | `--repo`, `--base`, `--open`, `--ide`, `--track`, `--local`, `--agent <name>`, `--prompt <text>`, `--deps <strategy>` | Create worktree(s), sync files, prepare deps, optionally spawn an agent |
|
|
84
87
|
| `pull` | `<pr-link>` | `--repo` | Fetch a GitHub PR and create its worktree |
|
|
88
|
+
| `pull-branch` | `[branch]` | `--repo` | Fast-forward pull a worktree's branch (auto-detects repo from cwd) |
|
|
85
89
|
| `remove` | `<branch>` | `--repo`, `--force`, `--yes` | Remove worktree(s), clean empty dirs |
|
|
90
|
+
| `rename` | `<old-branch> <new-branch>` | `--repo` | Rename the branch and move the checkout to the matching new directory |
|
|
86
91
|
| `prune` | | `--repo`, `--force`, `--yes` | Remove worktrees whose PR has merged |
|
|
87
92
|
| `open` | `<branch>` | `--repo`, `--ide` | Open worktree in IDE |
|
|
88
|
-
| `rebase` | `<branch>` | `--repo
|
|
93
|
+
| `rebase` | `<branch>` | `--repo`, `--onto <ref>` | Rebase worktree onto its recorded base, or an explicit ref |
|
|
89
94
|
| `fetch` | | `--repo` | Fetch main for each repo |
|
|
90
95
|
| `sync` | `<branch>` | `--repo` | Re-copy sync files, run post-sync hooks |
|
|
91
|
-
| `deps` | `[branch]` | `--repo`, `--install`, `--symlink`, `--json` | Inspect or switch dependency strategy |
|
|
96
|
+
| `deps` | `[branch]` | `--repo`, `--install`, `--symlink`, `--json` | Inspect or switch dependency strategy; omit the branch and `--install` runs in the main checkout |
|
|
92
97
|
| `ls` | | `--repo`, `--pr`, `--json` | List all worktrees with clean/dirty state |
|
|
93
|
-
| `status` | `<branch>` | `--repo`, `--json` | Ahead/behind, dirty files, rebase state, deps strategy |
|
|
98
|
+
| `status` | `<branch>` | `--repo`, `--base <ref>`, `--json` | Ahead/behind against base, dirty files, rebase state, deps strategy |
|
|
99
|
+
| `stack` | `<branch>` | `--repo`, `--json` | Show recorded parent and descendant branches |
|
|
94
100
|
| `prs` | | `--repo`, `--json`, `--all` | Pull request status across worktrees |
|
|
95
101
|
| `exec` | `<branch> <command...>` | `--repo` | Run a command inside a worktree (`WTX_PORT` injected) |
|
|
96
102
|
| `terminal` | | | Interactive worktree dashboard (requires Bun) |
|
|
@@ -139,6 +145,12 @@ Config lives at `~/.config/wtx/config.json`.
|
|
|
139
145
|
},
|
|
140
146
|
"my-go-service": {
|
|
141
147
|
"main_branch": "main"
|
|
148
|
+
},
|
|
149
|
+
"forked-lib": {
|
|
150
|
+
"check_prs": true,
|
|
151
|
+
"forge_provider": "github",
|
|
152
|
+
"pr_lookup_repo": "upstream-owner/lib",
|
|
153
|
+
"install_script": "pnpm install --frozen-lockfile"
|
|
142
154
|
}
|
|
143
155
|
}
|
|
144
156
|
}
|
|
@@ -159,10 +171,22 @@ Config lives at `~/.config/wtx/config.json`.
|
|
|
159
171
|
| `repos.<name>.fetch_main_on_create` | `true` | Fetch before creating so branches start fresh |
|
|
160
172
|
| `repos.<name>.sync_files` | `[]` | Files copied from main checkout on create and sync |
|
|
161
173
|
| `repos.<name>.post_create` / `post_sync` | `[]` | Hook commands; failures fail the command with a rerun hint |
|
|
174
|
+
| `repos.<name>.install_script` | `null` | Command run inside a worktree (or the main checkout via `wtx deps --install`) for dependency installs (`{wt}`, `{branch}`, `{main}` expanded); when unset, the detected package manager performs a real install |
|
|
162
175
|
| `repos.<name>.deps.manager` | `"auto"` | Force a manager: `npm` `bun` `pnpm` `yarn` `go` `python` `cargo` |
|
|
163
176
|
| `repos.<name>.deps.strategy` | `"auto"` | `auto` `link` `symlink` `install` `off` — see below |
|
|
164
|
-
| `repos.<name>.
|
|
165
|
-
| `repos.<name>.
|
|
177
|
+
| `repos.<name>.check_prs` | `true` | Set `false` to skip all PR lookups for this repo's branches (no `gh` calls) |
|
|
178
|
+
| `repos.<name>.forge_provider` | `"auto"` | `"auto"` enables GitHub only when the origin remote is github.com; `"github"` forces GitHub even for other hosts (GitHub Enterprise) |
|
|
179
|
+
| `repos.<name>.pr_lookup_repo` | `null` | `owner/repo` override for where PRs are looked up — use when origin points at a fork or mirror |
|
|
180
|
+
|
|
181
|
+
#### PR lookup keys explained
|
|
182
|
+
|
|
183
|
+
PR visibility (`wtx prs`, the TUI badges, ownership tags, `prune`) is read-only via the `gh` CLI. Three per-repo keys tune it:
|
|
184
|
+
|
|
185
|
+
- **`check_prs`** — master switch. `false` disables every `gh` query for this repo; everything else keeps working.
|
|
186
|
+
- **`forge_provider`** — which forge hosts the project. `"auto"` only activates GitHub when your origin remote is `github.com`; set `"github"` to force it for GitHub Enterprise or custom domains.
|
|
187
|
+
- **`pr_lookup_repo`** — where to look PRs up, as `owner/repo`. Normally derived from origin; override when origin points at your fork but PRs live in the upstream repo.
|
|
188
|
+
|
|
189
|
+
Legacy configs using `pr`, `forge`, and `pr_repo` keep working — they are migrated automatically on load and rewritten in place on the next config save.
|
|
166
190
|
|
|
167
191
|
### Template variables
|
|
168
192
|
|
|
@@ -194,6 +218,8 @@ Hooks also receive `WTX_PORT` as an environment variable, as does `wtx exec`. Po
|
|
|
194
218
|
| `install` | Always a real install in the worktree |
|
|
195
219
|
| `off` | Leave dependencies alone |
|
|
196
220
|
|
|
221
|
+
Per-repo `install_script` overrides the install command entirely — useful for non-standard setups (`pnpm install --frozen-lockfile`, bootstrap scripts, codegen steps). It runs inside the worktree (or the main checkout when installing via `wtx deps --install` with no branch) with the same `{wt}` / `{branch}` / `{main}` template expansion as hooks.
|
|
222
|
+
|
|
197
223
|
### Safe linking (the `auto` default)
|
|
198
224
|
|
|
199
225
|
When manifests match main, wtx creates a **real** `node_modules` directory in the worktree containing per-package symlinks into main's tree (scoped packages traversed, `.bin` linked). Package-manager operations inside the worktree replace links, never main's files — an `npm install` in one branch cannot damage another checkout. If replacing an existing directory fails mid-way, the original is restored rather than left missing.
|
|
@@ -259,7 +285,24 @@ wtx pull https://github.com/OGPoyraz/wtx/pull/11 # PR → worktree in one comm
|
|
|
259
285
|
wtx prune # remove worktrees whose PR merged
|
|
260
286
|
```
|
|
261
287
|
|
|
262
|
-
Lookups degrade gracefully: if `gh` is missing or unauthenticated you get a warning and everything else keeps working. Fork workflows are covered by `
|
|
288
|
+
Lookups degrade gracefully: if `gh` is missing or unauthenticated you get a warning and everything else keeps working. Fork workflows are covered by `check_prs` / `forge_provider` / `pr_lookup_repo`.
|
|
289
|
+
|
|
290
|
+
### Stacked branches
|
|
291
|
+
|
|
292
|
+
Worktrees remain sibling directories on disk, while their branches can form a dependency stack:
|
|
293
|
+
|
|
294
|
+
```bash
|
|
295
|
+
wtx create feat/api
|
|
296
|
+
wtx create feat/ui --base feat/api
|
|
297
|
+
|
|
298
|
+
# Open the PRs with these bases:
|
|
299
|
+
# feat/api -> main
|
|
300
|
+
# feat/ui -> feat/api
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
`--base` accepts a normal Git ref and uses committed history only; uncommitted files in the parent worktree are not copied. The default remains the configured main branch. `wtx stack feat/ui` shows the recorded local relationship, and `wtx rebase feat/ui` rebases onto the recorded parent instead of flattening the stack onto main. After the parent merges, retarget the child PR to main before rebasing it onto main.
|
|
304
|
+
|
|
305
|
+
Stack metadata is stored under the repository's common Git directory and is not committed to the project. If a parent branch moves, `wtx status <child>` and the terminal dashboard mark the base as moved. Removing a parent with recorded children is refused unless `--force` is supplied.
|
|
263
306
|
|
|
264
307
|
---
|
|
265
308
|
|
|
@@ -272,7 +315,10 @@ Lookups degrade gracefully: if `gh` is missing or unauthenticated you get a warn
|
|
|
272
315
|
| `/` | Fuzzy-filter entries by branch, repo, PR, owner |
|
|
273
316
|
| `Space` | Multi-select for batch operations |
|
|
274
317
|
| `R` / `D` / `s` | Batch rebase / remove / sync selection |
|
|
275
|
-
| `
|
|
318
|
+
| `p` | Pull latest changes for selected branch(es) |
|
|
319
|
+
| `i` | Install dependencies in selected worktree(s) |
|
|
320
|
+
| `n` | Create worktree — pick a dependency strategy (auto / install / symlink) |
|
|
321
|
+
| `m` | Rename worktree (branch + directory move) |
|
|
276
322
|
| `b` | Rebase selected |
|
|
277
323
|
| `a` | Spawn coding agent in selected worktree |
|
|
278
324
|
| `H` | Action history (recent actions across CLI and dashboard) |
|
|
@@ -280,7 +326,9 @@ Lookups degrade gracefully: if `gh` is missing or unauthenticated you get a warn
|
|
|
280
326
|
| `c` | Edit configuration |
|
|
281
327
|
| `?` / `q` | Help / quit |
|
|
282
328
|
|
|
283
|
-
Actions run in the background — navigation never locks. Progress shows inline: `fetching`
|
|
329
|
+
Actions run in the background — navigation never locks. Progress shows inline: `fetching`, `pulling`, `installing deps`, `renaming`, etc. next to the repo or branch being worked on, and a new worktree appears immediately as a `(creating)` row. Repositories render alphabetically and stay sorted across create/delete operations. While data loads, repos appear immediately with a `refreshing…` indicator. One operation runs per repo at a time; conflicting actions are rejected with a toast until it finishes. On failure a log modal opens with the captured output; press any key to dismiss. Destructive ones confirm first.
|
|
330
|
+
|
|
331
|
+
If a rebase hits conflicts, the worktree is restored: the in-progress rebase is aborted automatically, the branch stays on its pre-rebase commits, and a "Rebase failed — manual merge needed" log explains what happened.
|
|
284
332
|
|
|
285
333
|
---
|
|
286
334
|
|
package/completions/_wtx.zsh
CHANGED
|
@@ -59,14 +59,17 @@ _wtx() {
|
|
|
59
59
|
'remove[Remove worktrees]' \
|
|
60
60
|
'prune[Remove worktrees with merged PRs]' \
|
|
61
61
|
'open[Open worktree in IDE]' \
|
|
62
|
-
|
|
62
|
+
'rebase[Fetch and rebase onto recorded base]' \
|
|
63
63
|
'pull[Fetch a PR and create its worktree]' \
|
|
64
|
+
'pull-branch[Fast-forward pull a worktree branch]' \
|
|
65
|
+
'rename[Rename branch and move worktree directory]' \
|
|
64
66
|
'fetch[Fetch origin main]' \
|
|
65
67
|
'sync[Re-copy sync files and run post_sync]' \
|
|
66
68
|
'deps[Manage node_modules strategy]' \
|
|
67
69
|
'ls[List worktrees with status]' \
|
|
68
70
|
'cd[Change directory to worktree]' \
|
|
69
|
-
|
|
71
|
+
'status[Show worktree status]' \
|
|
72
|
+
'stack[Show recorded branch stack]' \
|
|
70
73
|
'prs[Show pull request status across worktrees]' \
|
|
71
74
|
'init[Output shell integration code]' \
|
|
72
75
|
'skill[Manage AI agent skills]' \
|
|
@@ -125,6 +128,7 @@ _wtx() {
|
|
|
125
128
|
_arguments \
|
|
126
129
|
':branch:_wtx_branches' \
|
|
127
130
|
'--repo[Target specific repo(s)]:repo:_wtx_repos' \
|
|
131
|
+
'--onto[Override recorded base]:ref:' \
|
|
128
132
|
{-q,--quiet}'[Suppress output]' \
|
|
129
133
|
'--verbose[Show git commands]' \
|
|
130
134
|
'--dry-run[Show what would happen]'
|
|
@@ -137,6 +141,23 @@ _wtx() {
|
|
|
137
141
|
'--verbose[Show git commands]' \
|
|
138
142
|
'--dry-run[Show what would happen]'
|
|
139
143
|
;;
|
|
144
|
+
pull-branch)
|
|
145
|
+
_arguments \
|
|
146
|
+
'::branch:_wtx_branches' \
|
|
147
|
+
{-r,--repo}'[Target specific repo(s)]:repo:_wtx_repos' \
|
|
148
|
+
{-q,--quiet}'[Suppress output]' \
|
|
149
|
+
'--verbose[Show git commands]' \
|
|
150
|
+
'--dry-run[Show what would happen]'
|
|
151
|
+
;;
|
|
152
|
+
rename)
|
|
153
|
+
_arguments \
|
|
154
|
+
':old-branch:_wtx_branches' \
|
|
155
|
+
':new-branch:' \
|
|
156
|
+
{-r,--repo}'[Target specific repo(s)]:repo:_wtx_repos' \
|
|
157
|
+
{-q,--quiet}'[Suppress output]' \
|
|
158
|
+
'--verbose[Show git commands]' \
|
|
159
|
+
'--dry-run[Show what would happen]'
|
|
160
|
+
;;
|
|
140
161
|
fetch)
|
|
141
162
|
_arguments \
|
|
142
163
|
'--repo[Target specific repo(s)]:repo:_wtx_repos' \
|
|
@@ -178,6 +199,16 @@ _wtx() {
|
|
|
178
199
|
':branch:_wtx_branches'
|
|
179
200
|
;;
|
|
180
201
|
status)
|
|
202
|
+
_arguments \
|
|
203
|
+
':branch:_wtx_branches' \
|
|
204
|
+
{-r,--repo}'[Target specific repo(s)]:repo:_wtx_repos' \
|
|
205
|
+
'--base[Override recorded base]:ref:' \
|
|
206
|
+
'--json[Output machine-readable JSON]' \
|
|
207
|
+
{-q,--quiet}'[Suppress output]' \
|
|
208
|
+
'--verbose[Show git commands]' \
|
|
209
|
+
'--dry-run[Show what would happen]'
|
|
210
|
+
;;
|
|
211
|
+
stack)
|
|
181
212
|
_arguments \
|
|
182
213
|
':branch:_wtx_branches' \
|
|
183
214
|
{-r,--repo}'[Target specific repo(s)]:repo:_wtx_repos' \
|
package/completions/wtx.bash
CHANGED
|
@@ -43,7 +43,7 @@ _wtx_completions() {
|
|
|
43
43
|
cword=$COMP_CWORD
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
local subcommands="config create remove prune open rebase fetch sync deps ls cd status prs pull init skill terminal mcp exec"
|
|
46
|
+
local subcommands="config create remove prune open rebase fetch sync deps ls cd status prs pull pull-branch init skill terminal mcp exec rename stack"
|
|
47
47
|
local config_subcommands="init show set add-repo remove-repo"
|
|
48
48
|
local skill_subcommands="show path list"
|
|
49
49
|
local skill_names="opencode cursor claude"
|
|
@@ -80,7 +80,7 @@ _wtx_completions() {
|
|
|
80
80
|
return 0
|
|
81
81
|
fi
|
|
82
82
|
|
|
83
|
-
if [ "$prev" = "--base" ]; then
|
|
83
|
+
if [ "$prev" = "--base" ] || [ "$prev" = "--onto" ]; then
|
|
84
84
|
COMPREPLY=($(compgen -W "main master develop dev" -- "$cur"))
|
|
85
85
|
return 0
|
|
86
86
|
fi
|
|
@@ -88,17 +88,19 @@ _wtx_completions() {
|
|
|
88
88
|
if [[ "$cur" == -* ]]; then
|
|
89
89
|
local flags=""
|
|
90
90
|
case "$subcommand" in
|
|
91
|
-
create) flags="-r --repo --base --open --ide --track --agent --prompt -q --quiet --verbose --dry-run --help" ;;
|
|
91
|
+
create) flags="-r --repo --base --open --ide --track --agent --prompt --deps -q --quiet --verbose --dry-run --help" ;;
|
|
92
92
|
remove) flags="-f --force -y --yes -r --repo -q --quiet --verbose --dry-run --help" ;;
|
|
93
93
|
prune) flags="-f --force -y --yes -r --repo -q --quiet --verbose --dry-run --help" ;;
|
|
94
94
|
open) flags="-r --repo --ide -q --quiet --verbose --dry-run --help" ;;
|
|
95
|
-
rebase) flags="--repo -q --quiet --verbose --dry-run --help" ;;
|
|
95
|
+
rebase) flags="--repo --onto -q --quiet --verbose --dry-run --help" ;;
|
|
96
|
+
rename) flags="-r --repo -q --quiet --verbose --dry-run --help" ;;
|
|
96
97
|
fetch) flags="--repo -q --quiet --verbose --dry-run --help" ;;
|
|
97
98
|
sync) flags="--repo -q --quiet --verbose --dry-run --help" ;;
|
|
98
99
|
deps) flags="-r --repo --install --symlink --json -q --quiet --verbose --dry-run --help" ;;
|
|
99
100
|
pull) flags="-r --repo -q --quiet --verbose --dry-run --help" ;;
|
|
100
101
|
ls) flags="-r --repo --pr --json -q --quiet --verbose --dry-run --help" ;;
|
|
101
|
-
status) flags="-r --repo --json -q --quiet --verbose --dry-run --help" ;;
|
|
102
|
+
status) flags="-r --repo --base --json -q --quiet --verbose --dry-run --help" ;;
|
|
103
|
+
stack) flags="-r --repo --json -q --quiet --verbose --dry-run --help" ;;
|
|
102
104
|
prs) flags="-r --repo --json --all -q --quiet --verbose --dry-run --help" ;;
|
|
103
105
|
config)
|
|
104
106
|
case "$subsubcommand" in
|
|
@@ -152,7 +154,7 @@ _wtx_completions() {
|
|
|
152
154
|
cd)
|
|
153
155
|
[ "$prev" = "cd" ] && COMPREPLY=($(compgen -W "$(_wtx_get_repos)" -- "$cur")) && return 0
|
|
154
156
|
;;
|
|
155
|
-
rebase|open|status|remove|sync|deps)
|
|
157
|
+
rebase|open|status|remove|sync|deps|rename|stack)
|
|
156
158
|
[ "$prev" = "$subcommand" ] && COMPREPLY=($(compgen -W "$(_wtx_get_branches)" -- "$cur")) && return 0
|
|
157
159
|
;;
|
|
158
160
|
esac
|
package/completions/wtx.fish
CHANGED
|
@@ -41,7 +41,7 @@ complete -c wtx -l dry-run -d "Show what would happen"
|
|
|
41
41
|
complete -c wtx -s h -l help -d "Display help for command"
|
|
42
42
|
|
|
43
43
|
# Subcommands
|
|
44
|
-
set -l commands config create remove prune open rebase fetch sync deps ls cd status prs pull init skill terminal mcp exec
|
|
44
|
+
set -l commands config create remove prune open rebase fetch sync deps ls cd status prs pull pull-branch init skill terminal mcp exec rename stack
|
|
45
45
|
|
|
46
46
|
# Setup completions for commands
|
|
47
47
|
complete -c wtx -n "not __fish_seen_subcommand_from $commands" -a "config" -d "Manage configuration"
|
|
@@ -49,14 +49,17 @@ complete -c wtx -n "not __fish_seen_subcommand_from $commands" -a "create" -d "C
|
|
|
49
49
|
complete -c wtx -n "not __fish_seen_subcommand_from $commands" -a "remove" -d "Remove worktrees"
|
|
50
50
|
complete -c wtx -n "not __fish_seen_subcommand_from $commands" -a "prune" -d "Remove worktrees with merged PRs"
|
|
51
51
|
complete -c wtx -n "not __fish_seen_subcommand_from $commands" -a "open" -d "Open worktree in IDE"
|
|
52
|
-
complete -c wtx -n "not __fish_seen_subcommand_from $commands" -a "rebase" -d "Fetch and rebase
|
|
52
|
+
complete -c wtx -n "not __fish_seen_subcommand_from $commands" -a "rebase" -d "Fetch and rebase onto recorded base"
|
|
53
53
|
complete -c wtx -n "not __fish_seen_subcommand_from $commands" -a "pull" -d "Fetch a PR and create its worktree"
|
|
54
|
+
complete -c wtx -n "not __fish_seen_subcommand_from $commands" -a "pull-branch" -d "Fast-forward pull a worktree branch"
|
|
55
|
+
complete -c wtx -n "not __fish_seen_subcommand_from $commands" -a "rename" -d "Rename branch and move worktree directory"
|
|
54
56
|
complete -c wtx -n "not __fish_seen_subcommand_from $commands" -a "fetch" -d "Fetch origin main"
|
|
55
57
|
complete -c wtx -n "not __fish_seen_subcommand_from $commands" -a "sync" -d "Re-copy sync files and run post_sync"
|
|
56
58
|
complete -c wtx -n "not __fish_seen_subcommand_from $commands" -a "deps" -d "Manage node_modules strategy"
|
|
57
59
|
complete -c wtx -n "not __fish_seen_subcommand_from $commands" -a "ls" -d "List worktrees with status"
|
|
58
60
|
complete -c wtx -n "not __fish_seen_subcommand_from $commands" -a "cd" -d "Change directory to worktree"
|
|
59
61
|
complete -c wtx -n "not __fish_seen_subcommand_from $commands" -a "status" -d "Show worktree status"
|
|
62
|
+
complete -c wtx -n "not __fish_seen_subcommand_from $commands" -a "stack" -d "Show recorded branch stack"
|
|
60
63
|
complete -c wtx -n "not __fish_seen_subcommand_from $commands" -a "prs" -d "Show pull request status across worktrees"
|
|
61
64
|
complete -c wtx -n "not __fish_seen_subcommand_from $commands" -a "init" -d "Output shell integration code"
|
|
62
65
|
complete -c wtx -n "not __fish_seen_subcommand_from $commands" -a "skill" -d "Manage AI agent skills"
|
|
@@ -65,14 +68,15 @@ complete -c wtx -n "not __fish_seen_subcommand_from $commands" -a "mcp" -d "Run
|
|
|
65
68
|
complete -c wtx -n "not __fish_seen_subcommand_from $commands" -a "exec" -d "Execute commands across worktrees"
|
|
66
69
|
|
|
67
70
|
# Dynamically complete branch arguments
|
|
68
|
-
complete -c wtx -n "__fish_seen_subcommand_from create open rebase sync deps status remove" -a "(_wtx_get_branches)"
|
|
71
|
+
complete -c wtx -n "__fish_seen_subcommand_from create open rebase sync deps status remove rename pull-branch stack" -a "(_wtx_get_branches)"
|
|
69
72
|
|
|
70
73
|
# Flags
|
|
71
|
-
complete -c wtx -n "__fish_seen_subcommand_from create remove prune open rebase fetch sync deps ls status prs pull" -s r -l repo -xa "(_wtx_get_repos)" -d "Target specific repo(s)"
|
|
74
|
+
complete -c wtx -n "__fish_seen_subcommand_from create remove prune open rebase fetch sync deps ls status stack prs pull pull-branch rename" -s r -l repo -xa "(_wtx_get_repos)" -d "Target specific repo(s)"
|
|
72
75
|
|
|
73
76
|
# create flags
|
|
74
77
|
complete -c wtx -n "__fish_seen_subcommand_from create" -l base -xa "main master develop dev" -d "Base ref"
|
|
75
78
|
complete -c wtx -n "__fish_seen_subcommand_from create" -s o -l open -d "Open worktree in IDE after creation"
|
|
79
|
+
complete -c wtx -n "__fish_seen_subcommand_from create" -l deps -xa "auto link symlink install off" -d "Dependency strategy"
|
|
76
80
|
complete -c wtx -n "__fish_seen_subcommand_from create open" -l ide -xa "cursor code vscode code-insiders vscodium idea webstorm zed vim nvim emacs" -d "IDE to open with"
|
|
77
81
|
complete -c wtx -n "__fish_seen_subcommand_from create" -l track -d "Track remote branch even if it belongs to someone else"
|
|
78
82
|
complete -c wtx -n "__fish_seen_subcommand_from create" -l agent -d "AI agent to delegate work to"
|
|
@@ -87,7 +91,7 @@ complete -c wtx -n "__fish_seen_subcommand_from deps" -l install -d "Switch to i
|
|
|
87
91
|
complete -c wtx -n "__fish_seen_subcommand_from deps" -l symlink -d "Switch to symlinked node_modules"
|
|
88
92
|
|
|
89
93
|
# json flag
|
|
90
|
-
complete -c wtx -n "__fish_seen_subcommand_from ls status prs deps" -l json -d "Output machine-readable JSON"
|
|
94
|
+
complete -c wtx -n "__fish_seen_subcommand_from ls status stack prs deps" -l json -d "Output machine-readable JSON"
|
|
91
95
|
|
|
92
96
|
# ls flags
|
|
93
97
|
complete -c wtx -n "__fish_seen_subcommand_from ls" -l pr -d "Include pull request status column"
|
|
@@ -95,6 +99,10 @@ complete -c wtx -n "__fish_seen_subcommand_from ls" -l pr -d "Include pull reque
|
|
|
95
99
|
# prs flags
|
|
96
100
|
complete -c wtx -n "__fish_seen_subcommand_from prs" -l all -d "Include drafts and closed/merged PRs"
|
|
97
101
|
|
|
102
|
+
# stack-aware flags
|
|
103
|
+
complete -c wtx -n "__fish_seen_subcommand_from rebase" -l onto -xa "main master develop dev" -d "Override recorded base"
|
|
104
|
+
complete -c wtx -n "__fish_seen_subcommand_from status" -l base -xa "main master develop dev" -d "Override recorded base"
|
|
105
|
+
|
|
98
106
|
# config subcommands
|
|
99
107
|
set -l config_commands init show set add-repo remove-repo
|
|
100
108
|
complete -c wtx -n "__fish_seen_subcommand_from config; and not __fish_seen_subcommand_from $config_commands" -a "init" -d "Initialize configuration"
|