Gitea MCP server expects: - GITEA_API_URL (not GITEA_URL) - must include /api/v1 - GITEA_API_TOKEN (not GITEA_TOKEN) NetBox MCP server expects: - NETBOX_API_URL (not NETBOX_URL) - must include /api - NETBOX_API_TOKEN (not NETBOX_TOKEN) Changes: - Update all setup commands to use correct variable names - Update docs/CONFIGURATION.md with correct variables and URL format - Update scripts/setup.sh templates - Update CLAUDE.md hybrid configuration reference - Remove GITEA_ORG from system-level config (it's project-level) - Fix API URL paths in curl commands (remove redundant /api/v1) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3.8 KiB
3.8 KiB
description
| description |
|---|
| Quick project setup - configures only project-level settings for PR review |
Project Initialization (PR Review)
Fast setup for a new project when system-level configuration is already complete.
Use this when:
- You've already run
/initial-setupon this machine - You're starting work on a new project/repository
- You just need to configure this project for PR reviews
Pre-Flight Check
Step 1: Verify System Configuration
cat ~/.config/claude/gitea.env 2>/dev/null | grep -v "^#" | grep -v "PASTE_YOUR" | grep "GITEA_API_TOKEN=" && echo "SYSTEM_OK" || echo "SYSTEM_MISSING"
If SYSTEM_MISSING:
System configuration not found.
Please run /initial-setup first to configure Gitea credentials.
If SYSTEM_OK: Continue.
Project Setup
Step 2: Verify Current Directory
pwd && git rev-parse --show-toplevel 2>/dev/null || echo "NOT_A_GIT_REPO"
Step 3: Check Existing Configuration
cat .env 2>/dev/null | grep "GITEA_REPO=" || echo "NOT_CONFIGURED"
If already configured, ask if user wants to keep or reconfigure.
Step 4: Detect Organization and Repository
Extract organization:
git remote get-url origin 2>/dev/null | sed 's/.*[:/]\([^/]*\)\/[^/]*$/\1/'
Extract repository:
git remote get-url origin 2>/dev/null | sed 's/.*[:/]\([^/]*\)\.git$/\1/' | sed 's/.*\/\([^/]*\)$/\1/'
Step 5: Validate Repository via Gitea API
source ~/.config/claude/gitea.env
curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token $GITEA_API_TOKEN" "$GITEA_API_URL/repos/<detected-org>/<detected-repo>"
| HTTP Code | Action |
|---|---|
| 200 | Auto-fill - "Verified: / exists" - skip to Step 8 |
| 404 | Not found - proceed to Step 6 |
| 401/403 | Permission issue - warn, proceed to Step 6 |
Step 6: Confirm Organization (only if validation failed)
Use AskUserQuestion:
- Question: "Repository not found. Is '' the correct organization?"
- Header: "Organization"
- Options:
- "Yes, that's correct"
- "No, let me specify"
Step 7: Confirm Repository (only if validation failed)
Use AskUserQuestion:
- Question: "Is '' the correct repository?"
- Header: "Repository"
- Options:
- "Yes, that's correct"
- "No, let me specify"
After corrections, re-validate via API (Step 5).
Step 8: Create/Update .env
echo "GITEA_ORG=<ORG_NAME>" >> .env
echo "GITEA_REPO=<REPO_NAME>" >> .env
Step 9: Optional PR Review Settings
Use AskUserQuestion:
- Question: "Configure PR review settings?"
- Header: "Settings"
- Options:
- "Use defaults (Recommended)"
- "Customize settings"
If customize:
PR_REVIEW_CONFIDENCE_THRESHOLD(default: 0.5)PR_REVIEW_AUTO_SUBMIT(default: false)
Complete
╔══════════════════════════════════════════════════════════════╗
║ PROJECT CONFIGURED ║
╠══════════════════════════════════════════════════════════════╣
║ Organization: <ORG_NAME> ║
║ Repository: <REPO_NAME> ║
║ Config file: ./.env ║
╚══════════════════════════════════════════════════════════════╝
Ready to review PRs:
• /pr-review <number> - Full multi-agent review
• /pr-summary <number> - Quick summary
• /pr-findings <number> - List findings