Skip to content

feat(aliases): expose the Tailscale app's bundled CLI as tailscale - #356

Merged
evansenter merged 1 commit into
mainfrom
feat/tailscale-alias
Oct 22, 2026
Merged

evansenter merged 1 commit into
mainfrom
feat/tailscale-alias

Conversation

@evansenter

Copy link
Copy Markdown
Owner

The Mac App Store Tailscale ships its CLI inside the app bundle, so tailscale isn't on PATH. Alias it when no tailscale command 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 check passes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LBftoc1JCMLow9LDFZMADs

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LBftoc1JCMLow9LDFZMADs
Comment thread home/.aliases

# 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"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prompt: evansenter/dotfiles/.../claude-review.md

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

@evansenter
evansenter merged commit 7f943ef into main Oct 22, 2026
8 checks passed
@evansenter
evansenter deleted the feat/tailscale-alias branch October 22, 2026 22:58
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