You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: re-record GIFs with vhs, add shell integration to demo
- Switch from shellwright to vhs for GIF recording (proper timing)
- Add vhs tape files for all 5 demos (quickstart, create, hooks, multi-repo, info)
- Enable shell integration in Docker image so prompt updates after wt co
- Clean up README: remove duplications, better structure
Most commands support machine-readable JSON output:
200
-
201
-
```bash
202
-
wt --format json version
203
-
wt --format json info
204
-
wt --format json config show
205
-
wt --format json list
206
-
wt --format json examples
207
-
wt --format json # root help in JSON envelope
208
-
```
209
-
210
-
Important behavior for shell integration:
211
-
212
-
- In `text` mode (default), shell integration may auto-navigate to the target worktree.
213
-
- In `json` mode, output is kept machine-readable and shell integration does **not** auto-navigate.
214
-
215
-
For commands that normally prompt interactively (`wt co`, `wt rm`, `wt pr`, `wt mr`), pass explicit arguments when using `--format json`.
216
-
217
188
### Interactive Selection
218
189
219
190
When you run `wt co`, `wt rm`, `wt pr`, or `wt mr` without arguments, you'll get an interactive selection menu:
220
191
221
192
```bash
222
-
# Interactive branch checkout
223
193
$ wt co
224
194
Use the arrow keys to navigate: ↓ ↑ → ←
225
195
? Select branch to checkout:
226
196
▸ feature/add-auth
227
197
feature/update-docs
228
198
bugfix/login-issue
229
199
main
230
-
231
-
# Interactive worktree removal
232
-
$ wt rm
233
-
Use the arrow keys to navigate: ↓ ↑ → ←
234
-
? Select worktree to remove:
235
-
▸ feature/add-auth
236
-
feature/update-docs
237
-
bugfix/login-issue
238
-
239
-
# Interactive PR checkout — resolves to the PR's branch name (requires gh CLI)
240
-
$ wt pr
241
-
Use the arrow keys to navigate: ↓ ↑ → ←
242
-
? Select Pull Request:
243
-
▸ #123: Add authentication feature
244
-
#124: Update documentation
245
-
#125: Fix login bug
246
-
# e.g. selecting #123 creates worktree at ~/dev/worktrees/<repo>/feat/add-auth
247
-
248
-
# Interactive MR checkout — resolves to the MR's branch name (requires glab CLI)
249
-
$ wt mr
250
-
Use the arrow keys to navigate: ↓ ↑ → ←
251
-
? Select Merge Request:
252
-
▸ !456: Add authentication feature
253
-
!457: Update documentation
254
-
!458: Fix login bug
255
-
# e.g. selecting !456 creates worktree at ~/dev/worktrees/<repo>/feat/add-auth
256
200
```
257
201
258
-
### Examples
259
-
260
-
```bash
261
-
# Create a new feature branch from main
262
-
wt create add-auth-feature
263
-
264
-
# Checkout an existing branch
265
-
wt checkout bugfix-login
266
-
267
-
# Work on a GitHub PR (checks out the PR's branch, e.g. feat/add-auth)
268
-
wt pr 456
269
-
270
-
# Work on a GitLab MR (checks out the MR's branch, e.g. fix/api-cleanup)
271
-
wt mr 789
272
-
273
-
# List all your worktrees
274
-
wt list
275
-
276
-
# Remove a worktree when done
277
-
wt rm add-auth-feature
278
-
279
-
# Show full examples catalog (filter with rg/grep if needed)
280
-
wt examples
202
+
### JSON Output (`--format json`)
281
203
282
-
# Each example includes outcome + path illustration based on config pattern
283
-
# e.g. path example: $WORKTREE_ROOT/<repo>/<branch> -> (removed)
284
-
# and concrete text/json output samples where relevant
204
+
Most commands support machine-readable JSON output:
285
205
286
-
# JSON mode does not auto-navigate; use returned navigate_to
287
-
wt --format json create add-auth-feature
206
+
```bash
207
+
wt --format json version
208
+
wt --format json info
209
+
wt --format json config show
210
+
wt --format json list
211
+
wt --format json examples
288
212
```
289
213
214
+
In `json` mode, shell integration does **not** auto-navigate. For commands that normally prompt interactively, pass explicit arguments when using `--format json`.
215
+
290
216
## Configuration
291
217
292
218
### Configuration File
@@ -334,17 +260,10 @@ Configuration values are resolved in this order (highest priority first):
334
260
335
261
Run `wt config show` to see the effective value and source of each setting.
336
262
337
-
### Worktree Location
263
+
### Strategies & Patterns
338
264
339
265
By default, worktrees are created at `~/dev/worktrees/<repo>/{.branch}` using the `global` strategy.
340
266
341
-
Configure the location with environment variables or the config file:
0 commit comments