Dracon Sync automatically commits changes in selected Git repositories and can push those commits to an existing remote and optional mirrors. Run it once or keep it running in the background. Commit messages summarize the diff using file names and counts. Authenticated destinations use your Git credentials.
Use it for workspaces where frequent local commits are useful, such as personal projects, notes, or agent-assisted development. Start with a single repository you control. Enable automatic pushes once you have reviewed what your policy commits. A push publishes to everyone who can access the destination.
On Linux, install with Cargo using Rust 1.89 or newer and make sure Git and the
Cargo bin directory are on your PATH.
cargo install dracon-sync
dracon-sync --versionTo build from source, clone this repository and run cargo build --release --locked
from its root. The standalone build puts the binary at target/release/dracon-sync.
-
Choose an existing checkout with a commit and a configured Git author (
user.nameanduser.email). Make a small edit to a tracked file. -
Create the policy directory and open the policy. If you already use Dracon Sync, set
DRACON_SYNC_POLICYto a separate file before trying the example.mkdir -p "$HOME/.dracon/utilities/sync" dracon-sync config edit -
Save this TOML, substituting the absolute path to your checkout. The example stages eligible tracked changes and commits locally. Review anything already in the index as well. It keeps pulls, pushes, new-file auto-staging, and extra repository automation off while you get started.
watch_roots = ["/home/you/projects/sync-sandbox"] auto_commit = true auto_stage_untracked = false auto_pull = false auto_push = false auto_github_private = false auto_bump_versions = false auto_tag = false auto_harden_with_warden = false standard_files_auto = false auto_repair_concerns = false auto_repair_warns = false auto_rewrite_large_blobs = false auto_resolve_unmerged = false build_artifact_cleanup = false
-
Check the policy and the repositories it discovers, then run a targeted sync and inspect the commit.
dracon-sync config validate dracon-sync status dracon-sync repos --summary git -C /home/you/projects/sync-sandbox diff --stat HEAD dracon-sync sync-now /home/you/projects/sync-sandbox git -C /home/you/projects/sync-sandbox show --stat HEAD
Use
dracon-sync onceto process all repositories in the configured scope. Usedracon-sync daemonto run continuously in the foreground. Stop the foreground process with Ctrl+C.
Set up origin and its upstream branch with Git first. Check the exact
destination with git remote -v, authenticate using an SSH agent or credential
helper available to the process, and add the owner to the policy's trusted
remote host/account list. Set auto_push = true in the existing policy and
validate it again.
auto_push = true
trusted_remote_hosts = ["github.com/your-account"]Use your actual host and account. A checkout under a watch root is in scope
for commits. Pushes to its origin also check the trusted host/account.
Use dracon-sync ownership --repo /path/to/repo --explain to see the ownership
signals if the destination is skipped.
For a second copy, create a destination repository and append a
[[remotes]] table. In this example, {repo} expands to the local checkout's
directory name.
[[remotes]]
name = "gitlab"
push_url = "git@gitlab.com:your-account/{repo}.git"
auth_type = "gitlab"
auto_create = falseGitHub, GitLab, Codeberg, and generic Git transports are available. Begin with one destination and confirm a push before adding mirrors. Keep destination credentials out of repository files. Review the annotated policy example before enabling repository creation, automatic repairs, version bumps, or other optional automation.
watch_rootsare scanned recursively. Useexclude_reposto leave specific checkouts out andexclude_dir_namesto skip discovery in generated trees.- Use
.gitignorefor local files that should stay untracked. Withauto_stage_untracked = true, eligible new files can join an automatic commit. Review scratch output, secrets, databases, and generated assets before enabling it. - Use
untracked_exclude_patternsfor additional exclusions on new files. Useauto_commit_exclude_patternsfor paths the daemon should skip even when they are already tracked. - Put per-repository settings in
.dracon/dracon-sync.tomlat the checkout root. Setowned = falsethere to opt a checkout out of auto-commit and auto-push.
The usual policy path is ~/.dracon/utilities/sync/dracon-sync.toml.
DRACON_SYNC_POLICY selects a different file, and dracon-sync status prints
the resolved path and scope.
| Command | Use it to |
|---|---|
dracon-sync repos |
See each repository's sync state, changes, upstream difference, and latest push result. |
dracon-sync repos --summary |
Scan the fleet for work or issues. |
dracon-sync repos <name> |
Inspect one repository's current evidence and hints. |
dracon-sync repos --legend |
Look up a column or symbol. |
dracon-sync repos --json |
Consume the report from a script. |
dracon-sync health |
Check policy and daemon health. |
Read STATUS for what sync is doing now and PUSH for the latest observed push outcome. A repo can be working on newer edits after a successful push. A/B shows commits ahead of or behind the configured upstream. If a row stays queued, retrying, or blocked, open its detail view. Check authentication, branch protection, or a failing Git hook before retrying.
After testing the daemon in the foreground, save this example as
~/.config/systemd/user/dracon-sync.service. Adjust the executable and
PATH for your installation. A service needs access to your watch roots,
Git credentials, and any helpers called by repository hooks.
[Unit]
Description=Dracon Sync
[Service]
ExecStart=%h/.cargo/bin/dracon-sync daemon
Environment=PATH=%h/.local/bin:%h/.cargo/bin:/usr/local/bin:/usr/bin:/bin
Environment=GIT_TERMINAL_PROMPT=0
Restart=on-failure
RestartSec=5
[Install]
WantedBy=default.targetsystemctl --user daemon-reload
systemctl --user enable --now dracon-sync.service
journalctl --user -u dracon-sync.service -fUse dracon-sync pause and dracon-sync resume for a temporary pause. Use
dracon-sync maintenance -- <command> to keep sync paused while a maintenance
command runs. Restart the service after changing its unit file or environment.
GIT SIZE reports local Git object storage, with a separate nested size where available. A checkout also uses disk space for its worktree, LFS cache, and temporary staging spools. Those are useful places to measure when disk space is tight.
dracon-sync repos <name> --deep
dracon-sync repair spools --repo /path/to/repoThe spool command previews reclaimable staging data. Add --apply only after
reviewing the preview. Reclamation rechecks that the spool is inactive and
its contents are already preserved. For large generated assets, use explicit
Git LFS rules and verify retrieval from a fresh cache. New rules affect
future commits. Shrinking existing Git history requires a separate migration.
- Architecture and invariants
- Repository health and evidence
- External storage planning and experimental operations
- Security policy
Licensed under AGPL-3.0-only.