Skip to main content

Project Vault (pv) 🏦

The Unified Project Lifecycle Manager: Backup, Restore, and Teleport Projects Anywhere.

Project Vault Logo

Build Status License: MIT Python Version Code Style: Black Ruff Maintenance

Project Vault (pv) is your command-line companion for managing project state. It combines the power of atomic backups, cloud synchronization, and time-travel restoration into a single, unified tool. Think of it as Time Machine for your dev projects — portable, reproducible, and cloud-ready.


⚡ Quick Start (The "5-Minute Rule")

Prerequisites

  • Python 3.10+
  • Pip (Python Package Installer)
  • Docker (Optional, for database backups)

Installation

# Clone the repository
git clone https://github.com/dhruv13x/project-vault.git
cd project-vault

# Install in editable mode with development tools
pip install -e .[dev]

Run

Verify the installation:

pv --version

Demo

Create a snapshot of your current project and list it:

# 1. Initialize (optional, for auto-ignore)
pv init --smart

# 2. Create a local snapshot
pv vault . --name "initial-commit"

# 3. List snapshots
pv list

✨ Features

🛡️ Core Reliability

  • Atomic Snapshots: Never lose data due to a partial backup. Snapshots are verified and immutable.
  • Content Addressable Storage (CAS): Deduplication at the file level. Save space by storing unique files only once.
  • Symlink Support: Preserves symlinks (or optionally follows them), ensuring complex project structures remain intact.

🚀 Performance

  • ZStandard Compression: High-speed, high-ratio compression for efficient storage and transfer.
  • Incremental Backups: Only changed files are processed, making subsequent backups lightning fast.

☁️ Cloud & Security

  • Cloud Sync (S3/B2): Push and pull your vaults to any S3-compatible storage.
  • Encrypted Configuration: Securely handle credentials (optional integration).
  • Integrity Checks: Verify the health of your local vault and cloud storage.

🧩 Developer Experience

  • TUI (Textual UI): Browse snapshots and restore files using an interactive terminal interface (pv browse).
  • Smart Ignorance: Auto-generates .pvignore based on project type (Python, Node, Rust, etc.).
  • Rich Output: Beautiful, color-coded terminal output using rich.

🛠️ Configuration

Project Vault can be configured via environment variables, a local pv.toml, or pyproject.toml.

Environment Variables

Variable Description Default Required
PV_BUCKET The default cloud bucket name. None No (unless pushing)
PV_ENDPOINT The S3-compatible endpoint URL. None No (unless pushing)
PV_VAULT_PATH Default local path to store the vault. ~/.project-vault No
PV_RESTORE_PATH Default path to restore projects. ./restored No
PV_TELEGRAM_BOT_TOKEN Telegram Bot Token for notifications. None No
PV_TELEGRAM_CHAT_ID Telegram Chat ID for notifications. None No
PV_DB_PASSWORD Database password for backups. None No

CLI Arguments

Common arguments for pv vault (create snapshot):

Flag Description
--name Tag the snapshot with a custom name.
--cloud Push to cloud immediately after creating.
--symlinks Preserve symlinks instead of copying targets.
--bucket Override configured bucket.
--endpoint Override configured endpoint.
--include-db Include database snapshot in the backup.

Common arguments for pv list:

Flag Description
--cloud List snapshots from the cloud instead of local.
--limit Number of snapshots to show (default: 10).

🏗️ Architecture

Project Vault is a self-contained monorepo orchestrating specialized internal engines for backup and restore.

Directory Tree

project-vault/
├── src/                        # Source Code
│   ├── cli.py                  # Entry Point (pv)
│   ├── cli_dispatch.py         # Command Routing
│   ├── common/                 # Shared Utilities (Config, Crypto, S3/B2)
│   ├── projectclone/           # Backup Engine (Snapshot Creation)
│   ├── projectrestore/         # Restore Engine (Snapshot Application)
│   ├── projectvault/           # Database & Driver Logic
│   └── tui.py                  # Textual User Interface
└── tests/                      # Orchestration & Integration Tests

Data Flow

  1. Input: User runs pv vault in a project directory.
  2. Filter: Rules from .pvignore are applied.
  3. Capture: The internal Clone Engine scans files, computes hashes, and stores unique objects in the CAS (Content Addressable Storage).
  4. Manifest: A JSON manifest is created, linking file paths to CAS objects.
  5. Sync (Optional): pv push uploads new CAS objects and the manifest to Cloud Storage (S3/B2).
  6. Restore: pv vault-restore uses the Restore Engine to read the manifest, fetch objects from CAS, and reconstruct the directory state.

🐞 Troubleshooting

Common Issues

Error Message Possible Cause Solution
B2ConnectionError / 403 Invalid credentials or endpoint. Check pv.toml or PV_ENDPOINT. Ensure keys are correct.
Snapshot not found Local vault is empty or path is wrong. Run pv list to see available snapshots. Check PV_VAULT_PATH.
Permission denied Lack of write access to vault/restore path. Ensure you have permissions for the directory.
Docker not found Docker daemon not running. Start Docker if using pv db or --include-db.

Debug Mode

To enable verbose logging and see stack traces, you can run the CLI module directly:

# Run with python directly for detailed tracebacks
python3 src/cli.py [command]

🤝 Contributing

We welcome contributions! Please see CONTRIBUTING.md for details on how to get started, report bugs, or suggest features.

Dev Setup

  1. Clone & Install:

    git clone https://github.com/dhruv13x/project-vault
    cd project-vault
    # Install package in editable mode with dev dependencies
    pip install -e .[dev]
    
  2. Run Tests:

    python3 -m pytest
    

🗺️ Roadmap

  • Encryption: Client-side encryption for zero-knowledge cloud backups.
  • Daemon Mode: Background watcher for auto-backups on file change.
  • Web UI: A lightweight web interface for browsing vaults remotely.
  • Plugin System: Hooks for custom pre/post backup actions (e.g., database dumps).

Built with ❤️ by Dhruv13x

Metadata

Release files for project-vault 15.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for project-vault 15.0.0
File Size Uploaded
project_vault-15.0.0.tar.gz 158.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for project-vault 15.0.0
File Interpreter ABI Platform
project_vault-15.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 338.1 kB

Release files / project_vault-15.0.0.tar.gz

Download URL project_vault-15.0.0.tar.gz
Size 158.8 kB
Tags Source
SHA-256 checksum
How to use checksums
469b415ca06441c6a0afe8c5b79251e629e3f345cafbaa7efe070caa5ec5b78e
BLAKE2b-256 checksum
How to use checksums
1cc71f70fb1d78506851f0a6adc9bdca58841c0569864387d3a93f949c925207
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 15, 2026.

Transparency log

Release files / project_vault-15.0.0-py3-none-any.whl

Download URL project_vault-15.0.0-py3-none-any.whl
Size 179.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bfffbd26a4fea215a41f6fd611265508cfb9178e9cdceba2e97d592c0f94b88a
BLAKE2b-256 checksum
How to use checksums
9a73268dfec36f4568da78492f0860f1f7171e8f9b53973da7c6a2a98f331e6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 15, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

15.0.0 This release

2 release files

13.1.0

2 release files

13.0.0

2 release files

11.0.0

2 release files

10.0.0

2 release files

9.0.0

2 release files

7.0.0

2 release files

6.0.1

2 release files

5.0.3

2 release files

5.0.2

2 release files

5.0.1

2 release files

5.0.0

2 release files

3.6.0

2 release files

3.2.0

2 release files

1.1.0

2 release files

1.0.14

2 release files

1.0.13

2 release files

1.0.11

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page