Repository navigation
feat(aliases): expose the Tailscale app's bundled CLI as tailscale - #356
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LBftoc1JCMLow9LDFZMADs
|
|
||
| # The Mac App Store Tailscale ships its CLI inside the app bundle, not on PATH | ||
| if ! command -v tailscale &>/dev/null && [[ -x /Applications/Tailscale.app/Contents/MacOS/Tailscale ]]; then | ||
| alias tailscale="/Applications/Tailscale.app/Contents/MacOS/Tailscale" |
There was a problem hiding this comment.
[Suggestion] This alias only exists in interactive zsh, so scripts and non-interactive shells (zsh -c, Claude Code's Bash tool, hooks, cron) still won't find tailscale on a Mac App Store install. That's fine for the stated goal. If you later want it available everywhere, you could add a small wrapper in home/.bin/ (or a PATH entry in .exports) instead. Not needed for this PR.
There was a problem hiding this comment.
Code Review — Round 1
Summary
Adds a guarded tailscale alias that points at the Mac App Store app's bundled CLI. It's defined only when no tailscale is already on PATH and the bundle binary is executable. It matches the existing command -v guard pattern in .aliases (eza/bat), does nothing on Linux or on Macs with the standalone CLI, and doesn't interact with bootstrap's command -v tailscale install checks, because those run in non-interactive bash where aliases aren't loaded. Re-sourcing .zshrc is also fine: zsh's command -v sees the existing alias and skips redefining it.
Round count: the prescribed --paginate --slurp --jq command is rejected by this gh version, which doesn't allow --slurp together with --jq. Running --paginate --jq without --slurp returned a single page with 0 prior automated reviews, so this is round 1.
Verdict
APPROVE - No blocking findings. One non-blocking suggestion inline.
Automated review by Claude Code
The Mac App Store Tailscale ships its CLI inside the app bundle, so
tailscaleisn't on PATH. Alias it when notailscalecommand exists and the bundle binary does — a no-op on Linux and on Macs with the standalone CLI.Verified:
zsh -ic 'tailscale version'→ 1.104.1;make checkpasses.🤖 Generated with Claude Code
https://claude.ai/code/session_01LBftoc1JCMLow9LDFZMADs