Skip to content

Instantly share code, notes, and snippets.

@nottmey
Last active February 21, 2026 13:39
Show Gist options
  • Select an option

  • Save nottmey/baa3c06edd0d4f389f72920ce6244348 to your computer and use it in GitHub Desktop.

Select an option

Save nottmey/baa3c06edd0d4f389f72920ce6244348 to your computer and use it in GitHub Desktop.
Cursor Skills Sync — one-time bootstrap for App Platform team
#!/bin/bash
# ──────────────────────────────────────────────────────────────
# Cursor Skills Sync — Bootstrap
# ──────────────────────────────────────────────────────────────
# This script is published as a PUBLIC GitHub Gist so that team
# members can run it via a single curl command, even though the
# main repo is private.
#
# What it does:
# 1. Installs Homebrew, git, and the GitHub CLI (if missing)
# 2. Authenticates with GitHub (opens a browser)
# 3. Fetches and runs .setup/setup.sh from the private repo
#
# The full setup.sh handles cloning, launchd agent install, etc.
#
# Gist URL: https://gist.github.com/nottmey/baa3c06edd0d4f389f72920ce6244348
# To update the gist after editing this file:
# gh gist edit baa3c06edd0d4f389f72920ce6244348 -f .setup/bootstrap.sh
# ──────────────────────────────────────────────────────────────
set -euo pipefail
if [ "$(uname)" != "Darwin" ]; then
echo "This script only supports macOS. Exiting."
exit 1
fi
REPO="1K5-TECH/app-platform-cursor-config"
ok() { echo " ✓ $*"; }
skip() { echo " – $* (already done)"; }
step() { echo ""; echo "▸ $*"; }
echo ""
echo "═══════════════════════════════════════════"
echo " Cursor Skills Sync — Bootstrap"
echo "═══════════════════════════════════════════"
# ── Homebrew ──────────────────────────────────
step "Checking Homebrew"
if command -v brew &>/dev/null; then
skip "Homebrew installed"
else
echo " Installing Homebrew (you may be asked for your Mac login password)..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
if [ -f /opt/homebrew/bin/brew ]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
elif [ -f /usr/local/bin/brew ]; then
eval "$(/usr/local/bin/brew shellenv)"
fi
ok "Homebrew installed"
fi
# ── git ───────────────────────────────────────
step "Checking git"
if brew list git &>/dev/null; then
skip "git installed via Homebrew"
else
echo " Installing git..."
brew install git
ok "git installed"
fi
# ── gh CLI ────────────────────────────────────
step "Checking GitHub CLI"
if brew list gh &>/dev/null; then
skip "gh installed via Homebrew"
else
echo " Installing GitHub CLI..."
brew install gh
ok "gh installed"
fi
if gh auth status &>/dev/null; then
skip "gh already authenticated"
else
echo " Authenticating with GitHub (a browser window will open)..."
gh auth login --web --git-protocol https
ok "gh authenticated"
fi
# ── Fetch and run setup.sh from the private repo ──
step "Running setup"
bash <(gh api "repos/${REPO}/contents/.setup/setup.sh" -q '.content' | base64 -d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment