From 7c63684e5c26789d0b73284f4a3b4648de771fd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Tr=C3=B6ger?= Date: Sun, 19 Apr 2026 14:09:25 +0200 Subject: [PATCH] =?UTF-8?q?bootstrap:=20gh-Installation=20erg=C3=A4nzen,?= =?UTF-8?q?=20Fehlende-Tools-Policy=20in=20CLAUDE.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - bootstrap.sh: gh CLI automatisch installieren falls nicht vorhanden - dotfiles/CLAUDE.md: Policy für fehlende Tools dokumentiert (kein Workaround, User informieren + bootstrap.sh ergänzen) Co-Authored-By: Claude Sonnet 4.6 --- bootstrap.sh | 9 +++++++++ dotfiles/CLAUDE.md | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/bootstrap.sh b/bootstrap.sh index 08149ed..2a5bdfc 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -35,6 +35,15 @@ echo "✓ Hooks ausführbar" echo "" echo "=== Voraussetzungen prüfen ===" +# --- gh (GitHub CLI, wird auch für Gitea-PRs genutzt) --- +if command -v gh &>/dev/null; then + echo "✓ gh $(gh --version | head -1)" +else + echo " gh fehlt – installiere via apt..." + sudo apt-get install -y gh + echo "✓ gh installiert" +fi + # --- jq --- if command -v jq &>/dev/null; then echo "✓ jq $(jq --version)" diff --git a/dotfiles/CLAUDE.md b/dotfiles/CLAUDE.md index 08d02cd..9b1da29 100644 --- a/dotfiles/CLAUDE.md +++ b/dotfiles/CLAUDE.md @@ -39,6 +39,14 @@ PRs muessen jedes Akzeptanzkriterium einzeln als Checkbox auflisten und bestaeti Niemals direkt auf `main` committen. Alle Aenderungen ueber Feature-Branches und PRs. +## Fehlende Tools + +Wenn ein benötigtes CLI-Tool fehlt: **nicht** mit Workarounds (curl, rohe API-Calls) umgehen. Stattdessen: + +1. User informieren welches Tool fehlt und den Installations-Befehl nennen +2. User führt den Befehl in einer separaten Konsole aus (sudo funktioniert dort) +3. Tool danach in `bootstrap.sh` aufnehmen, damit es auf allen Maschinen automatisch installiert wird + ## Gitea-Integration Instanz: `https://gitea.troeger-net.org`. Bot-User `claude-code`, Token: `GITEA_TOKEN=$(secret-tool lookup user claude-code token gitea)`. Bot hat nur Collaborator-Rechte.