@claude OAuth Installer
Easy installer for Claude Code OAuth workflows - Set up @claude mentions in your GitHub repositories with a single script.
╔══════════════════════════════════════════════════════════════════════════╗
║ ║
║ ✨ @claude OAuth Installer ✨ ║
║ ║
╚══════════════════════════════════════════════════════════════════════════╝
██████╗██╗ █████╗ ██╗ ██╗██████╗ ███████╗
██╔════╝██║ ██╔══██╗██║ ██║██╔══██╗██╔════╝
██║ ██║ ███████║██║ ██║██║ ██║█████╗
██║ ██║ ██╔══██║██║ ██║██║ ██║██╔══╝
╚██████╗███████╗██║ ██║╚██████╔╝██████╔╝███████╗
╚═════╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝
██╗███╗ ██╗███████╗████████╗ █████╗ ██╗ ██╗ ███████╗██████╗
██║████╗ ██║██╔════╝╚══██╔══╝██╔══██╗██║ ██║ ██╔════╝██╔══██╗
██║██╔██╗ ██║███████╗ ██║ ███████║██║ ██║ █████╗ ██████╔╝
██║██║╚██╗██║╚════██║ ██║ ██╔══██║██║ ██║ ██╔══╝ ██╔══██╗
██║██║ ╚████║███████║ ██║ ██║ ██║███████╗███████╗███████╗██║ ██║
╚═╝╚═╝ ╚═══╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝╚═╝ ╚═╝
by @grll
What This Does
This installer automatically sets up Claude Code OAuth integration for your GitHub repositories, allowing you to use @claude mentions in issues and PRs. The script:
✅ Checks prerequisites (GitHub CLI, jq)
✅ Detects your GitHub username
✅ Sets up repository secrets
✅ Creates GitHub workflows
✅ Commits and pushes everything
✅ Provides step-by-step instructions
Quick Start
One-liner installation:
Make sure you cd into your repo, have gh and jq available in your environment.
bash <(curl -fsSL https://raw.githubusercontent.com/grll/claude-code-action/main/scripts/installer.sh)Manual installation:
# Download the installer curl -fsSL https://raw.githubusercontent.com/grll/claude-code-action/main/scripts/installer.sh -o installer.sh # Make it executable chmod +x installer.sh # Run it ./installer.sh
With specific repository:
./installer.sh --repo your-username/your-repo
Prerequisites
Before running the installer, make sure you have:
-
GitHub CLI installed and authenticated
# Install GitHub CLI brew install gh # macOS # or sudo apt install gh # Ubuntu/Debian # Authenticate gh auth login
-
jq for JSON parsing
brew install jq # macOS # or sudo apt install jq # Ubuntu/Debian
-
Personal Access Token for secrets management
- Visit: SECRETS_ADMIN_PAT Setup Guide
- The installer will prompt you for this token
What Gets Created
The installer creates two GitHub workflows:
1. claude_code_login.yml
OAuth authentication workflow for Claude Code login process.
2. claude_code.yml
PR assistant workflow that responds to @claude mentions (restricted to your username).
After Installation
Once the installer completes, follow these steps:
-
Run OAuth workflow (without code)
- Go to:
https://github.com/your-repo/actions/workflows/claude_code_login.yml - Click "Run workflow" → "Run workflow" (leave code empty)
- Go to:
-
Get login URL
- Wait for workflow completion
- Find the login URL in the action summary
-
Authenticate with Claude
- Visit the generated URL
- Log in to Claude
- Copy the authorization code
-
Complete setup
- Run the workflow again with the authorization code
- Paste your code and run the workflow
-
Start using Claude
- Create issues or PRs and mention @claude
- Only your username can trigger Claude responses
Features
- 🎨 Beautiful terminal UI with colors and ASCII art
- 🔍 Smart repository detection
- 🔐 Secure secret management
- 📝 Comprehensive error handling
- 🚀 Automatic git operations (stash, commit, push)
- 🎯 Personalized workflows (uses your GitHub username)
- 📋 Step-by-step instructions
Command Line Options
./installer.sh [OPTIONS]
OPTIONS:
--repo OWNER/REPO Specify repository (default: auto-detect current repo)
--help Show this help messageTroubleshooting
Common Issues
"gh: command not found"
- Install GitHub CLI: https://cli.github.com/
"jq: command not found"
- Install jq: https://jqlang.github.io/jq/
"Failed to get GitHub username"
- Run:
gh auth login
"Cannot access repository"
- Ensure repository exists and you have access
- Check authentication:
gh auth status
Getting Help
Related Projects
- claude-code-login - The underlying OAuth action
- Claude Code - Official Claude Code documentation
License
MIT License - see LICENSE file for details.
Contributing
Contributions welcome! Please read our contributing guidelines and submit pull requests.
Made by @grll
Simplifying Claude Code OAuth setup, one repo at a time.