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.yaml 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.yaml 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.yaml) 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.3.tar.gz (7.7 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.3-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: syncware-0.0.3.tar.gz
  • Upload date:
  • Size: 7.7 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.3.tar.gz
Algorithm Hash digest
SHA256 9a4e283103c9717ecb5cba2ac6902c5145e14e2e580a87a310ac6c9076c2b8da
MD5 9ea295e43b2a9ad528a3e504bdaedaa4
BLAKE2b-256 7c7c8475d4fab31a6eb4a182159b68b08fd75392688faeb37107e400e67115e4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: syncware-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 11.2 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 872dd504fe358808cd69f1853666a67a933f6aa4043bd637ccae06dc8eaa0b51
MD5 91e93dcab929315814b1291aba3cf9ec
BLAKE2b-256 64d18bac83130c2e6a8b3aaea66869b000b980899bfdca0be008cc27158512ed

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