github-multi-account

Configure GitHub CLI aliases for separate personal and work accounts.

Updated Apr 3, 2026
One-click install
npx skills add https://github.com/sachinnair90/gitgloss --skill github-multi-account-sachinnair90
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-multi-account
Source: https://github.com/sachinnair90/gitgloss/tree/main/.copilot/skills/github-multi-account
Command: npx skills add https://github.com/sachinnair90/gitgloss --skill github-multi-account-sachinnair90

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill removes the friction of managing multiple GitHub identities by setting up reliable account-specific aliases for everyday CLI work.

Core Features & Use Cases

  • Account Detection: Finds multiple logged-in GitHub accounts and identifies which usernames are available.
  • Personal vs Work Setup: Helps the user map accounts to personal and work identities, then binds each one to a dedicated alias.
  • Automatic Alias Provisioning: Updates the shell profile, creates command wrappers, and adjusts PATH so switching accounts is seamless.
  • Use Case: A developer who maintains both personal and company repositories can use separate aliases to avoid accidental commits or repo operations under the wrong identity.

Quick Start

Ask the AI to detect your GitHub accounts, confirm which one is personal and which one is work, and set up the account-specific aliases for you automatically.

Frequently Asked Questions about github-multi-account

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I switch between multiple GitHub accounts from the command line?

Switch multiple GitHub accounts by configuring account-locked CLI aliases that bind specific identities to dedicated commands. The Skill detects logged-in accounts, maps them to personal and work identities, and creates command wrappers in your PowerShell profile for seamless switching.

Can I use the gh CLI with separate personal and work GitHub identities at the same time?

Yes, you can use the gh CLI with separate identities by creating ghp and ghw command wrappers. These aliases ensure repository operations automatically apply the correct username, preventing accidental commits under the wrong account.

How do I set up PowerShell profile aliases for managing multiple GitHub accounts?

Set up PowerShell profile aliases by updating your profile file to include ghp and ghw wrappers, then adjusting your system PATH. This configuration allows the shell to route commands to the correct authenticated GitHub account automatically.

What is the best way to prevent accidental commits to personal repos when using a work GitHub account?

The best way to prevent accidental commits is using account-specific CLI aliases that lock repository operations to the correct identity. This ensures your work alias only touches company repositories and your personal alias handles private projects.

Does this multi-account GitHub CLI setup require any specific dependencies or modules?

No external dependencies or modules are required. The setup relies entirely on the existing GitHub CLI, your PowerShell environment, and the ability to update your shell profile to create the necessary account-specific wrappers.

Why does my gh auth status show multiple accounts, and how do I manage them?

Multiple accounts in gh auth status indicate you are logged into separate personal and work GitHub identities simultaneously. Manage them by mapping each username to a dedicated alias, allowing automatic identity switching based on repository ownership.