#!/usr/bin/env bash # # setup.sh — Initialize a new iOS/macOS app repo with the workflow template files. # # Usage: # ~/Documents/FORGEJO/XCode-Claude-Workflow/setup.sh [app-name] # # Run this from inside your new (empty or freshly cloned) app repo directory. # It copies PROMPT.md and .gitignore, then makes an initial commit. set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" APP_NAME="${1:-$(basename "$PWD")}" # Verify we're in a git repo if ! git rev-parse --is-inside-work-tree &>/dev/null; then echo "Error: Not inside a git repository." echo "Create/clone your repo first, cd into it, then run this script." exit 1 fi # Copy template files echo "Setting up $APP_NAME..." cp "$SCRIPT_DIR/PROMPT.md" ./PROMPT.md echo " Copied PROMPT.md" cp "$SCRIPT_DIR/xcode.gitignore" ./.gitignore echo " Copied .gitignore" # Stage and commit git add PROMPT.md .gitignore git commit -m "chore: initialize $APP_NAME with XCode-Claude-Workflow template" echo "" echo "Done! Next steps:" echo " 1. Open Claude Code: claude" echo " 2. Start the workflow: @PROMPT.md execute this prompt"