OPEN SOURCE · MIT · v0.4.5

The right git name, email and SSH key in every repository. For you, and for the AI agents that commit for you.

gitpro picks the identity by the repository's remote URL, not by the folder you cloned it into. It writes plain git and SSH config, so nothing runs in the background.

$ pipx install gitpro

FIG. 01THE PROBLEM
One email for every repository Without gitpro, one laptop has a single user.email in ~/.gitconfig, jane@personal.dev. Two repositories on the laptop, a work repository employer-org/app and a personal one jane/dotfiles, both commit with it. The personal account on GitHub gets the right address; the employer's organisation on GitHub gets the personal address in its history. THIS LAPTOP ~/.gitconfig user.email jane@personal.dev employer-org/app work repository jane/dotfiles personal repository employer-org on GitHub no commits yet PUSH jane on GitHub no commits yet PUSH One email for every repository Without gitpro, one laptop has a single user.email in ~/.gitconfig, jane@personal.dev. Two repositories on the laptop, a work repository employer-org/app and a personal one jane/dotfiles, both commit with it. The personal account on GitHub gets the right address; the employer's organisation on GitHub gets the personal address in its history. THIS LAPTOP ~/.gitconfig user.email jane@personal.dev employer-org/app work jane/dotfiles personal employer-org on GitHub no commits yet jane on GitHub no commits yet PUSH
One email in ~/.gitconfig, two repositories. The work repository ends up with the personal address in its history.

Matched by remote URL

You describe each identity once: a name, an email, an SSH key, and the hosts and owners it belongs to. gitpro turns that into git's own includeIf rules and SSH host entries, so git picks the identity from the remote URL on every commit.

  • PLAIN CONFIG

    Ordinary git and SSH files in a marked block. No daemon, no wrapper around git.

  • PREVIEW

    gitpro setup shows every change before anything is written, and gitpro setup -n only shows.

  • BACKUPS

    Hand-written files are backed up, and gitpro uninstall removes everything again.

  • GUARD

    Optional hooks refuse a commit or push with the wrong identity and print the command that fixes it.

FIG. 02MATCHED BY REMOTE URL
Matched by remote URL Three repositories, employer-org/app on github.com, platform/api on gitlab.employer.com and jane/dotfiles on github.com, are each matched by their remote URL to one identity: work-github, work-gitlab or the default. Below, a user.email override in the work repository's .git/config would commit as the wrong person; the gitpro guard hook stops that commit. REPOSITORY REMOTE URL MATCHES IDENTITY employer-org/app github.com github.com / employer-org work-github jane.doe@employer.com platform/api gitlab.employer.com gitlab.employer.com work-gitlab jane.doe@employer.com jane/dotfiles github.com anything else default jane@personal.dev user.email override in .git/config gitpro guard pre-commit hook COMMIT BLOCKED Matched by remote URL Three repositories, employer-org/app on github.com, platform/api on gitlab.employer.com and jane/dotfiles on github.com, are each matched by their remote URL to one identity: work-github, work-gitlab or the default. Below, a user.email override in the work repository's .git/config would commit as the wrong person; the gitpro guard hook stops that commit. REPOSITORY IDENTITY employer-org/app github.com work-github work email platform/api work GitLab work-gitlab work email jane/dotfiles github.com default personal email override .git/config gitpro guard pre-commit COMMIT BLOCKED
Each repository's remote URL picks its identity. A stray user.email in one repository is caught by the guard before the commit is made.
✗ gitpro: this commit would be committed as jane@personal.dev
  but origin (git@github.com:employer-org/app.git) belongs to
  identity work-github <jane.doe@employer.com>
  cause: user.email is set in the repo's .git/config
  fix:   git -C ~/work/github.com/employer-org/app config --unset user.email

Works with your git host

An identity is a host and, if you like, the owners under it, so any git host works, over SSH or HTTPS. The remote URL forms of these hosts are tested against real git on every change:

  • GitHub
  • GitHub Enterprise Server
  • GitLab.com
  • GitLab self-managed
  • Bitbucket Cloud
  • Bitbucket Data Center
  • Azure DevOps
  • visualstudio.com
  • Codeberg
  • SourceHut
  • Gitea
  • Gitee
  • Hugging Face
  • AWS CodeCommit
  • Launchpad

When a remote URL has a form the patterns miss, such as a user name in an HTTPS URL, a port, different letter case or git+ssh://, gitpro why says so and gives the fix.

AI agents commit too

Coding agents run git commit, git push and gh pr create on their own. gitpro checks each of those calls before it runs. When the identity is wrong, the call is denied with a reason, and the agent has to ask you.

  • HOOK

    A Claude Code PreToolUse hook, from gitpro setup or the plugin. It only denies; it never grants anything.

  • MCP

    A read-only MCP server, gitpro mcp or uvx gitpro mcp, so an agent can ask which identity a repository uses and why, and whether a commit would be blocked. Tools include why, setup, scan, audit, env and report. It is listed in the official MCP Registry as io.github.Yantrakar/gitpro.

  • APPROVAL

    Agents can read the answers, and the fix commands wait for your approval.

  • AUDIT

    gitpro audit finds commits made as the wrong identity or by an agent; --fix fixes the unpushed ones.

  • LLMS.TXT

    Agents can read gitpro.dev/llms.txt for the commands, the MCP tools and the docs in plain text.

FIG. 03AN AGENT TRIES TO COMMIT
An AI agent tries to commit An AI coding agent such as Claude Code runs git commit. The gitpro agent-check hook sees the wrong identity and denies the call, and the reason goes back to the agent. The agent asks you, you approve the fix, and the same commit then goes through to git as the right identity. You approve or fix AI coding agent Claude Code, Cursor gitpro agent-check PreToolUse hook git commit push, gh pr create ASKS APPROVES DENIED An AI agent tries to commit An AI coding agent such as Claude Code runs git commit. The gitpro agent-check hook sees the wrong identity and denies the call, and the reason goes back to the agent. The agent asks you, you approve the fix, and the same commit then goes through to git as the right identity. You approve or fix AI coding agent Claude Code, Cursor gitpro agent-check PreToolUse hook git commit push, gh pr create ASKS APPROVES DENIED
The hook denies a commit with the wrong identity. The agent asks you, and after your fix the same commit goes through as work-github.

Set up in a few minutes

Linux or macOS, Git 2.36 or newer, Python 3.9 or newer and OpenSSH.

  1. Install pipx if you don't have it. brew install pipx on macOS, sudo apt install pipx on Ubuntu.
  2. Answer a few questions, then say yes once. gitpro setup offers to look through your repos to find your identities, shows everything it will set up, and applies it after one yes. It never changes your repos.
  3. Ask a repository. gitpro why shows the identity it should use, the one it uses, and the fix if they differ.
  4. See what needs a fix. gitpro scan lists the repos that need attention and the command for each.
$ pipx install gitpro
$ gitpro setup
$ gitpro why
$ gitpro scan
FIG. 04SETUP
Setup in four steps gitpro setup finds your identities and saves ~/.config/gitpro.toml. It previews every change. After one yes it writes a marked block in ~/.gitconfig, one file per identity and the SSH host entries. From then on git and ssh read those files themselves. gitpro uninstall removes them again. gitpro setup finds identities gitpro.toml ~/.config the preview preview only one yes setup -y ~/.gitconfig marked block per identity ~/.gitconfig-<id> ~/.ssh/config key per host git, ssh read these Setup in four steps gitpro setup finds your identities and saves ~/.config/gitpro.toml. It previews every change. After one yes it writes a marked block in ~/.gitconfig, one file per identity and the SSH host entries. From then on git and ssh read those files themselves. gitpro uninstall removes them again. gitpro setup finds identities gitpro.toml ~/.config the preview preview only one yes setup -y ~/.gitconfig marked block per identity ~/.gitconfig-<id> ~/.ssh/config key per host git, ssh read these
Setup saves a config, previews every change and, after one yes, writes plain files. Git and ssh read them from then on.

In your editor and agent

VS CODE

Extension

Shows the identity in the status bar and Source Control, runs the setup wizard, and finds repository overrides.

code --install-extension yantrakar.gitpro

CLAUDE CODE

Plugin

Brings the commit hook, the MCP server and a skill that edits the config from plain requests and applies only after you confirm.

/plugin marketplace add Yantrakar/gitpro
/plugin install gitpro@gitpro
OTHER AGENTS

MCP server

Registers the read-only server with Cursor, Gemini or opencode. The Cursor and Gemini commit hooks are experimental.

gitpro setup --agent cursor

Main commands

Every command has --help, and the ones that read have --json. The guide has the full list.

The main gitpro commands and what each one does
CommandWhat it does
gitpro setupSets up this machine after one yes: config, SSH keys, Git and SSH files, guard and agents. It offers to find your identities in your repos. -n only shows.
gitpro whyWhich identity a repository should use, which it uses, why, and the fix. --committer and --message ask whether a commit would be blocked.
gitpro scanLists your repositories by the identity git uses. --fix removes repository overrides, --lost adds the work that is only on this machine.
gitpro keysEach SSH key and where to register it. gitpro setup creates the missing ones.
gitpro guardGit hooks that refuse a commit or push with the wrong identity.
gitpro setup --agent claudeThe hook that stops an AI agent committing as the wrong identity.
gitpro auditFinds commits made as the wrong identity or with an AI agent.
gitpro clonegit clone with the identity, SSH alias and folder the URL calls for.
gitpro scan --lostUnpushed branches, stashes and dirty trees across your repositories.
gitpro uninstallRemoves everything setup wrote. Keeps your config and SSH keys.

Done, and what comes next

Planned work has no dates, and the order may change. Ideas and requests go to GitHub issues.

Shipped

  1. 0.4.5 · 2026-10-22

    The short release announcement is plain text, and the release workflow names the releasepro version in one place.

  2. 0.4.4 · 2026-10-22

    Releases are run by releasepro, with a person's yes at each channel's gate. Each GitHub release carries its changelog section and a draft announcement.

  3. 0.4.3 · 2026-10-21

    gitpro.dev is published last, once PyPI, the Marketplace, Open VSX and the MCP Registry have the version.

  4. 0.4.2 · 2026-10-20

    A short demo in the README and on gitpro.dev. The VS Code extension on Open VSX. Hints, fixes and errors name only commands that stay in 0.5.0, such as gitpro setup and audit --fix.

  5. 0.4.1 · 2026-10-18

    gitpro why, the MCP server, gitpro keys and gitpro scan --lost mask tokens in remote URLs and in gh and glab errors. Writes are fsynced, and gitpro why reads commit trailers as the commit-msg hook does.

  6. 0.4.0 · 2026-10-16

    gitpro setup finds your identities in the repositories you already have and sets up everything in one step. One short list of commands, the same in the terminal, VS Code and MCP: why also checks a commit, scan --lost finds unpushed work, pin --remove and audit --fix. The commands they replace still work and are removed in 0.5.0.

  7. 0.3.4 · 2026-10-15

    gitpro report: a redacted bug, crash or blocked-commit report, opened as a GitHub issue only when you say yes, and --security for the private form. The draft_report MCP tool, a Report an Issue command in VS Code, and a listing in the official MCP Registry.

  8. 0.3.3 · 2026-10-15

    The gitpro icon and gitpro.dev links on PyPI and the Marketplace, and metadata for the official MCP registry. SourceHut ~user owners, and fixes from gitpro why for more remote URL forms.

  9. 0.3.2 · 2026-10-11

    VS Code Marketplace extension, with the identity in Source Control.

  10. 0.3.0 · 2026-10-09

    Guided setup. Agent operations: preflight, approved changes and recoverable apply.

  11. 0.2

    Guard hooks, audit, the MCP server, the Claude Code hook, team policy in CI, dev containers, the VS Code identity bar and lost.

  12. 0.1

    Identities by remote URL, generated git and SSH config, plan and apply.

Next

  1. PLANNED

    Agent identities: commits that record both the agent and the person it acted for.

  2. PLANNED

    A guard for instruction files: changes to AGENTS.md, CLAUDE.md, .cursorrules, MCP configs and hooks, and hidden Unicode in them.

Help with a rollout

gitpro stays free and MIT licensed. If your team wants help putting it in place, I offer paid consulting through Yantrakar AS: rolling it out across a team, identity and signing policy in CI, agent hooks and the MCP server, or adapting it to your forge.

Questions

Can I use more than one GitHub account on one computer?

Yes. Each account is an identity with its own name, email and SSH key. gitpro writes one includeIf hasconfig:remote.*.url block per identity, so git picks the identity from the repository's remote URL, and SSH offers only that identity's key. The same works for GitLab and other hosts.

Where does the configuration live?

In ~/.config/gitpro.toml, or wherever $GITPRO_CONFIG points. gitpro setup writes it for you; the guide covers the format if you prefer to edit it.

What does it change on my machine?

A block between # BEGIN gitpro and # END gitpro in ~/.gitconfig and ~/.ssh/config, one ~/.gitconfig-<id> file per identity, and the SSH host entries. Existing files are backed up first.

How do I undo it?

gitpro uninstall removes the files gitpro setup generated and the global guard hooks. Your config and SSH keys stay.

Does it send anything anywhere?

No. Commands only go online when you pass --online, and then through gh, glab or ssh. gitpro report keeps a record of the last internal error and the last 20 blocked commits on your machine, without emails, paths or repo names, and shows you a redacted draft; it opens the issue form in your browser only when you say yes.

Does anything run when I use git?

Only the guard hooks, if you install them. Otherwise git reads the config gitpro wrote, and gitpro is not involved.

Which systems does it run on?

Linux and macOS, with Git 2.36 or newer, Python 3.9 or newer and OpenSSH.