XCode-Claude-Workflow/setup.sh
idev2025 63377d3ddf feat: add setup.sh and xcode.gitignore for app repo initialization
setup.sh copies PROMPT.md and .gitignore into a new app repo with one command.
xcode.gitignore covers Xcode, SPM, CocoaPods, code signing, and secrets.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 22:05:18 -04:00

40 lines
1.1 KiB
Bash
Executable file

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