Skip to main content

Organisation Logo

GitHub Repository Sync

GitHub Repository Sync clones and fast-forwards the GitHub repositories listed in one YAML, JSON, or JSON5 configuration file.

Missing repositories are cloned. An existing repository is inspected first and fast-forwarded only when that update is safe.

Features

  • Safe repository inspection before synchronisation.
  • Automatic cloning of missing repositories.
  • Fast-forward updates where safe.
  • Protection against repositories with unsafe local states.
  • Support for HTTPS and SSH clone protocols.
  • YAML, JSON, or JSON5 configuration. A repository that omits clone_protocol uses config.clone_protocol.
  • Multiple GitHub organisation support.
  • Organisation and repository aliases.
  • Relative path organisation aliases for multiple local trees under one clone_path.
  • Configurable repository destinations.
  • Concurrent clone, update, and status checks (--workers, default: CPU count).
  • Ordered per-repository output (alphabetical by GitHub name after load, even when work runs in parallel).
  • Rich console output with progress reporting.
  • Compact configuration validation.
  • Synchronisation plan preview.
  • Detailed synchronisation result tables.
  • Cross-platform support for macOS, Linux, and Windows.
  • Suitable for interactive use, automation, and scheduled execution.

Installation

Install the latest release from PyPI.

pip install lupaxa-github-repo-sync

Verify the installation.

grs --version

or

github-repo-sync --version

The shorter grs command is used throughout the remainder of this document.

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

  - name: lupaxa-gh-toolbox
    alias: Lupaxa/GitHubToolbox
    repositories:
      - name: github-repo-sync

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 (for example Lupaxa/TheLupaxaProject). Repository aliases must remain a single directory name.

Validate the configuration.

grs --validate

Review the synchronisation plan.

grs --plan

Synchronise your repositories.

grs

Command-Line Interface

GitHub Repository Sync uses a simple flat command-line interface.

Repository synchronisation is the default operation. Use --validate or --plan to inspect configuration without modifying repositories. Use --status to audit repository cleanliness without changing working trees, branches, or commits (online mode may fetch remote-tracking refs).

Operating Modes

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 clean, synchronised state (may fetch tracking refs).

Configuration

Option Description
-c FILE, --config FILE Use the specified YAML, JSON, or JSON5 configuration file.

Note: If --config is not specified, the application looks for a default configuration file in the user's home directory. It accepts YAML, JSON, or JSON5 (.github-repo-sync.yaml, then .yml, then .json, then .json5).

Presentation

Option Description
--no-header Do not display the application header.
--no-colour, --no-color Disable coloured console output.
--console-width COLUMNS Set the console width. Values are clamped to 80-300. The default is 180.
--version Display the application version.

Status Check

Option Description
--ignore-clean With --status, omit fully clean repositories from per-repo output.
--offline With --status, skip fetching remotes; use existing tracking refs.

Concurrency

Option Description
--workers N Process this many repositories at once for sync and --status (default: CPU count). Output is alphabetical by GitHub name after load.

Synchronisation

Option Description
--recover-rewritten-history Synchronisation only. Reset a clean local branch onto rewritten remote history. A dirty tree is still skipped.

Rejected with --validate, --plan, or --status. Without this flag, rewritten history is skipped.

Synchronisation Output

These options apply to a synchronisation run. They are ignored for --validate and --plan.

Option Description
--no-configuration Do not display the configuration summary.
--no-progress Disable the repository progress display.
--no-repository-output Suppress per-repository status messages.
--results-table Display the detailed repository results table.
--no-failure-table Do not display the failure table.
--no-summary-table Do not display the Rich summary table.

Examples

Validate a configuration file.

grs --validate

Validate a different configuration file.

grs --config repositories.yaml --validate

Display the synchronisation plan.

grs --plan

Check repository cleanliness and upstream synchronisation.

grs --status
grs --status --ignore-clean --offline

Synchronise repositories using the default configuration.

grs

Reset clean local clones after a remote history rewrite (git-reset-history).

grs --recover-rewritten-history

Synchronise with a specific number of concurrent workers.

grs --workers 8

Synchronise repositories using an alternative configuration.

grs --config work.yaml

Synchronise repositories without displaying progress.

grs --no-progress

Display the detailed repository results table after synchronisation.

grs --results-table

Run quietly without displaying the configuration summary.

grs --no-configuration --no-progress

Documentation

Online documentation:

https://github-repo-sync.thelupaxaproject.org/

Serve the docs locally:

make init
make python-install-dev
make mkdocs-serve

Development

Install makefile skills, then the development extra:

make init
make python-install-dev

Lint, type-check, and test:

make python-check
The Lupaxa Project Footer

Metadata

Release files for lupaxa-github-repo-sync 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lupaxa-github-repo-sync 0.1.5
File Size Uploaded
lupaxa_github_repo_sync-0.1.5.tar.gz 47.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lupaxa-github-repo-sync 0.1.5
File Interpreter ABI Platform
lupaxa_github_repo_sync-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 93.4 kB

Release files / lupaxa_github_repo_sync-0.1.5.tar.gz

Download URL lupaxa_github_repo_sync-0.1.5.tar.gz
Size 47.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2f638fe378d83aa3e6ede2b5d54299ab0fc5765482e8e8829b193fe852a7b7fc
BLAKE2b-256 checksum
How to use checksums
9899c603aa1c5139365c808069cbe97123c6d280f2d3211d45b884b46fbe66f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 24, 2026.

Transparency log

Release files / lupaxa_github_repo_sync-0.1.5-py3-none-any.whl

Download URL lupaxa_github_repo_sync-0.1.5-py3-none-any.whl
Size 46.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0e289c00b2a1f692a013487d2815920fadf8e058349bf47e40a69cab1753f814
BLAKE2b-256 checksum
How to use checksums
a6cf1606dab25f5b2d32b2e6e21d1de02259d3b7f9f561044f2164e18e0caa9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 24, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.7

2 release files

0.1.6

2 release files

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release 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