Overview
Thewarden setup-app command creates a GitHub App for Warden with fine-grained permissions and better rate limits compared to using GITHUB_TOKEN.
Usage
Interactive Wizard
The command launches an interactive setup:Setup Steps
Open browser
The command opens GitHub’s app creation page with pre-filled settings:
- Webhook: Disabled
- Permissions:
- Repository: Contents (read), Pull requests (write), Checks (write)
- Account: None
Create the app
In your browser:
- Set an app name (e.g., “Warden Bot”)
- Review permissions (pre-configured)
- Click Create GitHub App
Install the app
After creation, you’re redirected to:
- Click Install App
- Choose repositories:
- All repositories, or
- Selected repositories
- Click Install
Exchange credentials
Return to your terminal and press Enter.Warden exchanges temporary credentials for an installation token:
Benefits Over GITHUB_TOKEN
Better Rate Limits
5,000 requests/hour vs 1,000 with
GITHUB_TOKENFine-Grained Permissions
Only read contents and write PRs - no repository admin access
Visible Attribution
PR comments show as your app (e.g., “Warden Bot”) not your personal account
Token Refresh
Tokens refresh automatically - no re-authentication needed
Permissions
The app requests these permissions:| Permission | Access | Purpose |
|---|---|---|
| Contents | Read | Read source code and diff patches |
| Pull requests | Write | Post review comments and suggestions |
| Checks | Write | Create check runs with findings summary |
Warden never modifies code or repository settings. Write access is only for PR comments and checks.
Stored Credentials
Credentials are saved to:Using in CI/CD
After setup, the app works in both local and CI environments.GitHub Actions
No additional configuration needed:.github/workflows/warden.yml
Other CI Systems
Copy credentials to CI environment:-
Copy file content:
-
Set as CI secret/variable:
WARDEN_GITHUB_APP -
In CI, write to file:
Updating the App
To update permissions or settings:- Go to:
https://github.com/settings/apps - Click on your app (e.g., “Warden Bot”)
- Edit permissions under Permissions & events
- Save changes
Uninstalling
To remove the app:Remove credentials
Uninstall from GitHub
- Go to:
https://github.com/settings/installations - Find your app (e.g., “Warden Bot”)
- Click Configure
- Scroll down and click Uninstall
Delete the app
- Go to:
https://github.com/settings/apps - Click on your app
- Scroll down and click Delete GitHub App
Troubleshooting
Browser doesn't open
Browser doesn't open
Manually open the URL shown in the terminal:Copy and paste into your browser.
Setup fails with 'Invalid credentials'
Setup fails with 'Invalid credentials'
The OAuth exchange timed out. Try again:Complete the browser steps within 5 minutes.
'App not installed on repository'
'App not installed on repository'
The app isn’t installed on the repo you’re analyzing:
- Go to:
https://github.com/settings/installations - Click Configure on your app
- Add the repository
Want to use app in multiple repos
Want to use app in multiple repos
Install the app on more repositories:
- Go to:
https://github.com/settings/installations - Click Configure on your app
- Select repositories to add
- Save
setup-app.Credentials not working
Credentials not working
Re-run setup to regenerate credentials:
Security Considerations
Protect private key
The private key in~/.warden/github-app.json grants access to your repositories:
- Never commit to version control
- Never share publicly
- Rotate regularly by creating a new app
Limit installation scope
Install the app only on repositories that need Warden:- Use Selected repositories during installation
- Add/remove repos as needed in settings
Monitor usage
Review app activity:- Go to:
https://github.com/settings/apps - Click on your app
- View Advanced → Payload deliveries (if webhooks enabled)
Alternative: Personal Access Token
If you can’t create a GitHub App, use a Personal Access Token:- Lower rate limits (1,000/hour)
- Broader permissions (repo scope)
- Comments attributed to your personal account
Related
GitHub Action setup
Set up automated PR reviews
Authentication
All authentication methods
Troubleshooting
Common issues and solutions
Configuration
Configure Warden behavior