Skip to content

Instantly share code, notes, and snippets.

@EternallLight
Created February 20, 2026 15:35
Show Gist options
  • Select an option

  • Save EternallLight/f76505c21c4ba5de44a7197382b93851 to your computer and use it in GitHub Desktop.

Select an option

Save EternallLight/f76505c21c4ba5de44a7197382b93851 to your computer and use it in GitHub Desktop.
Toggl Focus — Full Designer Bootstrap
#!/bin/bash
# Toggl Focus — Full Designer Bootstrap
#
# Runs both setup scripts in order:
# 1. Dev environment (Homebrew, Node, repos, etc.)
# 2. Claude Code MCPs (Flow DS, plugins, skills)
#
# Host as a PUBLIC Gist, then share one command with designers:
# /bin/bash -c "$(curl -fsSL https://gist.githubusercontent.com/YOUR_USER/GIST_ID/raw/bootstrap.sh)"
#
# Or with token pre-set:
# GITHUB_TOKEN=ghp_xxx /bin/bash -c "$(curl -fsSL https://gist.githubusercontent.com/...)"
set -e
echo ""
echo "╔══════════════════════════════════════════════════════════╗"
echo "║ 🚀 Toggl Focus — Full Designer Setup ║"
echo "╚══════════════════════════════════════════════════════════╝"
echo ""
echo "This will set up everything you need:"
echo " 1. Dev environment (Homebrew, Node, repos)"
echo " 2. Claude Code (MCPs, plugins, skills)"
echo ""
# Configuration
REPO_ORG="toggl"
REPO_NAME="claude-plugins"
BRANCH="main"
BASE_URL="https://raw.githubusercontent.com/${REPO_ORG}/${REPO_NAME}/${BRANCH}"
SCRIPTS=(
"setup/design/dev-environment/setup.sh|Dev Environment"
"setup/design/claude-code/setup-claude-mcps.sh|Claude Code MCPs"
)
# --- GitHub token ---
if [ -z "$GITHUB_TOKEN" ]; then
echo "This repository is private. You need a GitHub token to continue."
echo ""
echo "To get a token:"
echo " 1. Go to: https://github.com/settings/tokens/new"
echo " 2. Description: Toggl Focus Setup"
echo " 3. Check: repo (Full control of private repositories)"
echo " 4. Click 'Generate token'"
echo " 5. Copy the token (starts with ghp_)"
echo ""
if command -v open &>/dev/null; then
open "https://github.com/settings/tokens/new?description=Toggl%20Focus%20Setup&scopes=repo,read:packages" 2>/dev/null || true
fi
echo -n "Paste your GitHub token: "
read -s GITHUB_TOKEN
echo ""
if [ -z "$GITHUB_TOKEN" ]; then
echo "Error: No token provided. Cannot continue."
exit 1
fi
fi
export GITHUB_TOKEN
# --- Download and run each script ---
STEP=1
TOTAL=${#SCRIPTS[@]}
for entry in "${SCRIPTS[@]}"; do
SETUP_PATH="${entry%%|*}"
LABEL="${entry##*|}"
SETUP_URL="${BASE_URL}/${SETUP_PATH}"
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo " Step $STEP/$TOTAL: $LABEL"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
set +e
SETUP_SCRIPT=$(curl -fsSL -H "Authorization: token $GITHUB_TOKEN" "$SETUP_URL" 2>&1)
CURL_EXIT=$?
set -e
if [ $CURL_EXIT -ne 0 ] || [ -z "$SETUP_SCRIPT" ]; then
echo ""
echo "Error: Could not download $LABEL script."
echo "Please check:"
echo " - Your token has 'repo' scope"
echo " - You have access to the repository"
echo ""
echo "Response: $SETUP_SCRIPT"
exit 1
fi
/bin/bash -c "$SETUP_SCRIPT"
STEP=$((STEP + 1))
done
echo ""
echo "╔══════════════════════════════════════════════════════════╗"
echo "║ ✅ All done! Your machine is ready. ║"
echo "╚══════════════════════════════════════════════════════════╝"
echo ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment