Free Download for Windows

View an ad to download for free

Softonic review

Automatic GitHub CLI context switching for multi-account workflows

Experience automatic account switching before HTTPS git operations: gh-autoswitch runs the GitHub CLI context change based on a repository's remote owner or organization. Developed by Pierre Brouillet (pbrouillet), the utility installs as a Rust binary and plugs into Git as a credential helper. Key functions include context-aware detection, a Ratatui-powered terminal config editor, and YAML mappings. It targets developers who manage multiple GitHub identities and need reliable account selection during push, pull, clone, and fetch commands.

What does gh-autoswitch do for multi-account Git workflows?

gh-autoswitch intercepts HTTPS git operations and runs gh auth switch automatically, using the repository remote owner or organization to choose the account. It acts as a git credential helper, so the switch happens before push, pull, fetch, or clone completes. Configuration uses a YAML file to map repos or orgs to accounts, and a built-in Ratatui terminal UI lets you scaffold and edit that mapping without leaving the console.

Does it affect system performance during git operations?

The tool is distributed as a single Rust binary, which implies low overhead and fast startup compared with script-based helpers. Because it performs an account switch only when an HTTPS remote operation is invoked, background CPU and RAM use remain minimal outside git commands. The app integrates with the GitHub CLI rather than reimplementing auth, so it delegates heavy work to the existing gh process.

Is it safe to use on active repositories and production machines?

gh-autoswitch relies on the official GitHub CLI to perform authentication changes, and it runs as a credential helper rather than modifying repository data directly. The credential-helper approach means it triggers gh auth switch before network operations, rather than writing to the repo. Because it uses explicit YAML mappings and an interactive TUI for configuration, accidental account selection is reduced by design, assuming the mappings are reviewed before use.

Do I need technical knowledge to install and configure it?

Installation options include WinGet on Windows and standard binaries for other platforms, so setup fits common developer workflows. The TUI lets users edit YAML without a separate editor, lowering the barrier for those comfortable in a terminal. Nevertheless, understanding Git remotes, HTTPS vs SSH, and the GitHub CLI is required to configure account-to-organization mappings correctly.

Practical pick for developers juggling multiple GitHub identities, with one notable dependency

gh-autoswitch provides automated, context-driven account selection that reduces manual gh auth switch steps and keeps HTTPS operations aligned with the intended identity. It suits developers who work across personal and organizational repositories and prefer terminal workflows. One trade-off is the mandatory reliance on the official GitHub CLI for all switching actions, which must be present and correctly configured for the tool to function.

  • Pros

    • Automatically runs gh auth switch before HTTPS git operations
    • Context-aware selection using repository owner or organization
    • Built-in Ratatui TUI for scaffolding and editing YAML mappings
    • Distributed as a single Rust binary with cross-platform support
  • Cons

    • Requires the official GitHub CLI to be installed and configured
    • Designed for HTTPS remotes; SSH workflows are not the primary path
    • YAML mapping mistakes can cause incorrect account selection if unchecked

App specs

  • Developer

  • License

    Free

  • Version

    1.1.2

  • Latest update

  • Platform

    Windows

  • OS

    Windows 11

  • Size

    771.48 KB

Program available in other languages


Free Download for PC

View an ad to download for free


User reviews about gh-autoswitch

Have you tried gh-autoswitch? Be the first to leave your opinion!

Add review

Latest articles

Laws concerning the use of this software vary from country to country. We do not encourage or condone the use of this program if it is in violation of these laws.
Signed in to Softonic as