Skip to main content

Small CLIs (git-setup-remotes, git-sign-push) for fork-based OSS maintainer workflows.

Project description

git-maintainer-tools 🧰

GitHub Sponsors Patreon Buy Me a Coffee PayPal

Small CLIs for a fork-based OSS maintainer workflow.

Homepage: github.com/kevinveenbirkenbach/git-maintainer-tools

Originally extracted from s.infinito.nexus/code, where these helpers started as shell scripts under scripts/git/ before being rewritten in Python and split out as a standalone tool.

Tools 🔧

git-setup-remotes 🌐

Configures a clone for a fork-based workflow and is idempotent.

  • origin points at the canonical repository.
  • fork points at the maintainer's personal fork.
  • main tracks origin/main.
  • remote.pushDefault = fork, push.default = current so every git push and every git push -u for a new branch lands on the fork, not on the canonical repo.

Usage:

git-setup-remotes \
  --canonical git@github.com:<org>/<repo>.git \
  --fork git@github.com:<user>/<fork>.git

Both URLs may be provided via environment variables instead (CANONICAL_URL, FORK_URL). If --fork / FORK_URL is not given, the tool reuses an existing fork remote or an existing origin that does not point at canonical (clone-from-fork case).

git-sign-push 🔐

GPG-signs every unpushed commit on the current branch and pushes.

  • Refuses to run inside the Claude sandbox (where ~/.gnupg is unreadable) and when the working tree is dirty.
  • For a branch with an upstream: git push --force-with-lease after any required re-sign.
  • For a branch without upstream: git push -u <remote> where <remote> is resolved from remote.pushDefault (fallback: origin). In a repo configured by git-setup-remotes, this means new branches land on the fork.

Usage:

git-sign-push

Install 📦

From the repo checkout:

pip install .

Or for development:

pip install -e '.[dev]'

Both entry points are registered in pyproject.toml and will be on your $PATH after install.

Sandbox 🏜️

Both CLIs refuse to run when CLAUDE_CODE or CLAUDECODE is set in the environment, because the Claude sandbox blocks .git/config writes (for git-setup-remotes) and access to ~/.gnupg (for git-sign-push). The tools MUST be run by the human operator outside the sandbox.

Author ✍️

Kevin Veen-Birkenbach, veen.world

License 📜

Licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

git_maintainer_tools-1.0.0.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

git_maintainer_tools-1.0.0-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file git_maintainer_tools-1.0.0.tar.gz.

File metadata

  • Download URL: git_maintainer_tools-1.0.0.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for git_maintainer_tools-1.0.0.tar.gz
Algorithm Hash digest
SHA256 2be975dd5c70c05d356c6b799ac7af6eec6d5fcaaf578226b6f2899e8e66ae37
MD5 8acb5d8a8af9ae6a1dece601114d3d48
BLAKE2b-256 9ad9ead87160415cc605f652d6548a3dd27e7258db54c9072647a912eb6b633a

See more details on using hashes here.

File details

Details for the file git_maintainer_tools-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for git_maintainer_tools-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5a8c162d5b805cc5ea91f89c1f6b4f4de7c41c6ab50df6efd0205f13b90baed4
MD5 b490d3523cce2ef34596d946ee634bbb
BLAKE2b-256 73655926f57f449843327fcaded0dca4101301d176aa00044048749307ada8b3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page