Git operations, orchestrated at scale.
Cross-platform Go CLI for coordinating dozens of Git repositories in parallel, eliminating the manual overhead of managing large developer workspaces.
- Why Git Wrangler?
- Installation & Maintenance
- Quick Start
- Commands
- AI-Powered Workflows
- Safety & Guardrails
- Runtime Dependencies
- Shell Completions
- Development
Managing many related Git repositories by hand is repetitive, slow, and easy to mess up. Git Wrangler turns that workspace into one coordinated unit.
It finds repositories below your current directory and runs Git workflows across
them in one pass, with parallel execution, stable output, and safe defaults.
Use --repo PATH on repository commands when you want to target exactly one
repository instead of discovering everything below the current directory.
Remote-aware commands such as status, info, review, and history rewrite
planning refresh origin by default before inspecting remote-tracking refs.
Use --no-fetch on those commands for offline or local-only runs.
- One command, many repositories — run common Git workflows across every repo.
- Parallel execution, stable output — fast runs without chaotic terminal output.
- AI-assisted commits — generate Conventional Commit messages from diffs.
- Safer history rewrites — rewrite metadata or remove secrets with confirmations.
- GitHub workflows — clone, rename, and manage repositories through
gh. - Single binary — portable Go executable; GitHub and history workflows use standard tools like
ghandgit-filter-repo.
# macOS & Linux
brew install kaufmann-dev/tap/git-wrangler
# Windows
scoop bucket add kaufmann-dev https://github.com/kaufmann-dev/scoop-bucket.git
scoop install kaufmann-dev/git-wranglerTip
You can also install manually by downloading a standalone binary from
GitHub Releases,
extracting it, and adding it to your PATH.
You will need to manually install runtime dependencies and set up shell
completions, as these are not automatically handled like with Scoop or Homebrew
(see Runtime Dependencies and Shell Completions).
# Homebrew
brew update
brew upgrade git-wrangler
# Scoop
scoop update
scoop update git-wrangler# Homebrew
brew uninstall git-wrangler
brew untap kaufmann-dev/tap
# Scoop
scoop uninstall git-wrangler
scoop bucket rm kaufmann-dev# 1. Set up GitHub auth and AI credentials
git-wrangler init
# 2. Verify your setup
git-wrangler doctor
# 3. Check state across all repos in the current directory
git-wrangler status
# 4. See the full command list to decide what to do next
git-wrangler helpMost repository workflow commands support --guided to collect their
command-specific options interactively before execution:
git-wrangler push --guided
git-wrangler rewrite-dates --guidedGuided setup requires both stdin and stderr to be terminals, prints the selected
configuration to stderr, and cannot be combined with --json. Missing required
values are prompted for in a terminal and fail in noninteractive runs.
Pressing Ctrl+C or sending EOF with Ctrl+D cancels any active prompt
immediately, stops the command before further work, and exits nonzero.
On browserless machines, init prints the GitHub device code and verification
URL so authorization can be completed in a browser on another device. On
machines without an available keyring, configure credentials through environment
variables before running Git Wrangler:
export GIT_WRANGLER_GITHUB_TOKEN=...
export GIT_WRANGLER_AI_API_KEY=...
# OpenAI API keys may also use the provider-specific fallback:
export OPENAI_API_KEY=...Git Wrangler does not resolve GitHub credentials from an inbound GH_TOKEN.
It sets GH_TOKEN only when passing its own resolved credential to child gh
processes.
| Command | What it does |
|---|---|
clone |
Clone multiple GitHub repositories for a user or org. |
fetch |
Fetch origin updates. Use --prune to prune stale refs. |
pull |
Pull latest changes for every discovered repository. |
push |
Push local commits to origin. --force uses lease-based. |
rename-repo |
Rename GitHub repositories through gh. |
| Command | What it does |
|---|---|
commit |
Generate and create one AI Conventional Commit per repo. |
fix-gitignore |
Add missing common generated-file patterns to .gitignore. |
license |
Add or replace MIT license files. |
rename-branch |
Rename a branch across repositories. |
reset |
Reset current branches to their origin counterparts. |
review |
Review unpushed changes across repositories. |
untrack |
Stop tracking files already covered by .gitignore. |
| Command | What it does |
|---|---|
remove-secrets |
Purge sensitive files from Git history. |
rewrite-authors |
Rewrite author and committer identity. |
rewrite-commits |
Generate AI Conventional Commit messages, then rewrite history. |
rewrite-dates |
Redistribute commit timestamps or roll back rewritten history. |
| Command | What it does |
|---|---|
activity |
Show an aggregated commit activity calendar. |
config |
Show and edit Git Wrangler configuration. |
doctor |
Check runtime dependencies and local configuration. |
info |
Show detailed repository information. |
init |
Set up GitHub and AI credentials. |
status |
Show clean, dirty, ahead, behind, and remote state. |
version |
Print version metadata. |
completion |
Generate shell completion scripts. |
help |
Show help for Git Wrangler or a specific command. |
commit and rewrite-commits use any OpenAI-compatible chat completions
API to generate Conventional Commit messages from your diffs.
# Set up credentials
git-wrangler init
# Or configure directly
git-wrangler config set ai.base-url https://api.openai.com/v1
git-wrangler config set ai.model gpt-4o
git-wrangler config set ai.api-key
# Optional gateway headers
git-wrangler config set ai.headers.X-Project-ID corp-dev-99
git-wrangler config set ai.headers.api-keyGit Wrangler is built for bulk Git operations, where small mistakes can affect many repositories at once. Destructive actions are therefore explicit, guarded, and designed to fail safely.
- Privacy by default — AI commands redact diff content before sending it to the API, including sensitive file contents and common secret patterns. Old commit messages are not sent as context.
- AI confirmation before staging —
commitprepares context with a temporary index and stages the real index only after valid AI messages are available. - Confirmation before mutation — history rewrite commands ask before making
destructive changes. Noninteractive runs that reach a confirmation fail with
guidance to pass
--yes. Use--yesor-yonly for intentional noninteractive runs; they skip confirmations but never fill required values. - Safer force pushes —
push --forceuses--force-with-lease. Raw force push requires the separate--force-unsafeflag. - Fail-safe bulk runs — per-repository failures do not stop the whole run. Git Wrangler reports all failures and exits nonzero if anything failed.
- Fresh remote-tracking refs — remote-aware reports and history rewrite
planning run
git fetch --prune originby default, with--no-fetchfor explicit offline/local-only runs. - Origin preservation — history rewrite commands that use
git-filter-reporestore theoriginremote after it is removed. - Exact date rollback —
rewrite-dates --rollbackrestores the first stored original baseline from backup refs, even after repeated rewrites, replaying only new commits made after that baseline. - Warnings on stderr — destructive operations warn clearly without polluting normal command output.
| Tool | Required for |
|---|---|
git |
All repository operations (required). |
gh |
GitHub operations: clone, rename-repo. |
git-filter-repo |
History rewrites: remove-secrets, rewrite-authors, rewrite-commits, and normal rewrite-dates. |
Run git-wrangler doctor to check what's available on your system.
Homebrew and Scoop install completions automatically. For manual installs:
# Bash
git-wrangler completion bash > /etc/bash_completion.d/git-wrangler
# Zsh
git-wrangler completion zsh > "${fpath[1]}/_git-wrangler"
# Fish
git-wrangler completion fish > ~/.config/fish/completions/git-wrangler.fish
# PowerShell
git-wrangler completion powershell > git-wrangler.ps1Install the local development build without using Homebrew:
scripts/install-devThe script installs git-wrangler with go install and defaults GOBIN to
~/.local/bin. Put that directory before Homebrew on your PATH:
export PATH="$HOME/.local/bin:$PATH"Run local checks before opening changes:
scripts/test
scripts/checkAfter making changes, run the script again and test the command normally:
scripts/install-dev
git-wrangler version
scripts/test