Skip to main content

Project Logo

The Lupaxa GitHub Toolbox
Part of The Lupaxa Project


lupaxa-github-repo-sync

A command-line application that clones, organises, and safely synchronises large collections of GitHub repositories from a single declarative YAML, JSON, or JSON5 configuration.

Unlike many repository synchronisation tools, it does not assume every repository can be updated automatically. Each repository is inspected before any Git operation, so only repositories in a safe state are modified.

Features

  • Safe repository inspection before synchronisation
  • Automatic cloning of missing repositories
  • Fast-forward updates where safe
  • Protection against unsafe local states
  • HTTPS and SSH clone protocols
  • YAML, JSON, or JSON5 configuration with inherited defaults
  • Multiple GitHub organisations, aliases, and destination paths
  • Concurrent clone, update, and status checks (--workers, default: CPU count)
  • Ordered per-repository output (alphabetical by GitHub name after load)
  • Rich console output with progress reporting
  • Configuration validation and synchronisation plan preview
  • Status check (optional fetch of tracking refs)
  • Transient GitHub SSH retries during bulk sync
  • Cross-platform: macOS, Linux, and Windows

Installation

From PyPI

pip install lupaxa-github-repo-sync

Verify the installation:

grs --version

or:

github-repo-sync --version

The shorter grs command is used in the examples below.

From source (development mode)

pip install -e ".[dev]"

Quick Start

Create ~/.github-repo-sync.yaml:

config:
  clone_path: ~/Desktop/GitMaster
  clone_protocol: ssh

organisations:
  - name: the-lupaxa-project
    alias: Lupaxa/TheLupaxaProject
    repositories:
      - name: .github
        alias: github
      - name: workflows
      - name: brand-assets

Local layout resolves to clone_path/<organisation-alias>/<repository-alias-or-name>.

Organisation aliases may be a single directory name or a relative path under clone_path. Repository aliases must remain a single directory name.

If --config is not specified, the application looks for ~/.github-repo-sync.yaml, then .yml, then .json, then .json5. Config files may be YAML, JSON, or JSON5.

Validate the configuration:

grs --validate

Review the synchronisation plan:

grs --plan

Synchronise your repositories:

grs

Command-Line Interface

Synchronisation is the default operation.

Command Description
grs Synchronise all configured repositories.
grs --validate Validate the configuration and exit.
grs --plan Display the resolved synchronisation plan and exit.
grs --status Check repositories for a clean, synchronised state (may fetch tracking refs).

Use -c FILE / --config FILE to point at a different YAML, JSON, or JSON5 file.

grs --config work.yaml --validate
grs --status --ignore-clean --offline
grs --recover-rewritten-history
grs --workers 8
grs --results-table

Documentation

Online documentation:

Documentation

Serve the docs locally:

mkdocs serve

Then open the local URL printed by MkDocs in your browser.

Development

Clone the repository and install development dependencies:

pip install -e ".[dev]"

Useful make targets:

make test   # run tests
make type   # type checking (mypy)
make check  # lint, type check, and tests
The Lupaxa Project Footer

Download files

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

Source Distribution

lupaxa_github_repo_sync-0.1.3.tar.gz (47.4 kB view details)

Uploaded Source

Built Distribution

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

lupaxa_github_repo_sync-0.1.3-py3-none-any.whl (45.1 kB view details)

Uploaded Python 3

File details

Details for the file lupaxa_github_repo_sync-0.1.3.tar.gz.

File metadata

  • Download URL: lupaxa_github_repo_sync-0.1.3.tar.gz
  • Upload date:
  • Size: 47.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for lupaxa_github_repo_sync-0.1.3.tar.gz
Algorithm Hash digest
SHA256 f5a7edd99829b75410bdea08dc6ae2be4c83774608470e4a8e816fc92a542ae8
MD5 31aa7db55e28e2b9a43089cf35016987
BLAKE2b-256 0c08d3e7a2bb4b3d67d5e90cc82dc4592abc73fc36ebb5fb8f01ad5a455e971a

See more details on using hashes here.

Provenance

The following attestation bundles were made for lupaxa_github_repo_sync-0.1.3.tar.gz:

Publisher: generate-release.yml on lupaxa-gh-toolbox/github-repo-sync

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lupaxa_github_repo_sync-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for lupaxa_github_repo_sync-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 28cd1a19d4b2734b5936765b502a3fa81455cce97f1fff9a0cc5a87c182e79da
MD5 628337116c3bba95c22e156ec326f46b
BLAKE2b-256 9ac86c64563d96deb20f6ada50ad9b48aa1021ea0879e1daf4d23252d7499778

See more details on using hashes here.

Provenance

The following attestation bundles were made for lupaxa_github_repo_sync-0.1.3-py3-none-any.whl:

Publisher: generate-release.yml on lupaxa-gh-toolbox/github-repo-sync

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page