Skip to content

docs(readme): document missing commands and features#22

Merged
epodivilov merged 2 commits into
mainfrom
docs/readme-missing-commands
Jun 20, 2026
Merged

docs(readme): document missing commands and features#22
epodivilov merged 2 commits into
mainfrom
docs/readme-missing-commands

Conversation

@epodivilov

Copy link
Copy Markdown
Owner

Summary

Documents several existing but undocumented surfaces in the README:

  • wt self-update — new section covering in-place binary replacement, supported platforms (Linux/macOS x64/arm64), and Windows fallback to the PowerShell installer.
  • wt list --json — JSON output shape (branch, path, isMain, isCurrent, drifted) with an example.
  • wt list drift badge — explains when dir≠branch appears (worktree directory name doesn't match its branch, e.g. after a rename).
  • wt update --cleanup — added to the flags table and documented as a one-shot fetch + rebase + drop-gone-branches command; also clarifies behavior under --non-interactive.
  • post-sync hook — added to the configuration Options table; existing Hook Environment Variables section already covers the variables it receives (all hooks get WORKTREE_PATH/WORKTREE_BRANCH/REPO_ROOT; post-sync does not get BASE_BRANCH, which matches run-hooks.ts).

Why

These features ship today but were invisible in the README, making them hard to discover. No code changes.

Closes Vikunja #41 (id 213)

Test plan

  • pnpm lint passes
  • pnpm format passes (no changes)
  • README renders correctly on GitHub

Add documentation for several existing but undocumented surfaces:
- wt self-update: in-place binary update with supported platforms
- wt list --json: JSON output shape for scripting and AI agents
- wt list drift badge: explain "dir≠branch" indicator
- wt update --cleanup: combined fetch + rebase + drop gone branches
- post-sync hook: ran after wt sync applies config changes

Closes Vikunja #41 (id 213)
- Drift badge: drop the inaccurate "lives under rootDir" clause —
  isDrifted() fires for any worktree whose path != <rootDir>/<branch>,
  including worktrees placed outside rootDir.
- wt update --cleanup example: clarify that only merged stale branches
  are dropped — unmerged ones are kept and require `wt cleanup --force`.
@epodivilov epodivilov merged commit 0f9eaa4 into main Jun 20, 2026
1 check passed
@epodivilov epodivilov deleted the docs/readme-missing-commands branch June 20, 2026 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant