gh-multi
v0.1.1
Published
Multi-account GitHub Copilot plugin for opencode - hooks into native provider
Maintainers
Readme
gh-multi
Multi-account GitHub Copilot plugin for OpenCode.
What It Does
Intercepts GitHub Copilot API requests and distributes them across multiple GitHub accounts. Rotates credentials to maximize quota usage and prevent rate limiting.
Requirements
- OpenCode
Installation
- Register the plugin in
~/.config/opencode/opencode.json:{ "plugin": ["gh-multi"] }
Configuration
Plugin settings are stored in ~/.config/opencode/copilot.json:
{
"logging": {
"enabled": true,
"level": "info"
},
"rotation_strategy": "hybrid"
}Options
| Field | Values | Default | Description | | ----------------- | --------------------------------------- | ------- | ------------------------ | | logging.enabled | true/false | true | Write logs to disk | | logging.level | error, warn, info, debug | info | Log verbosity | | rotation_strategy | hybrid, sticky, round-robin, random | hybrid | Account selection method |
Rotation Strategies
| Strategy | Description |
|----------|-------------|
| hybrid | Quota-weighted selection. Accounts with more remaining premium quota are selected more often. Falls back to round-robin when quota data is unavailable. Default. |
| sticky | Session-bound selection. Requests with the same session ID use the same account. Useful for multi-turn conversations. |
| round-robin | Least recently used. Picks the account that has not been used for the longest time. |
| random | Uniform random selection from healthy accounts. |
Adding Accounts
Start OpenCode:
opencodeRun the auth command:
opencode auth loginSelect "Other" from the provider list.
Type in gh-multi
Follow the device flow prompts for each GitHub account.
Logging
Logs are written to ~/.config/opencode/gh-multi/gh-multi_logs/.
Enable debug logging:
GH_MULTI_DEBUG=1 opencodeOr set in config:
{
"logging": {
"level": "debug"
}
}License
Proprietary
