cyrus-setup-github
CRITICAL: Never use Read, Edit, or Write tools on ~/.cyrus/.env or any file inside ~/.cyrus/. Use only Bash commands (grep, printf >>, etc.) to interact with env files — secrets must never be read into the conversation context.
Setup GitHub
Configures GitHub CLI and git so Cyrus can create branches, commits, and pull requests.
Step 1: Check Existing Configuration
Check if gh is already authenticated:
gh auth status 2>&1
If authenticated, check git config:
git config --global user.name
git config --global user.email
If both gh auth and git config are set, inform the user:
GitHub is already configured. Skipping this step.
Skip to completion.
Step 2: Authenticate GitHub CLI
If gh is not authenticated:
gh auth login
This opens an interactive browser flow. Let the user complete it.
After completion, verify:
gh auth status
Step 3: Configure Git Identity
If git user name or email are not set, ask the user for their preferred values:
What name should appear on commits made by Cyrus? (e.g., your name, or "Cyrus Bot")
What email should appear on commits? (e.g., your email, or a noreply address)
Then set them:
git config --global user.name "<name>"
git config --global user.email "<email>"
Step 4: Verify
gh auth status
git config --global user.name
git config --global user.email
Completion
✓ GitHub CLI authenticated ✓ Git identity configured:
<name><