repoutils
Repository tooling for Python projects that use uv, just and GitHub Actions, run as repoutils <command>.
It collects the checks and CI helpers that used to live in the scripts/ directories of taxtracker and exolot, so each project can depend on one package instead of keeping its own copies.
repoutils needs only the Python standard library (3.12 or later), and has no dependencies. That's deliberate: projects run it in CI jobs that hold write-capable tokens or check out untrusted Dependabot branches, where nothing else should be installed.
Installing
Add it to its own dependency group, and include that group in dev:
[dependency-groups]
repoutils = ["repoutils>=0.1.0"]
dev = [{ include-group = "repoutils" }, "pytest>=9"]
Then run a command with uv run repoutils <command>.
In a job with a write-capable token, use uv run --only-group repoutils repoutils <command>, which installs only repoutils (hash-checked against uv.lock) and not the project or its other dependencies.
Commands
Run repoutils --help for the list, and repoutils <command> --help for a command's options.
| Command | What it does |
|---|---|
check-whitespace |
Fails on trailing whitespace, a leading blank line or a missing or extra final newline in any Git-tracked text file. |
check-sentence-per-line |
Fails if a configured Markdown file (by default AGENTS.md and README.md) has two sentences on one line. |
check-blame-ignore-revs |
Fails unless .git-blame-ignore-revs lists only full hashes of commits that are ancestors of a target. |
check-screenshots-dir |
Fails unless the screenshots directory's .gitignore is the only file tracked there, and still ignores everything else. |
git-config-setup |
Sets the repo's local blame.ignoreRevsFile; idempotent, for a justfile to run on every recipe. |
long-files |
Lists the files over a line limit as Markdown, changed files first, or posts that to a PR. |
check-pins |
Fails unless every setup-uv and setup-just step pins the versions pyproject.toml and the justfile require. |
check-checkout-credentials |
Fails on any actions/checkout step that doesn't set persist-credentials. |
claude-route |
Prints review, other or none for a comment on stdin, for routing between the Claude workflows. |
requirements-min-versions |
Checks or fixes pyproject.toml's >= minimums against the versions in uv.lock. |
dependabot-relock |
Re-locks a Dependabot branch's uv.lock with this uv, to exactly Dependabot's versions. |
check-lock-platforms |
Fails if uv.lock has wheels for platforms the project doesn't allow. |
post-comment |
Posts a Markdown file to a PR, editing the earlier comment or hiding it with --hide-previous. |
post-patch-coverage |
Posts diff-cover's Markdown patch coverage report to a PR, reformatted. |
wait-for-base-coverage |
Waits for Codecov to have a PR base commit's coverage, so the PR's comparison works. |
post-screenshots |
Uploads a directory of PNGs and posts them to a PR as a comment. |
recreate-pr |
Recreates a PR as a draft from the same branch and closes the original. |
check-attestations |
Fails unless every distribution in dist/ has a PEP 740 publish attestation. |
The commands that post to a PR read $GITHUB_TOKEN, falling back to gh auth token.
Configuration
Every setting is optional, and lives in the project's pyproject.toml:
[tool.repoutils]
# Prefix of the hidden markers that find this project's PR comments,
# e.g. <!-- repoutils-patch-coverage -->.
comment-prefix = "repoutils"
# Compared with when there's no PR base.
default-branch = "main"
[tool.repoutils.sentence-per-line]
files = ["AGENTS.md", "README.md"]
[tool.repoutils.screenshots]
dir = "screenshots"
[tool.repoutils.lock-platforms]
# "os" allows any arch; "os:arch" one ("*" for any). "linux" matches manylinux and musllinux.
supported = ["any", "linux:x86_64", "linux:aarch64", "macosx"]
tolerated = ["ios", "pyemscripten"]
[tool.repoutils.long-files]
include = ["*.py"]
exclude = ["*/migrations/*"]
limit = 500
limits = { "tests/*" = 700 }
policy = "Split a long file only where that makes the code better."
Development
See AGENTS.md.
Metadata
Release files for repoutils 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| repoutils-0.1.0.tar.gz | 113.8 kB | With provenance | Details for repoutils-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| repoutils-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for repoutils-0.1.0-py3-none-any.whl |
Total release size: 165.5 kB
Release files / repoutils-0.1.0.tar.gz
| Download URL | repoutils-0.1.0.tar.gz |
|---|---|
| Size | 113.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8a9e167f0ff7ce82235d80dc771819c4f0e6b08871660e10df1995858afa8a79
|
|
BLAKE2b-256 checksum How to use checksums |
17d3bea47192417be963e03e938104032bef7ad72c444510dc91454eeac4aa8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logRelease files / repoutils-0.1.0-py3-none-any.whl
| Download URL | repoutils-0.1.0-py3-none-any.whl |
|---|---|
| Size | 51.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f5c85b8014d9af3953b1cd85e557f7f7abcbdcb4ef41e92d1d46ee239edbbcdc
|
|
BLAKE2b-256 checksum How to use checksums |
2aae24c3e082c1fa69d548d50106366dea1026ec62b60ac1733d6ef3e6cb2b9f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logSecurity for repoutils 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for repoutils-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.