/install git-sync-daemon
Git Sync Daemon
Purpose
Provide a reusable, daemon-based git auto-sync workflow:
- one repo list file
- one daemon process
- per-repo lock and independent failure isolation
- service management on macOS and Linux
Files
- Engine:
scripts/git_sync_daemon.sh - Control CLI:
scripts/git_sync_ctl.sh
Default Runtime Paths
- State dir:
~/.config/git-sync-daemon - Repo list:
~/.config/git-sync-daemon/repos.conf - Log file:
~/.config/git-sync-daemon/git-sync-daemon.log
Repo Entry Format
One line per repo:
/absolute/path/to/repo|remote=origin|branch=main|enabled=1
Supported keys:
remote(defaultorigin)branch(default current branch)enabled(1/0,true/false, default enabled)
Quick Start (macOS)
bash scripts/git_sync_ctl.sh init
bash scripts/git_sync_ctl.sh add-repo /Users/samwei12/Develop/config
bash scripts/git_sync_ctl.sh run-once
bash scripts/git_sync_ctl.sh install-launchd
bash scripts/git_sync_ctl.sh status
Quick Start (Linux)
bash scripts/git_sync_ctl.sh init
bash scripts/git_sync_ctl.sh add-repo /path/to/repo
bash scripts/git_sync_ctl.sh run-once
sudo bash scripts/git_sync_ctl.sh install-systemd
bash scripts/git_sync_ctl.sh status
Operations
- Add repo:
bash scripts/git_sync_ctl.sh add-repo \x3Cpath> [branch] [remote] - Remove repo:
bash scripts/git_sync_ctl.sh remove-repo \x3Cpath> - List repos:
bash scripts/git_sync_ctl.sh list-repos - One cycle now:
bash scripts/git_sync_ctl.sh run-once - Status/log tail:
bash scripts/git_sync_ctl.sh status
Service lifecycle:
- macOS install:
bash scripts/git_sync_ctl.sh install-launchd - macOS uninstall:
bash scripts/git_sync_ctl.sh uninstall-launchd - Linux install:
sudo bash scripts/git_sync_ctl.sh install-systemd - Linux uninstall:
sudo bash scripts/git_sync_ctl.sh uninstall-systemd
Production hardening checklist
Before enabling daemon mode in production:
- SSH/auth baseline
- Ensure service user can run non-interactive git over SSH to each remote.
- Preload host keys (
ssh-keyscan/StrictHostKeyChecking=accept-new) to avoid first-run failures. - Prefer explicit key routing in
~/.ssh/config(host/user/port/IdentityFile/IdentitiesOnly).
- Service identity consistency
- Install service with the same user that owns repo credentials and git config.
- Verify
git config --global user.name/user.emailfor that service user.
- Repo registration policy
- Register only clean, intended repos.
- Keep one canonical branch per repo entry; avoid detached HEAD targets.
- Use
enabled=0for temporary pauses instead of deleting lines.
- Observability
- Keep logs in dedicated file and rotate externally if needed.
- Validate
run-oncebefore enabling persistent service.
Safety Notes
- The daemon does not force-push.
- Rebase conflicts are logged and isolated to the affected repo.
- If
git-lfsis required by hooks but missing, that repo is skipped with explicit error log. - On macOS launchd, PATH is expanded in both service env and daemon script to include Homebrew binaries.
- Recommended migration practice: first successful run should use baseline repos only; then gradually add more repos.
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install git-sync-daemon - After installation, invoke the skill by name or use
/git-sync-daemon - Provide required inputs per the skill's parameter spec and get structured output
What is Git Sync Daemon?
Manage multiple git repositories with a daemon model (periodic add/commit/pull/push). Use this skill when you need to set up, run, or troubleshoot automated... It is an AI Agent Skill for Claude Code / OpenClaw, with 287 downloads so far.
How do I install Git Sync Daemon?
Run "/install git-sync-daemon" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Git Sync Daemon free?
Yes, Git Sync Daemon is completely free (open-source). You can download, install and use it at no cost.
Which platforms does Git Sync Daemon support?
Git Sync Daemon is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Git Sync Daemon?
It is built and maintained by samwei12 (@samwei12); the current version is v1.0.0.