Skip to content

About

A local CLI for managing multiple GitHub Copilot accounts, tracking account status and usage, and launching Copilot CLI with secure account management.

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Copilot Pool Manager (CPM) 🚀

Never get stopped by rate limits again. Pool, rotate, and automatically switch between multiple authorized GitHub Copilot accounts right from your Windows terminal.

License: MIT Node.js Platform


⚡ 30-Second Quick Start

1. Install & Link Globally

git clone https://github.com/a7x3a/copilot-pool-manager.git
cd copilot-pool-manager
npm install
npm run build
npm link

2. Run the Setup Wizard

cpm setup

The 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:

  1. Go to: github.com/settings/personal-access-tokens/new
    (Note: GitHub Copilot CLI requires a Fine-grained PAT (github_pat_) or OAuth token (gho_). Classic ghp_ tokens are rejected).
  2. Token name: cpm
  3. Resource owner: Select your personal account (not an org)
  4. Permissions:
    • 👉 Account permissions: Set Copilot Requests to Read and write (Required)
    • 👉 Repository permissions: Set Contents to Read
  5. Click Generate token and copy the github_pat_... key into CPM.

3. Launch Copilot CLI with Your Active Account

cpm run

CPM automatically installs the official Copilot CLI if not yet present, injects your authenticated session, and runs your pooled Copilot CLI session!


💻 VS Code & Cursor Integration

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 .

How cpm code . works:

  1. CPM checks your account pool and picks the best available account (skipping any in cooldown).
  2. It retrieves the API key securely from Windows Credential Manager.
  3. It spawns VS Code passing COPILOT_GITHUB_TOKEN directly into VS Code's environment.
  4. VS Code's Copilot extension automatically authenticates with that account!

🖥️ Terminal Dashboard

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 Cheatsheet

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

🛠️ Optional: Using Copilot in Terminal (cpm run)

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!)


🔄 Automatic Rate-Limit Switching

Never worry about rate limits interrupting your workflow:

  1. Detection: If GitHub returns a rate limit (HTTP 429), CPM puts that account on a temporary cooldown (e.g. 15 minutes).
  2. Auto-Switch: CPM immediately switches to your next available, healthy account.
  3. Recovery: When the cooldown timer reaches zero, the account becomes READY again automatically.

📄 License

MIT © 2026 Ahmad

About

A local CLI for managing multiple GitHub Copilot accounts, tracking account status and usage, and launching Copilot CLI with secure account management.

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages