From a31844e2944721bc4cf279396931e60b7ef2f784 Mon Sep 17 00:00:00 2001 From: Mark Trickey Date: Thu, 16 Apr 2026 02:09:18 +0000 Subject: [PATCH] Add bootstrap.sh Initial commit --- bootstrap.sh | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 bootstrap.sh diff --git a/bootstrap.sh b/bootstrap.sh new file mode 100644 index 0000000..587ef70 --- /dev/null +++ b/bootstrap.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +# Usage: ./bootstrap.sh [claude|opencode|codex|aider] [-f] +# Fetches bootstrap files from: https://trickey.us + +TOOL=$1 +FORCE=$2 +BASE_URL="https://trickey.us/raw/branch/main" +FILES=("CLAUDE.md" "AGENT.md" "CONVENTIONS.md") + +if [[ -z "$TOOL" ]]; then + echo "Usage: $0 [claude|opencode|codex|aider] [-f]" + exit 1 +fi + +case $TOOL in + claude|opencode|codex|aider) + echo "🚀 Bootstrapping $TOOL project using git.trickey.us..." + + for FILE in "${FILES[@]}"; do + # Safety check: skip if exists unless -f is used + if [[ -f "$FILE" && "$FORCE" != "-f" ]]; then + echo "⏭️ Skipping $FILE (already exists). Use -f to overwrite." + continue + fi + + # Fetch from the flat structure at the root of /AI/skills + curl -fsSL "$BASE_URL/$FILE" -o "$FILE" \ + && echo "✅ $([[ "$FORCE" == "-f" ]] && echo "Overwrote" || echo "Fetched") $FILE" \ + || echo "⚠️ Skipping $FILE (not found at source)" + done + + echo "✨ Done! Files are ready in $(pwd)" + ;; + *) + echo "❌ Error: Unsupported tool '$TOOL'" + exit 1 + ;; +esac