A folder-based Git identity manager. Associate workspace folders with Git accounts — SSH keys, author name, and email are applied automatically to every repo inside.
No manual switching. No ssh-agent. No shell hooks. Uses git's native includeIf to make it work everywhere — terminal, VS Code, JetBrains, any git client.
- Register your git accounts with
zit add - Create workspace folders linked to accounts with
zit workspace init - Clone repos inside workspace folders with
zit clone - After that,
git push,git pull,git commit— everything uses the correct identity automatically
Under the hood, zit uses:
includeIf "gitdir:"— git's native conditional config that auto-loads identity settings based on repo locationcore.sshCommand— tells git which SSH key to use, no ssh-agent needed
npm install -g @hypercodingdev/zitRequires Node.js >= 18, git, and ssh-keygen.
After installing, run this to enable tab completion (recommended):
zit completion --installThis adds auto-complete to your shell so you can type zit <tab> to see commands, zit remove <tab> to see account names, etc. Restart your shell or run source ~/.zshrc (or ~/.bashrc) to activate.
# Register an account
zit add
# Account name: work
# Git user name: John Doe
# Git email: john@company.com
# → Generates SSH key, prints public key to paste into GitHub/GitLab
# Create a workspace folder linked to that account
zit workspace init ~/work work
# → Creates ~/work/, configures git includeIf
# Clone a repo inside the workspace
cd ~/work
zit clone git@github.com:my-org/my-repo.git
# From now on, git just works — no zit needed
cd ~/work/my-repo
git commit -m "uses work identity automatically"
git push # uses work SSH key automaticallyAll commands have short aliases for convenience.
| Command | Alias | Description |
|---|---|---|
zit add |
Register a new git account | |
zit remove <account> |
zit rm |
Remove an account and SSH keys |
zit list |
zit ls |
List all registered accounts |
zit workspace <sub> |
zit wsp |
Manage workspace folders |
zit clone <url> |
Clone with workspace SSH key | |
zit status |
Show current workspace info | |
zit completion |
Output shell completion script | |
zit uninstall |
Remove all zit data and configs |
Register a new git account interactively. Generates an SSH keypair.
zit add # default: ed25519
zit add -t rsa # specify key typeSupported key types: ed25519 (default), rsa, ecdsa, ecdsa-sk, ed25519-sk, dsa
Remove an account and its SSH keys. Alias: zit rm
zit remove work
zit remove work --force # also removes linked workspacesList all registered accounts with their emails. Alias: zit ls
$ zit list
Registered accounts:
personal john@personal.com
work john@company.comCreate a workspace folder linked to an account. Alias: zit wsp
zit workspace init ~/work work
zit workspace init ~/personal personalList all workspaces.
$ zit workspace list
Workspaces:
work ~/work work
personal ~/personal personalUnlink a workspace. Keeps the folder and repos, but removes the identity link.
zit workspace remove workClone a repo using the current workspace's SSH key. Must be run inside a workspace folder.
cd ~/work
zit clone git@github.com:org/repo.git
zit clone git@github.com:org/repo.git --depth 1 # extra git clone flags workShow the current directory's workspace and account info.
$ cd ~/work/my-repo && zit status
Workspace: work
Path: ~/work
Account: work
Name: John Doe
Email: john@company.com
SSH Key: ~/.ssh/id_ed25519_workzit uninstallThis removes all zit data in one step:
- All workspace
includeIfentries from~/.gitconfig - All workspace gitconfig files
- All SSH keys for registered accounts (use
--keep-keysto skip) - The
~/.config/zit/config directory - Tab completion from your shell profile
Workspace folders and repos inside them are not deleted.
After running zit uninstall, remove the CLI itself:
npm uninstall -g @hypercodingdev/zit~/.config/zit/config— stores registered accounts and workspace mappings~/.config/zit/workspaces/*.gitconfig— per-workspace git config files~/.gitconfig— addsincludeIfentries (one per workspace)~/.ssh/id_<type>_<name>— SSH keypairs for each account
- Linux
- macOS
MIT