peppa/packages/cli/bin/git-credential-peppa
Асель e1384a4c6f Push Peppa to Gitea; shared RULES.md loaded live into every session
- peppa-bot account: repos peppa-bot/peppa and peppa-bot/template
- git-credential-peppa: per-repo credential helper with the bot token
- template split: RULES.md (shared, stays in Gitea) + AGENTS.md (project)
- runner fetches RULES.md from Gitea on each launch (cached fallback) and
  passes it via --append-system-prompt-file; MCP get_rules for manual runs
- bootstrap-project.sh clones the template from Gitea

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 19:50:45 +05:00

12 lines
574 B
Bash
Executable File

#!/usr/bin/env bash
# Git credential helper: answers for the Peppa Gitea host with peppa-bot's token.
# Enabled per repo (never globally): git config credential.helper peppa
PEPPA_ROOT="$(cd "$(dirname "$(readlink -f "$0")")/../../.." && pwd)"
[ "$1" = "get" ] || exit 0
[ -f "$PEPPA_ROOT/.env" ] && set -a && . "$PEPPA_ROOT/.env" && set +a
want="${GITEA_URL#*://}"; host=""
while IFS='=' read -r k v; do [ -z "$k" ] && break; [ "$k" = host ] && host="$v"; done
[ "$host" = "$want" ] && [ -n "$GITEA_TOKEN" ] || exit 0
echo "username=peppa-bot"
echo "password=$GITEA_TOKEN"