Skip to main content

Sync selective folders from Git repositories to a target directory

Project description

syncware

A CLI tool for syncing selective folders from local Git repositories to a target directory. Think go mod vendor or npm install, but for folder-based content.

Installation

pip install syncware

Quick Start

# Initialize a new project
syncware init

# Edit syncware.yml with your repositories

# List configured folders
syncware list

# Sync folders to target
syncware sync

# Preview sync (dry run)
syncware sync --dry

# Update repos and sync
syncware update

# Generate lockfile (captures exact versions)
syncware lockfile

# Verify folders against lockfile
syncware verify

# Auto-fix drift
syncware verify --fix

Verbosity

syncware -v list      # INFO level (default)
syncware -vv list     # DEBUG level

Configuration

Create a syncware.yml file in your project root:

repos:
  - name: myrepo
    path: /path/to/local/repo
    source: path/to/folders
    folders:
      - folder1
      - folder2
      - "*"  # or all subdirectories
    target: ./output  # optional, overrides global target

target: ./output  # global target (default)

Per-Repo Target

Each repo can have its own target:

repos:
  - name: frontend
    path: ./packages/frontend
    source: dist
    folders: ["ui", "icons"]
    target: ./public/assets

  - name: backend
    path: ./packages/backend
    source: configs
    folders: ["nginx", "docker"]
    target: ./deploy/config

target: ./common/output  # used by repos without own target

Remote Repositories

You can also use remote Git URLs (GitHub, GitLab, etc.):

repos:
  - name: claude
    path: https://github.com/user/repo.git
    source: skills
    folders: ["docx", "xlsx"]

Remote repos are cloned to ~/.cache/syncware/<name> and reused on subsequent runs.

Config Fields

Field Description
repos List of source repositories
repos[].name Namespace identifier
repos[].path Local path or Git URL
repos[].source Subdirectory containing folders to sync
repos[].folders List of folder names, or "*" for all
repos[].target Per-repo destination (overrides global)
target Global destination directory

How It Works

<repo.path>/<source>/<folder> → copied to <repo.target>/<folder>
                                  or <global.target>/<folder>

Lockfile

The lockfile (syncware.lock.yml) ensures reproducible syncs:

syncware lockfile          # Generate lockfile
syncware verify           # Check for drift
syncware verify --fix     # Auto-fix drift

What gets locked:

  • Git commit hash of each source repository
  • Content hash (SHA256) of each synced folder

Verification detects:

  • DRIFT - Folder content was modified locally
  • UPDATE_AVAILABLE - Source repo has new commits
  • MISSING - Source folder was deleted

Use Cases

  • Skills/Plugins - Sync skill folders from a central repo
  • Config Management - Keep config folders in sync across machines
  • Documentation - Maintain a set of doc folders from different sources
  • Assets - Bundle asset folders from multiple repositories

Comparison

Tool Use Case
syncware Selective folder sync from local or remote repos
go mod vendor Vendor Go dependencies
npm install Install package dependencies
rsync General file/folder synchronization

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

syncware-0.0.4.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

syncware-0.0.4-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file syncware-0.0.4.tar.gz.

File metadata

  • Download URL: syncware-0.0.4.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for syncware-0.0.4.tar.gz
Algorithm Hash digest
SHA256 83e58cf4c6917967463e2769e490a4295b990f17dcb1fda329497b62d3994cd6
MD5 e917687655d1f9ae479702286ed22a0e
BLAKE2b-256 a53b757a882310e3f2f18fc76b31ecdb2de5243a504024a361b5bc321399214f

See more details on using hashes here.

File details

Details for the file syncware-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: syncware-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for syncware-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 22fa9912cec961c825bb59c9dce42c59f4be2323e34fd6daf756abb61a3b3879
MD5 cfd7792508302be234213420d27f2f04
BLAKE2b-256 d3e579d57d6bc1a92154cea16cbd1fc2101e50e14613def17096eaf2699a1036

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page