COWFS - Copy-on-Write Filesystem
A userspace Copy-on-Write filesystem built with FUSE. Every write transparently creates a new version - enabling instant restore, snapshot tagging, and content deduplication.
Status
- Core FUSE read/write path implemented
- Version history + restore implemented
- GC implemented (
--dry-run,--keep-last,--before) - Snapshot lifecycle implemented (
create,list,show,restore,delete) - GitHub Actions CI workflow added (tests + coverage + required static analysis)
- Tag-based PyPI publishing implemented and validated (
cowfs0.2.4 live)
Quick Start
pip install cowfs
# Mount
cowfs mount ~/storage ~/mnt
# Use like a normal filesystem
echo "hello" > ~/mnt/test.txt
echo "world" > ~/mnt/test.txt
# Inspect version history and stats
cowfs history /test.txt --storage ~/storage
cowfs stats --storage ~/storage
cowfs log --storage ~/storage --limit 20
# Restore to an older version
cowfs restore /test.txt --version 1 --storage ~/storage
# Create and inspect snapshot
cowfs snapshot create baseline --storage ~/storage
cowfs snapshot list --storage ~/storage
cowfs snapshot show baseline --storage ~/storage
# Restore filesystem to snapshot
cowfs snapshot restore baseline --storage ~/storage
# keep files created after snapshot:
cowfs snapshot restore baseline --keep-new --storage ~/storage
# Garbage collection
cowfs gc --storage ~/storage --dry-run
cowfs gc --storage ~/storage --keep-last 3
cowfs gc --storage ~/storage --before "2026-01-01 00:00:00"
# Unmount when done
cowfs umount ~/mnt
CLI Commands
cowfs mount <storage_dir> <mount_point> [--debug]
cowfs umount <mount_point>
cowfs history <file_path> --storage <storage_dir> [--json]
cowfs restore <file_path> (--version <n> | --before "<datetime>") --storage <storage_dir> [--dry-run] [--json]
cowfs log --storage <storage_dir> [--limit <n>] [--action <name>] [--path-prefix <prefix>] [--since "<datetime>"] [--until "<datetime>"] [--json]
cowfs stats --storage <storage_dir> [--json]
cowfs gc --storage <storage_dir> [--dry-run] [--keep-last <n>] [--before "<datetime>"] [--json]
cowfs snapshot create <name> [--description "..."] --storage <storage_dir> [--json]
cowfs snapshot list --storage <storage_dir> [--json]
cowfs snapshot show <name> --storage <storage_dir> [--json]
cowfs snapshot restore <name> [--keep-new] --storage <storage_dir> [--dry-run] [--json]
cowfs snapshot delete <name> --storage <storage_dir> [--json]
Development
git clone https://github.com/yourusername/cowfs.git
cd cowfs
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pytest
Documentation Site
pip install "mkdocs>=1.6.0,<2.0.0" "mkdocs-material>=9.5.0"
mkdocs serve
# build static site:
mkdocs build
Release
- Tag-based publishing is configured in
.github/workflows/publish.yml. - See full release instructions in RELEASE.md.
- Expected tag format:
vX.Y.Z(example:v0.2.0).
Release Checklist
# 1) bump version in pyproject.toml (example: 0.2.2)
git add pyproject.toml
git commit -m "Release 0.2.2"
git push origin master
# 2) create matching release tag
git tag v0.2.2
git push origin v0.2.2
# 3) after Publish workflow succeeds, verify install
pip install -U cowfs==0.2.2
Requirements
- Linux with FUSE support (
libfuse3-dev) - Python 3.11+
- Windows: use WSL2 (Ubuntu) for mount functionality
Metadata
Release files for cowfs 0.2.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cowfs-0.2.8.tar.gz | 48.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cowfs-0.2.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 68.2 kB
Release files / cowfs-0.2.8.tar.gz
| Download URL | cowfs-0.2.8.tar.gz |
|---|---|
| Size | 48.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
167752d71cd4e1436c44fde98d22e4ae9d4416f2ec54583fe77cea00fab3c15f
|
|
BLAKE2b-256 checksum How to use checksums |
93915c6527763428ccbe72a8ed83db36c4d5e3ed9ff6dff361da57ab21f78a61
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 2, 2026.
Transparency logRelease files / cowfs-0.2.8-py3-none-any.whl
| Download URL | cowfs-0.2.8-py3-none-any.whl |
|---|---|
| Size | 20.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
15f3720e3bdaa99f9da129c97d754c5d6b43125489a1d125f7112f71881afcb9
|
|
BLAKE2b-256 checksum How to use checksums |
73e9aa698b6d1f84029419be1bc5b558fdd500c524c65bf733eea2e619e72448
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 2, 2026.
Transparency log