ghmulti helps you manage multiple GitHub identities for local Git work.
It includes:
- A Python CLI for account management, linking, git remote workflows, and diagnostics.
- A VS Code extension that shows and switches the active account from the status bar.
- Clone:
git clone https://github.com/nyigoro/ghmulti.git
cd ghmulti- Install CLI (editable, with runtime deps):
pip install -e .- Optional: install test/dev tools:
pip install -r requirements-dev.txtghmulti add
ghmulti list
ghmulti use work
ghmulti link work
ghmulti statusghmulti add: Add an account (username + token and/or SSH key).ghmulti list: List accounts.ghmulti use [ACCOUNT]: Set global active account.ghmulti update ACCOUNT: Update username, token, GPG key, SSH key, active status.ghmulti rename OLD_NAME NEW_NAME: Rename account alias.ghmulti remove ACCOUNT: Remove account.ghmulti account ...: Group shortcut with subcommandsadd/list/use/update/remove/rename.
ghmulti link [ACCOUNT]: Link current repository to an account and set local git identity.ghmulti unlink [--json] [--reset-local-git]: Remove repository-level link to an account.ghmulti clone REPO_URL [--account ACCOUNT] [--link/--no-link]: Clone and optionally link immediately.
ghmulti pull [--remote REMOTE] [--branch BRANCH]ghmulti push [--remote REMOTE] [--branch BRANCH] [--message MSG]ghmulti remote add --account ACCOUNT --url URLghmulti remote remove --account ACCOUNTghmulti list-remote [--all-branches]ghmulti check-remote
ghmulti status: Human-readable status.ghmulti status --json: Machine-readable status for automation/integrations.ghmulti doctor: Environment and dependency diagnostics.
Use JSON output for scripts and extension integrations:
ghmulti list --json
ghmulti status --json --skip-token-check
ghmulti use work --jsonFrom vscode-extension/:
npm install
npm run compile
npm testThen open vscode-extension in VS Code and press F5 to launch an Extension Development Host.
Extension commands:
ghmulti: Open Menughmulti: Add Accountghmulti: Switch Accountghmulti: Link Account to Repositoryghmulti: Unlink Repository Accountghmulti: Show Statusghmulti: Run Doctor
Notes:
- The extension supports multi-root workspaces and prompts for the target repository when needed.
- Set
ghmulti.commandPathin VS Code settings if CLI auto-detection is not correct for your environment.
python -m pytest -q