#!/bin/bash # ============================================================= # Sync global AI context to Claude Code and Roo Code # # Source of truth: global-claude-md/CLAUDE.md # # This script: # 1. Copies to ~/.claude/CLAUDE.md (Claude Code CLI reads this) # 2. Prints content for manual paste into Roo Code Custom Instructions # ============================================================= set -e SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" SOURCE="$SCRIPT_DIR/global-claude-md/CLAUDE.md" if [ ! -f "$SOURCE" ]; then echo "[!] Source file not found: $SOURCE" exit 1 fi # --- Claude Code CLI --- CLAUDE_DIR="$HOME/.claude" CLAUDE_TARGET="$CLAUDE_DIR/CLAUDE.md" mkdir -p "$CLAUDE_DIR" cp "$SOURCE" "$CLAUDE_TARGET" echo "[✓] Claude Code: copied to $CLAUDE_TARGET" # --- Roo Code (VS Code) --- echo "" echo "============================================" echo " Roo Code: Manual Step Required" echo "============================================" echo "" echo "Copy the text between the lines below, then paste it into:" echo " Roo Code sidebar → Settings (gear icon) → Custom Instructions" echo "" echo "────────────────────────────────────────────" cat "$SOURCE" echo "────────────────────────────────────────────" echo "" echo "Done. Both tools are now in sync."