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

Development

Clone the repository and install with dev dependencies using uv:

git clone https://github.com/youruser/syncware.git
cd syncware
uv sync --group dev

This installs build, twine, and pytest for building and testing.

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

Multiple Targets

Both global and per-repo targets can specify multiple destinations:

# Global multiple targets
target: ["./output1", "./output2"]

repos:
  - name: myrepo
    path: /path/to/repo
    source: dist
    folders: ["ui", "icons"]
    # folder1 and folder2 sync to BOTH ./output1 and ./output2
# Per-repo multiple targets
repos:
  - name: frontend
    path: ./packages/frontend
    source: dist
    folders: ["ui", "icons"]
    target: ["./public/assets", "./backup/assets"]
    # ui and icons sync to BOTH ./public/assets and ./backup/assets

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 (string or list, overrides global)
target Global destination directory (string or list)

How It Works

<repo.path>/<source>/<folder> → copied to <repo.target>/<folder>
                                  or <global.target>/<folder>
                                  (or to ALL targets if multiple)

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.5.tar.gz (8.3 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.5-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: syncware-0.0.5.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","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.5.tar.gz
Algorithm Hash digest
SHA256 9d46610cc401913f5b5c04ff1995fbc10d5cb7b6d98dc9edba02f169c138eed3
MD5 8026caaad1da6630fe59e0fbe3b5ea52
BLAKE2b-256 2a8d5f2b3bca928b768f23fac53da3a0a34943d9558c00fc21c3bcf9e91ec13e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: syncware-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 6ecad60dbc3513ab92136c38fcc64d976b53b2202f8ff0589041900fca0b9913
MD5 1e5b8793a1a332d15462ec1267c0d988
BLAKE2b-256 ba2a61e4fcd50d0c083de2738a63e2d90127e1d48ab6a84006ae33eb83ed4fc8

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