v0.1.20 · written in go

git identity manager.
done right.

# Switch your name, email, SSH key, and GitHub account
# across profiles — instantly, without touching config files.
A keyboard-driven TUI that gets out of your way.

view all options →
$
brew install aksisonline/tap/gitswitch
gitswitch — identity manager
click to focus · ↑↓ nav · switch · a add · c theme · ? help
theme · Nord
12
color themes
git profiles
5
fields per profile
MIT
open source
capabilities

everything gh auth switch
can't do.

# GitHub CLI only manages API tokens. Your commit identity — the name and email baked into every commit — is completely separate. gitswitch handles both.

[01]
commit identity switching
Instantly change user.name and user.email in your global git config. No more wrong-email commits.
[02]
ssh key management
Sets core.sshCommand to force a specific key with IdentitiesOnly=yes, preventing agent fallback.
[03]
gpg signing keys
Switches user.signingkey alongside your identity so signed commits always use the right key.
[04]
github account sync
Optionally calls gh auth switch on profile change. Best-effort — your git config always switches even if gh fails.
[05]
identity awareness
Learns which identity you use per-repo. Nudges you when something looks off. Pin a permanent identity with gitswitch pin.
[06]
shell integration
One command sets up your prompt segment, identity nudges on cd, and tab completions. Works with Starship, p10k, oh-my-zsh.
comparison

vs gh auth switch

# Two tools, two different problems. gitswitch handles what the GitHub CLI intentionally ignores.

capability gh auth switch gitswitch
github api tokens (optional)
git config user.name/email
ssh key switching
gpg signing key
shell prompt integration
interactive tui
repo-specific identity pinning
install

up in 30 seconds.

# Choose your preferred installation method. Homebrew is recommended for automatic updates.

homebrew — recommended

brew install aksisonline/tap/gitswitch
auto-updates with brew upgrade

curl — one-liner

curl -fsSL https://raw.githubusercontent.com/aksisonline/gitswitch/main/.github/install.sh | bash
works on macOS and Linux

build from source

git clone https://github.com/aksisonline/gitswitch
cd gitswitch && make install
requires go 1.21+
~/projects/myapp
gitswitch
# Opens the TUI — first run auto-imports your current git config
gitswitch work
✓ Switched to work
user.name → Alice Smith
user.email → alice@company.com
SSH key → ~/.ssh/id_work
gitswitch add oss "Alice" alice@oss.dev --ssh-key ~/.ssh/id_oss --gh-user alice-oss
✓ Profile 'oss' added
gitswitch install
Detected: Starship
✓ Prompt segment configured
✓ Tab completion enabled
✓ Identity nudge active
Reload: source ~/.zshrc
gitswitch pin work
✓ Pinned 'work' to this repo
looking ahead

v0.2.0 in progress · v0.3.0 planned

What's being built now and where this is going

v0.2.0 · in development
Multi-host credential maps
Profiles now carry a per-host credentials map. One profile can hold separate PAT tokens and SSH keys for github.com and a self-hosted enterprise instance simultaneously. A single switch correctly routes pushes to both the enterprise host and github.com from the same repo.
Per-host ~/.ssh/config blocks
SSH config is managed per-host instead of globally. No more clobbering entries when switching between orgs that share a machine.
Keychain-backed PAT storage
PAT tokens move out of plaintext config into the OS keychain. gh hosts.yml syncs on every switch automatically.
Session isolation
Active identity is scoped to a single shell session. Two terminals — or two AI coding agents — can hold different identities simultaneously without touching the global config.
Rust rewrite
The shell hook fires on every cd, so startup latency matters. Migrating from Go to Rust for genuine speed. Also unlocks ratatui's animation ecosystem — which matters, because there's a hidden Pacman mode and it's staying.
Profile importing
A new and easier way is coming... hehehe
● In development · driven by multi-host enterprise use cases.
v0.3.0 · planned
GitLab & Bitbucket
Manage identities across GitHub, GitLab, and Bitbucket in one tool. Switch all platforms at once or per-project. Builds directly on the multi-host credential architecture from v0.2.0.
Git setup diagnostic
Auto-detect & fix common issues: missing gh_user on profile, empty ~/.gitconfig, missing gh credential helper, stale SSH keys. One command to verify & heal.
Planned · builds on v0.2.0 architecture.