acct
2,681+ downloadsUse the right GitHub account in every folder.
Bind a directory to a GitHub account so your Git identity, authentication, and managed gh commands follow the folder you’re working in.
- GitHub
- you-at-work
- Git identity
- you@company.com
- Credentials
- OS keychain
$ cd ~/Work/api
$ acct whoami
expected=you-at-work
acct keeps your Git tools on the same account.
Git’s commit identity, remote authentication, and the GitHub CLI have separate settings. acct connects them to a profile for the directory you’re working in.
Your commits use the profile’s name and email.
Directory bindings set your Git identity through conditional includes, while a repository-local profile takes precedence when you need an exception.
Strict hooks check for identity mismatches before a commit, merge, or push, so a local override cannot silently use another profile’s email.
Read the command reference$ git config user.name Your Name $ git config user.email you@company.comExample commands for a folder bound to work
Set up your profiles and connect your shell.
Guided setup creates a profile, binds a directory, and installs the Git includes and hooks. Connect your shell so gh follows that directory in new sessions.
Install acct with npm.
You’ll need Node.js 20 or newer, Git, and GitHub CLI installed on your machine. Install acct globally so it’s available from any folder.
npm install -g acct-shThe package is published on npm as acct-sh, and the command is acct.
After upgrading to 0.2.0, run acct install once to refresh your hooks while keeping your existing profiles and bindings.