$ show ChappIO/git-backup
git-backup is a CLI tool written in Go that backs up all Git repositories from GitHub and GitHub Enterprise (including GitLab) to local storage. It uses the go-git library to perform bare or non-bare clones without requiring the git CLI. The configuration is driven by a YAML file that supports Go templating for environment variable injection. The tool discovers repositories via the provider APIs using configurable filters (owned, starred, collaborator, org member) and excludes specific repos or namespaces. Pagination is handled automatically. It supports Docker deployment with UID/GID mapping. The code is well-structured with clear separation of providers (GitHub, GitLab) behind a common RepositorySource interface. It is a focused, standalone backup solution that does not require external dependencies beyond the binary itself.
The LLM identified 1 files worth highlighting for reuse:
Provides a generic YAML config loader that renders Go templates before parsing, enabling environment variable interpolation. The 'parse' function uses a custom template.FuncMap with an 'env' function. This pattern is reusable for any Go application needing a config file with dynamic values from the environment. The function is self-contained, parameterized, and does not import internal packages beyond the standard library and yaml.v3.