Git config is not login
Setting user.name and user.email only changes the commit stamp. Pushing still uses whatever credentials are active, so you can author as one person and authenticate as another.
Switch GitHub accounts by folder. Automatically.
Bind a directory to a GitHub user, email, and token. Open that folder and you are that account. Leave it and that identity is gone. No global switch. No wrong-account pushes.
cwd: /Users/you/Work/apireason: bindingenforce: strictbinding: /Users/you/Workprofile: workgithub: your-work-user@github.comidentity: Your Name <you@company.com>protocol: httpstoken: present (keychain)auth principal: your-work-userInstall
Install the CLI, bind a folder to a profile, then add the shell hook so every new terminal picks up the right account from your current directory. Full command reference.
01 · Install02 · Init + bind03 · Hook + verifyThe problem
Work in ~/Work, personal in ~/Personal. Without folder-scoped identity, git and gh keep using the last account you switched to. That is how commits and pushes leak across jobs.
Setting user.name and user.email only changes the commit stamp. Pushing still uses whatever credentials are active, so you can author as one person and authenticate as another.
Switching accounts in the GitHub CLI affects your whole machine. Open a personal repo after a work day and you can still be on the wrong account.
HTTPS helpers usually key off the host (github.com), not which project directory you are in. Two people on the same host look the same to git.
Your agent will try keys until one works. Without locking identity to a folder, the wrong key can win.
What acct controls
One tool keeps commit author, push credentials, SSH key, and gh aligned to the directory you are in.
Sets the right name and email for commits inside each bound folder, so work and personal authorship stay separate.
Serves the token for this folder's GitHub account. If nothing matches, it refuses instead of falling back to the wrong credentials.
Uses only the SSH key for the active profile, so the agent cannot authenticate you as someone else.
Points gh at the same account as the folder. You do not need gh auth switch when you change directories.
Optional hooks stop commits and pushes when the email or GitHub user does not match the bound profile.
How it chooses
More specific paths always beat broader ones.
Releases
FAQ
Every flag is on the command reference. Deep rules: invariants and threat model.
Install once, bind your trees, and stop switching accounts by hand.
How it works
Enter a bound folder.
Your GitHub account switches with you.Each path maps to one profile. Longer paths win. Leave the tree and that account stops applying.
cwd
~/Work/api
profile
work
user.email → you@company.com
auth
GH_TOKEN · work · keychain
Inside ~/Work, the same tools use your work account instead. No manual switch.
expected=your-work-user actual=your-work-user email=you@company.comAug 13, 2026
Added
Fixed