Files
leo-claude-mktplace/plugins/pr-review/commands/project-sync.md
lmiranda b5d36865ee feat(plugins): add Visual Output headers to all other plugin commands
Add single-line visual headers to 66 command files across 10 plugins:
- clarity-assist (2 commands): 💬
- claude-config-maintainer (5 commands): ⚙️
- cmdb-assistant (11 commands): 🖥️
- code-sentinel (3 commands): 🔒
- contract-validator (5 commands): 
- data-platform (10 commands): 📊
- doc-guardian (5 commands): 📝
- git-flow (8 commands): 🔀
- pr-review (7 commands): 🔍
- viz-platform (10 commands): 🎨

Each command now displays a consistent header at execution start:
┌────────────────────────────────────────────────────────────────┐
│  [icon] PLUGIN-NAME · Command Description                       │
└────────────────────────────────────────────────────────────────┘

Addresses #275 (other plugin commands visual output)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 17:24:49 -05:00

3.0 KiB

description
description
Sync project configuration with current git remote - use after changing repository location

Project Sync (PR Review)

Visual Output

When executing this command, display the plugin header:

┌──────────────────────────────────────────────────────────────────┐
│  🔍 PR-REVIEW · Project Sync                                      │
└──────────────────────────────────────────────────────────────────┘

Then proceed with the synchronization.

Updates project configuration when the git remote URL has changed.

Use this when:

  • Repository was moved to a different organization
  • Repository was renamed
  • Git remote URL changed
  • SessionStart hook detected a mismatch

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: Run /initial-setup first.


Step 2: Read Current .env

cat .env 2>/dev/null

Extract GITEA_ORG and GITEA_REPO values.

If missing: Redirect to /project-init.


Step 3: Detect Git Remote

git remote get-url origin 2>/dev/null

Extract organization and repository from URL.


Step 4: Compare Values

Scenario Action
Match "Configuration in sync" - exit
Mismatch Show diff, proceed to validation

Step 5: Validate 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/<NEW_ORG>/<NEW_REPO>"
Code Action
200 Verified - proceed to update
404 Not found - ask to confirm
401/403 Permission issue - warn

Step 6: Confirm and Update

Use AskUserQuestion to confirm, then update .env:

sed -i 's/^GITEA_ORG=.*/GITEA_ORG=<NEW_ORG>/' .env
sed -i 's/^GITEA_REPO=.*/GITEA_REPO=<NEW_REPO>/' .env

Step 7: Confirm Success

╔══════════════════════════════════════════════════════════════╗
║              CONFIGURATION UPDATED                           ║
╠══════════════════════════════════════════════════════════════╣
║ Organization:  <NEW_ORG>                                     ║
║ Repository:    <NEW_REPO>                                    ║
╚══════════════════════════════════════════════════════════════╝