Skip to content

feat(iterm2): auto-install it2 CLI via uv tool#48

Merged
akornmeier merged 10 commits into
mainfrom
feat/iterm2-it2-installer
Apr 27, 2026
Merged

feat(iterm2): auto-install it2 CLI via uv tool#48
akornmeier merged 10 commits into
mainfrom
feat/iterm2-it2-installer

Conversation

@akornmeier
Copy link
Copy Markdown
Owner

Summary

  • New iterm2/ topic installs and upgrades it2 (iTerm2's CLI) via uv tool automatically when iTerm2 is present at /Applications/iTerm.app
  • Sourced from bin/dot's cmd_install (DOT_MODE=install) and cmd_update (DOT_MODE=update) — first topic installer to run in update mode, establishing a $DOT_MODE convention reusable by the orphaned claude/install.sh later
  • UV_TOOLS=("it2") array makes adding more iTerm2-related uv tools a one-line change
  • Spec: docs/superpowers/specs/2026-04-27-iterm2-it2-installer-design.md
  • Plan: docs/superpowers/plans/2026-04-27-iterm2-it2-installer.md

Test plan

  • Run dot update end-to-end — verify the 🖥️ Setting up iTerm2 CLI tooling... block appears between brew cleanup and the final summary, with exit 0
  • Run dot update again — verify idempotent (same output, no errors)
  • Run it2 --version — confirms tool still works after upgrade pass
  • (Optional, destructive) Uninstall: uv tool uninstall it2, then dot install — verify reinstall path fires
  • Code-path inspection of guards: grep -A 3 "Guard" iterm2/install.sh — both iTerm2 and uv guards return 0 before reaching uv calls

🤖 Generated with Claude Code

akornmeier and others added 10 commits April 27, 2026 08:24
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>
@akornmeier akornmeier merged commit 4027355 into main Apr 27, 2026
2 checks passed
@akornmeier akornmeier deleted the feat/iterm2-it2-installer branch April 27, 2026 13:16
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