OPEN SOURCE · MIT · v0.3.2

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 plan shows every change as a diff before anything is written.

  • 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

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 agent install or the plugin. It only denies; it never grants anything.

  • MCP

    A read-only MCP server, gitpro mcp, so an agent can ask which identity a repository uses and why.

  • APPROVAL

    Changes an agent proposes wait for your approval, and an interrupted apply can be recovered.

  • AUDIT

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

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. The wizard asks for identities, hosts, owners and existing SSH keys. Nothing is applied yet.
  3. Look, then apply. gitpro plan shows every change; gitpro apply -y writes it.
  4. Ask a repository. gitpro why shows the identity it should use, the one it uses, and the fix if they differ.
$ pipx install gitpro
$ gitpro setup --write
$ gitpro plan
$ gitpro apply -y
$ gitpro why
FIG. 04SETUP
Setup in four steps gitpro setup asks a few questions and saves ~/.config/gitpro.toml. gitpro plan previews every change. gitpro apply 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 --write gitpro.toml ~/.config gitpro plan preview only gitpro apply -y ~/.gitconfig marked block per identity ~/.gitconfig-<id> ~/.ssh/config key per host git, ssh read these Setup in four steps gitpro setup asks a few questions and saves ~/.config/gitpro.toml. gitpro plan previews every change. gitpro apply 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 --write gitpro.toml ~/.config gitpro plan preview only gitpro apply -y ~/.gitconfig marked block per identity ~/.gitconfig-<id> ~/.ssh/config key per host git, ssh read these
Setup saves a config and applies nothing. Plan previews, apply writes plain files, and git reads 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 mcp install --agent cursor -y

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 setupGuided, offline configuration. Keeps existing settings and backs up the file. Applies nothing.
gitpro planShows what apply would change, as diffs.
gitpro applyWrites the git and SSH config. Previews by default; -y writes.
gitpro whyWhich identity a repository should use, which it uses, why, and the fix.
gitpro scanLists your repositories by the identity git uses. --fix removes repository overrides.
gitpro keysEach SSH key and where to register it. --generate creates the missing ones.
gitpro guard installGit hooks that refuse a commit or push with the wrong identity.
gitpro agent installThe 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 lostUnpushed branches, stashes and dirty trees across your repositories.
gitpro uninstallRemoves everything apply 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.3.2 · 2026-10-11

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

  2. 0.3 · 2026-10-09

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

  3. 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.

  4. 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

    Scoped grants that expire, so an agent can be allowed one kind of change for a limited time.

  3. PLANNED

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

  4. PLANNED

    Handoff and review of risky agent steps, with the agent's stated intent attached.

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

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 everything apply wrote 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.

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.