Overview
GitHub Achievement CLI is configured through environment variables in a.env file. This file is created automatically during initial setup but can be edited manually.
All configuration is loaded from the .env file in your project root directory.
Required Settings
These variables must be set for the CLI to function:Your GitHub Personal Access Token for the main account.
- Format: Must start with
ghp_orgithub_pat_ - Required scope:
repo(full control of private repositories) - Generate at: https://github.com/settings/tokens
Your GitHub username (main account).
- Auto-populated: During setup wizard from token authentication
- Format: Your GitHub login name
This value is automatically detected when you provide your token during setup.
Target repository where achievements will be created.
- Format:
owner/repo(e.g.,myusername/GitHub-Achievements-Manager) - Requirements: You must have write access to this repository
- Purpose: All branches, PRs, issues, and commits are created here
Optional Settings
These variables customize the CLI behavior:Coauthor name for Pair Extraordinaire achievement commits.
- Used in: Commit messages for Pair Extraordinaire achievement
- Format:
Co-authored-by: NAME <EMAIL> - Default:
n0
Coauthor email for Pair Extraordinaire achievement commits.
- Used in: Commit messages alongside
COAUTHOR_NAME - Validation: Must be a valid email format (contains
@) - Default:
[email protected]
Commits appear as:
Co-authored-by: n0 <[email protected]>Prefix for created branches.
- Format: Branch names will be
{PREFIX}/{achievement-type}-{number} - Example:
achievement/pull-shark-1,achievement/pair-extraordinaire-5 - Default:
achievement
Delay between operations in milliseconds.
- Purpose: Prevents rate limiting and ensures API stability
- Range: Minimum 0, recommended 500-2000
- Default:
1000(1 second) - Increase if: You’re hitting rate limits
Lower values execute faster but increase risk of rate limiting. Higher values are safer but slower.
Advanced Settings
These variables control internal behavior and debugging:Enable verbose logging output.
- Values:
trueorfalse - When enabled: Shows detailed API calls and internal operations
- Default:
false
Enable test/dry-run mode.
- Values:
trueorfalse - When enabled: Shows what would happen without actually executing operations
- Default:
false - Use case: Preview changes before execution
Number of parallel operations in a batch.
- Purpose: Controls parallelization of API requests
- Range: Minimum 1, recommended 3-10
- Default:
5 - Impact: Higher values = faster execution but more API load
Logging verbosity level.
- Values:
debug,info,warn,error - Default:
info - debug: Most verbose, shows all operations
- info: Normal operation logs
- warn: Only warnings and errors
- error: Only errors
Number of parallel operations allowed simultaneously.
- Purpose: Limits concurrent API calls
- Default:
2(2 parallel operations = ~10 concurrent API calls) - Rate limit context: Each operation makes ~5 API calls
- GitHub limit: 80 content-creating requests/minute
This is configured automatically to stay under GitHub’s rate limits. Only change if you understand the implications.
Maximum operations per minute.
- Purpose: Rate limiting to stay within GitHub’s API limits
- Default:
15operations/minute (75 API calls, under 80 limit) - Calculation: Each operation × 5 API calls = total API calls/minute
Galaxy Brain / YOLO Settings
These variables enable achievements that require a helper account:GitHub Personal Access Token from a second GitHub account.
- Required for: Galaxy Brain and YOLO achievements
- Format: Must start with
ghp_orgithub_pat_ - Required scopes:
repo,write:discussion - Important: Must be from a different account than
GITHUB_TOKEN - Generate at: https://github.com/settings/tokens (logged into helper account)
The helper account should be added as a collaborator on your target repository with write access.
Username of the helper account.
- Auto-detected: From
HELPER_TOKENduring setup - Purpose: Internal tracking of helper account operations
How Helper Account Works
Galaxy Brain Achievement
- Helper account creates a discussion question in your repository
- Main account answers the question
- Helper account marks your answer as accepted
- Achievement unlocked!
Configuration File Location
The.env file must be in your project root:
Example Complete Configuration
Here’s a complete.env file with all available options:
Updating Configuration
You can update configuration in three ways:Validation
The CLI validates configuration on startup:- Token format: Must start with
ghp_orgithub_pat_ - Token authentication: Validates against GitHub API
- Repository format: Must be
owner/repo - Repository access: Checks write permissions
- Numeric values: Must be positive numbers
- Email format: Must contain
@
Security Best Practices
The repository includes a.gitignore that excludes .env files, but always verify:
Token Security
- Use tokens with minimal required scopes
- Rotate tokens periodically
- Delete unused tokens from GitHub settings
- Never share tokens in screenshots or logs
- Use separate tokens for main and helper accounts
Next Steps
GitHub Tokens
Detailed guide on creating and managing GitHub tokens
Initial Setup
Complete setup wizard walkthrough
Achievements
Learn about available achievements
Troubleshooting
Common configuration issues and solutions