FocusoftHQ / neuron-replicator

A lightweight shell-based utility to replicate code from one private GitHub repo to another.

Repository from Github https://github.comFocusoftHQ/neuron-replicatorRepository from Github https://github.comFocusoftHQ/neuron-replicator

πŸ“ neuron-replicator – GitHub Repo Sync Utility

A lightweight shell-based utility to replicate code from one private GitHub repo to another.


πŸ“¦ Folder Structure

neuron-replicator/
β”œβ”€β”€ config.json              # Define source β†’ destination repo pairs
β”œβ”€β”€ run_all.sh              # Driver script to sync all repo pairs
└── scripts/
    └── replicator.sh       # Core logic for pulling & pushing repos

βš™οΈ Setup Requirements

  • git
  • jq (sudo apt install jq or brew install jq)
  • Access to both source & destination repos via SSH or HTTPS

πŸ“„ config.json Format

[
  {
    "source": "git@github.com:your-org/source-repo-1.git",
    "destination": "git@github.com:your-org/destination-repo-1.git"
  },
  {
    "source": "git@github.com:your-org/source-repo-2.git",
    "destination": "git@github.com:your-org/destination-repo-2.git"
  }
]

πŸš€ Usage

chmod +x run_all.sh
./run_all.sh

Each sync will ask for confirmation before pushing.


πŸ“Œ Notes

  • Syncs only the main branch.
  • Uses --force push to destination.
  • Temporary files are auto-cleaned after each run.

About

A lightweight shell-based utility to replicate code from one private GitHub repo to another.

License:MIT License


Languages

Language:Shell 100.0%