Back to collection

All your repos.
Cloned and current.

Clones all your GitHub repos into ~/Developer and keeps them updated. Interactive menu lets you sync by platform, pick specific repos, or grab everything. Already-cloned repos get pulled — idempotent and safe to run anytime.

Auto-detects your GitHub username. Filters repos by platform topic.

Shell Script PowerShell macOS Windows MIT License

What It's For

If you have repos scattered across machines or need to set up a fresh system, this gets everything in one place.

💻

New Machine Setup

Clone all your repos at once instead of remembering each one. Perfect after a fresh OS install or setting up a new dev machine.

🔄

Keep Repos Current

Run it periodically to pull updates for all your repos. Already-cloned repos are checked against remote — only updated if behind.

🌎

Platform-Aware

Tag repos with GitHub topics (macos, windows, cross-platform) and the script only syncs what belongs on the current OS.

How to Use

Four ways to run it — pick the one that fits your workflow.

macOS — Terminal

Shell Script

Run directly from Terminal.

# Clone the repository
git clone https://github.com/DJCastle/toolBox.git
cd toolBox

# Interactive clone/update
bash scripts/repo-sync/clone-repos.sh

# Report only — no changes
bash scripts/repo-sync/clone-repos.sh --check
Windows — PowerShell

PowerShell Script

Run from PowerShell.

# Clone the repository
git clone https://github.com/DJCastle/toolBox.git
cd toolBox

# Interactive clone/update
.\scripts\repo-sync\clone-repos.ps1

# Report only — no changes
.\scripts\repo-sync\clone-repos.ps1 -Check
macOS — One Click

Apple Shortcut

Import into Shortcuts.app and run with one click.

open shortcuts/repo-sync/Dev-Clone-Repos.shortcut

Requires enabling "Allow Running Scripts" in Shortcuts > Settings > Advanced. Disable after use.

Windows — One Click

Power Automate Desktop

Import the PAD flow and run with one click.

# Open the .pad file, copy contents into a new PAD flow
pad-flows/repo-sync/Dev-Clone-Repos.pad

Interactive Menu

Choose how to sync when you run the script.

1️⃣

This OS Only

Syncs repos tagged with the current platform (macos or windows) plus cross-platform. The default for most users.

2️⃣

All Repos

Syncs every repo regardless of platform tag. Useful if you want everything in one place or work across both platforms.

3️⃣

Pick from List

Shows a numbered list with platform indicators. Pick specific repos by number. Colored dots show which OS each repo targets.

Platform Filtering

Tag your repos with GitHub topics to control which repos sync on which OS.

Topic macOS Windows
macosClonedSkipped
windowsSkippedCloned
cross-platformClonedCloned
(no topic)Skipped with warningSkipped with warning
# Tag a repo for macOS
gh repo edit your-username/repo-name --add-topic macos

# Tag a repo for both platforms
gh repo edit your-username/repo-name --add-topic cross-platform

Configuration

Customize at the top of each script.

Setting Default Description
GITHUB_USERauto-detectLeave empty to detect from gh auth. Or set explicitly.
DEV_DIR~/DeveloperWhere repos are cloned.
SKIP_REPOSemptyRepos to skip (managed separately).

Features

👤

Auto-Detect Username

Automatically detects your GitHub username from gh auth. No hardcoded values — just authenticate and go.

🔒

Auth Prompt

If GitHub CLI isn't authenticated, the script offers to log you in right there. No need to run a separate command first.

📊

Check Mode

Use --check or -Check to see what's cloned, what has updates, and what's missing — without making any changes.

Requirements

gh (GitHub CLI) — installed by brew-setup.sh (macOS) or choco-setup.ps1 (Windows)
jq (macOS only) — installed by brew-setup.sh
Internet connection — to fetch repo list and clone/pull from GitHub

About

Repo Sync is part of CodeCraftedApps Toolbox, a collection of open-source automation tools for macOS and Windows. It uses standard Git operations (git clone and git pull --ff-only) — no files are modified beyond normal Git behavior. Your local changes are safe; the script won't force-push or overwrite anything.