Metadata-Version: 2.4
Name: clonerd
Version: 0.1.1
Summary: A small, safe directory cloning utility for Python
Author: clonerd contributors
Author-email: Tom Sapletta <tom@sapletta.com>
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/clonerd-com/clonerd
Project-URL: Repository, https://github.com/clonerd-com/clonerd
Project-URL: Issues, https://github.com/clonerd-com/clonerd/issues
Keywords: clone,copy,filesystem,backup,cli
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: System :: Archiving :: Backup
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == "dev"
Requires-Dist: pytest>=8; extra == "dev"
Requires-Dist: twine>=5; extra == "dev"
Requires-Dist: goal>=2.1.0; python_version >= "3.12" and extra == "dev"
Requires-Dist: costs>=0.1.53; python_version >= "3.9" and extra == "dev"
Dynamic: license-file

# clonerd

`clonerd` is a small, dependency-free Python library and command-line tool for
copying a directory tree safely. It updates files in the destination, keeps
unrelated destination files, supports repeatable exclusion patterns, and can
verify copied files with SHA-256.

## Install

```bash
python -m pip install clonerd
```

## Command line

```bash
clonerd ./project ./project-copy --exclude .git --exclude '*.pyc' --verify
```

Use `--dry-run` to inspect the operation without writing files.

## Python API

```python
from clonerd import clone_tree

report = clone_tree(
    "./project",
    "./project-copy",
    excludes=(".git", "__pycache__", "*.pyc"),
    verify=True,
)
print(report.files_copied)
```

Symbolic links are recreated as links and are never followed. Existing files
with the same relative path are replaced; unrelated files in the destination
remain untouched.

## Development

```bash
python -m pip install -e ".[dev]"
pytest -q
```

The project is released under the MIT license.


## License

Licensed under Apache-2.0.
