Never get stopped by rate limits again. Pool, rotate, and automatically switch between multiple authorized GitHub Copilot accounts right from your Windows terminal.
git clone https://github.com/a7x3a/copilot-pool-manager.git
cd copilot-pool-manager
npm install
npm run build
npm linkcpm setupThe wizard will ask you how many accounts to pool. Simply paste each account's GitHub Copilot Token / API Key (no OAuth or browser logins needed).
🔑 How to generate your token in 60 seconds:
- Go to: github.com/settings/personal-access-tokens/new
(Note: GitHub Copilot CLI requires a Fine-grained PAT (github_pat_) or OAuth token (gho_). Classicghp_tokens are rejected).- Token name:
cpm- Resource owner: Select your personal account (not an org)
- Permissions:
- 👉 Account permissions: Set
Copilot RequeststoRead and write(Required)- 👉 Repository permissions: Set
ContentstoRead- Click Generate token and copy the
github_pat_...key into CPM.
cpm runCPM automatically installs the official Copilot CLI if not yet present, injects your authenticated session, and runs your pooled Copilot CLI session!
CPM makes it effortless to launch your editor with the active pooled Copilot account:
# Open VS Code in current directory
cpm code .
# Open Cursor in current directory
cpm cursor .
# Or launch any custom editor
cpm ide windsurf .
cpm ide nvim .- CPM checks your account pool and picks the best available account (skipping any in cooldown).
- It retrieves the API key securely from Windows Credential Manager.
- It spawns VS Code passing
COPILOT_GITHUB_TOKENdirectly into VS Code's environment. - VS Code's Copilot extension automatically authenticates with that account!
Type cpm from any terminal to open the live visual dashboard:
cpm╭──────────────────────────────────────────────────────────────╮
│ COPILOT POOL MANAGER │
╰──────────────────────────────────────────────────────────────╯
ACCOUNTS POOL
ID ACCOUNT STATUS USAGE LAST USED
─────────────────────────────────────────────────────────────
01 work-user ACTIVE -- now
02 personal-user READY -- 12 min ago
03 backup-user COOLDOWN 08:15 25 min ago
CURRENT PROJECT
MyProject (C:\Projects\MyProject)
ACTIVE ACCOUNT
#01 work-user (ACTIVE)
ACTIONS / COMMANDS
[1] Run Copilot (/run)
[2] Accounts Pool (/accounts)
[3] Switch Account (/switch)
[4] Usage & Limits (/usage)
[5] Projects (/projects)
[6] Health Doctor (/doctor)
[7] Logs & Events (/logs)
[8] Setup Wizard (/setup)
[Q] Quit (/quit)
You can press 1-8 or type slash commands like /switch, /run, /doctor, or /usage.
| Command | What it does |
|---|---|
cpm code . |
Launches VS Code with the active Copilot account |
cpm cursor . |
Launches Cursor with the active Copilot account |
cpm |
Opens the interactive visual dashboard |
cpm setup |
First-time setup wizard to connect account API keys |
cpm switch |
Interactively switch your active account |
cpm switch <id> |
Instantly switch to an account (e.g. cpm switch 02) |
cpm doctor |
Self-diagnostic check (Node, Windows Vault, DB) |
cpm accounts |
Lists all accounts, statuses, and cooldowns |
cpm run |
Launches official Copilot CLI in your terminal |
cpm run <project> |
Jumps to a project folder and runs Copilot |
cpm project add |
Saves a folder as a named project |
cpm usage |
Shows observed token counts & sessions |
If you want to use Copilot directly in your terminal via cpm run, install the official GitHub Copilot CLI extension:
# 1. Install GitHub CLI (if you don't have it)
winget install --id GitHub.cli
# 2. Install Copilot extension
gh extension install github/gh-copilot(Note: If you only code inside VS Code with cpm code ., you do not need to install the terminal CLI!)
Never worry about rate limits interrupting your workflow:
- Detection: If GitHub returns a rate limit (HTTP 429), CPM puts that account on a temporary cooldown (e.g. 15 minutes).
- Auto-Switch: CPM immediately switches to your next available, healthy account.
- Recovery: When the cooldown timer reaches zero, the account becomes
READYagain automatically.
MIT © 2026 Ahmad