Skip to main content

Create exact, self-contained, reproducible project snapshots including git, caches, configs, and environment artifacts.

Project description

projectclone 🧬

Exact, reproducible, full-state project snapshots — with git, caches, env artifacts & symlinks

PyPI Python License Build Downloads Platform


🚀 Overview

projectclone creates exact, faithful, self-contained copies of your project workspace —
including:

✔ Source code
.git repo & history
✔ Virtualenvs & caches (unless excluded)
✔ Symlinks, metadata, file times
✔ Logs, config, db files, secrets (your machine-level security applies)

Why this tool?

For developers who need guaranteed reproducible project states, across:

  • major refactors
  • release checkpoints
  • deployment backups
  • research experiments
  • CI/CD artifact preservation
  • Termux / mobile dev environments
  • Secure environment rollbacks
  • Code forensics / disaster recovery

Think of it as:
git commit + rsync --link-dest + tar + secure state freezer
in one reliable command.


✨ Key Features

Feature Description
Full directory clone Copies every file (or hard-linked incremental mode)
Archive mode .tar.gz compressed snapshot with optional SHA256 manifest
Incremental mode rsync --link-dest deduplication like Time Machine / Borg
Safety-first design Atomic ops, temp dirs, cleanup on failure, UID bit stripping
Manifest options Size manifest + per-file SHA256 manifest for integrity
Cross-device aware Safely moves temp artifacts across filesystems
Smart excludes Glob/substring excludes (optional)
Dry-run mode Estimate + preview changes
Rotation Keep N most recent backups
Progress indicators Real-time file copy count + sizes
Termux optimized Works seamlessly in Termux + proot Ubuntu

📦 Installation

Standard install

pip install projectclone

Termux / Android

pkg install rsync proot-distro
pip install projectclone


---

🔧 Usage

Basic backup to default location

projectclone backup_1k_tests

Creates:

/sdcard/project_backups/2025-02-03_172501-myproject-backup_1k_tests/


---

Archive backup (compressed)

projectclone release_v1 --archive

Outputs:

release_v1.tar.gz
release_v1.tar.gz.sha256


---

Incremental (fast snapshots, dedup)

projectclone checkpoint --incremental


---

Show what will happen (safe preview)

projectclone rc --dry-run


---

Excluding files

projectclone nightly --exclude __pycache__ --exclude .mypy_cache


---

Keep last 5 clones (rotation)

projectclone stable --keep 5


---

Full help

projectclone --help


---

🛠 Options

Flag	Meaning

--archive	Create .tar.gz snapshot
--incremental	Rsync incremental mode with hardlinks
--manifest	Create size manifest
--manifest-sha	Per-file SHA256 manifest (slow)
--exclude PATTERN	Exclude matching paths
--dest DIR	Override destination directory
--dry-run	No writes  preview only
--symlinks	Preserve symbolic links
--yes	Skip confirmation prompt
--keep N	Keep only N recent snapshots
--verbose	Verbose logs
--progress-interval N	Print progress every N files



---

🔐 Safety & Guarantees

Atomic writes (temp  atomic move)

Auto-cleanup temp dirs on interrupt

Cross-filesystem safe move logic

Clears setuid/setgid bits for security

Write-protected log file (chmod 600 when supported)



---

📁 Default Backup Location

Platform	Path

Linux	~/project_backups (or provided)
Termux	/sdcard/project_backups



---

🧪 Testing

pip install -e .[dev]
pytest -v


---

📜 License

MIT  free for personal & commercial use.


---

🤝 Contributing

PRs welcome  especially for:

Restore module

Remote sync targets (S3, GDrive, SSH)

Fuse mounts / streaming restore

Compression tuning (lz4, zstd)

pydantic backed config file



---

⭐ Support / Motivation

Star the repo to support development 🙏
Every  helps justify more time invested.

git clone https://github.com/dhruv13x/projectclone


---

🧠 Author

Dhruv
Mobile-first DevOps explorer | Rust & Python | Cloud | Termux power-user


---

🧩 Roadmap

projectclone restore

zstd / lz4 compression modes

remote backup: s3 / ssh / gdrive

.projectcloneignore support

encrypted archives

GUI wrapper (Android / desktop)



---

💬 Final Word

> Code evolves  backups must keep up.



With projectclone, every project state becomes reproducible forever.

Freeze. Trust. Restore. Repeat.

---

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

projectclone-0.1.0.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

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

projectclone-0.1.0-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file projectclone-0.1.0.tar.gz.

File metadata

  • Download URL: projectclone-0.1.0.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for projectclone-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3a90c901e0edd6f5c26d385701a48b156f9bbf42df446d3ecfd1ec01f41ec2a7
MD5 178db3ff003124f2d3950f15f031fff1
BLAKE2b-256 4fe870ea4aa87007a0c7503cd3fa9421cd40ae8a762902449c9edbc0230aca88

See more details on using hashes here.

Provenance

The following attestation bundles were made for projectclone-0.1.0.tar.gz:

Publisher: publish.yml on dhruv13x/projectclone

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file projectclone-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: projectclone-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for projectclone-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5d82a25b1f92985e526a53bcb88e2c814cb00d6d8f684e9d45c871b6868feed4
MD5 71933b801267609a389d8e69b7f44fcc
BLAKE2b-256 28521275f16ef2d74358ca5631521837366992555ca18d774713447707de9d01

See more details on using hashes here.

Provenance

The following attestation bundles were made for projectclone-0.1.0-py3-none-any.whl:

Publisher: publish.yml on dhruv13x/projectclone

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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