skillfed

dirsync

Advanced directory tree synchronisation tool

dirsync v2.2.6 196.4K downloads/30d#9,786 on PyPI97
Permissive license Active released

What it is and what it does

dirsync is a command-line and Python library tool for synchronizing directory trees. It can report differences between directories, one-way sync from source to target, or bidirectional updates. The tool supports filtering via regex patterns to include or exclude specific files and directories, and offers options like purging removed files, forcing permission changes, and comparing by content alone or by timestamps.

It runs with zero runtime dependencies and works across operating systems. You can use it from the command line with configuration files for repeated tasks, or call it directly from Python code with a simple API. The package is stable (Production/Stable status) and actively maintained, making it suitable for backup automation, mirror operations, or build system workflows.

Use it for:

  • Automate daily backups by syncing a project directory to an external drive with purge enabled
  • Mirror a source repository to a target location, updating only changed files to save bandwidth
  • Implement a two-way sync between a local working directory and a network share
  • Filter and sync only specific file types (e.g., source code, excluding build artifacts) using regex patterns
  • Generate a diff report before applying changes to detect what would be added, removed, or modified

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Synchronizes, updates, or reports differences between two directory trees, with support for filtering by regex patterns and bidirectional sync.

Yes. dirsync is a lightweight, actively maintained tool with no dependencies, permissive licensing, and a simple API suitable for directory synchronization tasks. Install it if you need reliable sync, diff, or mirror operations in scripts or applications.

Install

dirsync on PyPI

pip

pip install dirsync

uv

uv add dirsync

poetry

poetry add dirsync

Installing dirsync

Before you install

Low install friction with no runtime dependencies. Active maintenance as of 2026-03-23 with a recent release in 2025-05-24.

License in practice

MIT license (permissive) allows free use, modification, and distribution with minimal restrictions.

Quickstart

pip install dirsync

from dirsync import sync
sync('/source/path', '/target/path', 'sync', purge=True)

Verify before relying

  • Whether Python 2 support is still actively maintained or tested given the classifier presence
  • Performance characteristics with very large directory trees or slow filesystems

Package facts

License not declared (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 447 days since the last release
Last repo commit
First released
Downloads 196,436/month — #9,786 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: dirsync-2.2.6-py3-none-any.whl

Keywords: directory, folder, update, synchronisation

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: End Users/DesktopLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 3Topic :: Desktop EnvironmentTopic :: System :: Archiving :: BackupTopic :: System :: Archiving :: MirroringTopic :: Utilities

Tags

directory synchronizationfolder sync tooltree diff and mirrorbidirectional directory updatefile sync with filteringbackup and mirror directories
file-syncbackup-toolcli-utility

More Utilities packages