Skip to main content

YAML-config-driven GitHub repository manager

Project description

Repo Management

Declarative, YAML-driven management of GitHub repository configuration. Describe how a repo should be configured in a YAML file; repo-management reads the live state, shows you the diff, and reconciles it through the GitHub API (via PyGithub).

It is declarative and idempotent: re-running when nothing has changed does nothing. A section you don't mention is left unmanaged; a section you do declare is authoritative — it's the complete desired set, so anything on the repo not listed in it is removed.

Full documentation lives at nivintw.github.io/repo-management; the source code, issue tracker, and annotated example configs live in the nivintw/repo-management repository on GitHub.

Install

uv tool install repo-management    # or: pip install repo-management

Requires Python 3.14+. Authentication uses a GitHub token, read from $GITHUB_TOKEN (or --token). The token needs the scopes for whatever you manage (repo administration, Actions secrets, etc.).

Usage

export GITHUB_TOKEN=ghp_...

repo-management validate  -c repos.yaml   # check the YAML (no network)
repo-management plan      -c repos.yaml   # show the diff (read-only)
repo-management apply     -c repos.yaml   # reconcile (prompts before writing)

See the CLI reference for every command and flag, the config reference for the full config-file schema and every section it manages, the rulesets reference for branch/tag ruleset details, and the Projects board reference for declaratively managing a GitHub Projects v2 roadmap board and its automations. The repository's examples/ has a fully-worked base.yaml + repos.yaml pair (plus projects.yaml for a board).

Fleet automation

Beyond the CLI, the nivintw/repo-management repository — the tool's home — is itself a working deployment: a control plane that manages its author's repositories with scheduled GitHub Actions, reconciling them to config/*.yml on every push and running a central Renovate instance scoped to exactly that fleet via repo-management list-repos --format names. See Fleet automation in the docs for how the pieces fit together, and .github/workflows/docs.yml's own header comment for the reusable docs-build workflow other fleet repos call.

Development

Clone the repository, then:

uv sync                      # create the venv + install everything
uv run pytest                # tests + coverage (gate: 90%; currently 100%)
uvx prek@0.4.8 run --all-files     # the full quality gate (ruff, format, REUSE, typos, …)

Quality checks run identically locally and in CI via prek hooks: git hygiene, gitleaks, typos, rumdl, SPDX/REUSE headers, and ruff. Conventional Commits (gitmoji) are enforced at commit-msg time. A few hooks shell out to system tools prek can't bootstrap — install them locally too (most are in Homebrew): hawkeye, taplo, osv-scanner.

Publishing to PyPI

Published to PyPI on each GitHub Release via OIDC Trusted Publishing, dress-rehearsed through TestPyPI first. See .github/workflows/publish.yml's header comment for the flow and the one-time environment/Trusted-Publisher setup.

License

MIT — and REUSE-compliant.

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

repo_management-1.11.1.tar.gz (248.5 kB view details)

Uploaded Source

Built Distribution

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

repo_management-1.11.1-py3-none-any.whl (77.3 kB view details)

Uploaded Python 3

File details

Details for the file repo_management-1.11.1.tar.gz.

File metadata

  • Download URL: repo_management-1.11.1.tar.gz
  • Upload date:
  • Size: 248.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for repo_management-1.11.1.tar.gz
Algorithm Hash digest
SHA256 5f0774ff549aab9d636345751e237b305eba9d57427652b333cca723ca3f1ff5
MD5 a6a386650a42cc7f06468091366365ba
BLAKE2b-256 505f9faa1a098da3ecfd59dec9742536925bb4e25b3db34e2191385cb35d5c81

See more details on using hashes here.

File details

Details for the file repo_management-1.11.1-py3-none-any.whl.

File metadata

  • Download URL: repo_management-1.11.1-py3-none-any.whl
  • Upload date:
  • Size: 77.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for repo_management-1.11.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6de0cba5f6ea620ff259771b32a2ffb114122a77814520972b680a610ca759e1
MD5 51c1e48397f35e23bdb29f799489b4d7
BLAKE2b-256 d4610bebc5de05018751277282161db0a65562cc6d9080de71b9315637fa2b03

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