feat(iterm2): auto-install it2 CLI via uv tool#48
Merged
Conversation
Designs a topic installer at iterm2/install.sh that installs the it2 uv tool when iTerm2 is present and missing, and upgrades it on dot update. Introduces a DOT_MODE env signal so topic installers can branch on install-vs-update lifecycle. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Bite-sized TDD-adapted plan: 6 tasks covering iterm2/install.sh creation, bin/dot wiring (cmd_install + cmd_update), CLAUDE.md update, changeset, and end-to-end verification. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Adds iterm2/install.sh that installs the it2 CLI via uv tool when iTerm2 is present and missing, and upgrades it when DOT_MODE=update. Gated on iTerm2 presence and uv availability.
Sources the new iterm2/install.sh with DOT_MODE=install after the FNM block and before zsh installer, so iTerm2 cask (from Brewfile) is on disk before it2 is installed.
Self-heals it2 if missing during dot update, and upgrades it to the latest version. First topic installer sourced from cmd_update — establishes the DOT_MODE=update convention.
Side effect of running pnpm format during the changeset step. No content changes; whitespace and table alignment only. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The original `if uv tool ... | sed; then` pattern evaluated sed's exit
code, not uv's, so the failure-warning branches were dead code — a
network failure or bogus package name looked identical to success.
Switches to checking ${PIPESTATUS[0]} after the pipeline so uv's actual
exit code drives the branch. Output streaming is preserved.
Also corrects the CLAUDE.md description of the iTerm2-missing skip
behavior — it prints a skip notice rather than skipping silently.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
iterm2/topic installs and upgradesit2(iTerm2's CLI) viauv toolautomatically when iTerm2 is present at/Applications/iTerm.appbin/dot'scmd_install(DOT_MODE=install) andcmd_update(DOT_MODE=update) — first topic installer to run in update mode, establishing a$DOT_MODEconvention reusable by the orphanedclaude/install.shlaterUV_TOOLS=("it2")array makes adding more iTerm2-related uv tools a one-line changedocs/superpowers/specs/2026-04-27-iterm2-it2-installer-design.mddocs/superpowers/plans/2026-04-27-iterm2-it2-installer.mdTest plan
dot updateend-to-end — verify the🖥️ Setting up iTerm2 CLI tooling...block appears between brew cleanup and the final summary, with exit 0dot updateagain — verify idempotent (same output, no errors)it2 --version— confirms tool still works after upgrade passuv tool uninstall it2, thendot install— verify reinstall path firesgrep -A 3 "Guard" iterm2/install.sh— both iTerm2 and uv guards return 0 before reachinguvcalls🤖 Generated with Claude Code