rd13_copilot_setup/scripts/copilot-bootstrap.fish
Conrad Schulz 9838c7a0b3 feat: initial copilot workspace setup
- User settings.json with 9 senior-dev behavior rules
- 9 prompt files: requirements, architecture, new-feature, code-review,
  debug, refactor, write-tests, done-check, docker
- git-templates for .github/ and .vscode/ auto-copy on git init
- deploy.sh (macOS/bash) and deploy.fish (Linux/fish) scripts
- copilot-bootstrap.fish for existing/cloned repos
2026-05-29 08:19:50 +00:00

49 lines
1.7 KiB
Fish
Executable file

#!/usr/bin/env fish
# copilot-bootstrap.fish
# Fügt Copilot-Grundkonfiguration zu einem bestehenden oder neu geklonten Repo hinzu.
#
# Usage:
# fish copilot-bootstrap.fish # aktuelles Verzeichnis
# fish copilot-bootstrap.fish /path/to/repo # anderes Verzeichnis
set TEMPLATE_DIR /home/rd13server/.git-templates
set TARGET (test (count $argv) -gt 0; and echo $argv[1]; or echo (pwd))
if not test -d "$TARGET/.git"
echo "Error: $TARGET is not a git repository"
exit 1
end
echo "Bootstrapping Copilot config in: $TARGET"
# .github/copilot-instructions.md
if not test -f "$TARGET/.github/copilot-instructions.md"
mkdir -p "$TARGET/.github"
cp "$TEMPLATE_DIR/.github/copilot-instructions.md" "$TARGET/.github/copilot-instructions.md"
echo " ✓ .github/copilot-instructions.md created (fill in TODO sections)"
else
echo " ─ .github/copilot-instructions.md already exists, skipping"
end
# .vscode/settings.json
if not test -f "$TARGET/.vscode/settings.json"
mkdir -p "$TARGET/.vscode"
cp "$TEMPLATE_DIR/.vscode/settings.json" "$TARGET/.vscode/settings.json"
echo " ✓ .vscode/settings.json created"
else
echo " ─ .vscode/settings.json already exists, skipping"
end
# .vscode/extensions.json
if not test -f "$TARGET/.vscode/extensions.json"
mkdir -p "$TARGET/.vscode"
cp "$TEMPLATE_DIR/.vscode/extensions.json" "$TARGET/.vscode/extensions.json"
echo " ✓ .vscode/extensions.json created"
else
echo " ─ .vscode/extensions.json already exists, skipping"
end
echo ""
echo "Done. Next steps:"
echo " 1. Fill in TODO sections in .github/copilot-instructions.md"
echo " 2. git add .github .vscode && git commit -m 'chore: add copilot workspace config'"