Skip to main content

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

Project description

project-vault logo

PyPI version Python Wheel Release

Build status Codecov Test Coverage Code style: black Ruff Security

Downloads PyPI Downloads OS Python Versions

License: MIT

Project Vault (pv)

The Unified Project Lifecycle Manager.
Teleport your entire project stateโ€”code, databases, caches, and environmentsโ€”anywhere, safely.


๐Ÿš€ The Core Vision

Project Vault (pv) creates 100% identical project capsules. It captures the "messy reality" of a working project that Git ignores: local databases, node_modules, .env files, compiled binaries, and temp directories.

If you restore a pv snapshot on a new machine and run diff -r, you will see zero differences.

Use Cases:

  • Teleport: Move a running workspace from Laptop โ†’ Server in seconds.
  • Share: Send a self-contained .pvc capsule to a colleague.
  • Resurrect: Restore a dead environment exactly as it was 3 months ago.
  • Debug: Snapshot a bug state (including the DB) and analyze it later.

๐Ÿ“ฆ Installation

The Full Suite (Recommended)

Install the unified tool to get backup, restore, and cloud synchronization features.

pip install project-vault

This installs the pv command, which includes:

  • projectclone: The core snapshot engine.
  • projectrestore: The safety-critical restoration tool.
  • textual: For the interactive TUI.
  • zstandard: For high-performance compression.

Standalone Tools (Advanced)

For servers, CI/CD, or minimal environments, you can install the components independently:

  • Backup Only: pip install projectclone (No cloud deps)
  • Restore Only: pip install projectrestore (Zero dependencies, ultra-lightweight)

โœจ Key Features

  • Interactive Time Machine: (God Level) Browse, view, and restore files from any snapshot in a terminal-based UI (pv browse).
  • Bit-Identical Verification: (God Level) Verify that a restored project is byte-for-byte identical to the source with pv verify-clone.
  • Capsule Portability: Export snapshots to single .pvc files for sharing via email/USB with pv capsule export.
  • Smart Initialization: Auto-detects project type (Python, Node, Rust, etc.) and generates optimal ignore patterns with pv init --smart.
  • Cloud Agnostic Sync: Push/pull encrypted, deduplicated snapshots to AWS S3, Backblaze B2, or any S3-compatible storage.
  • Content-Addressable Storage: Every file is stored once, saving space and ensuring data integrity.
  • Vault Garbage Collection: Clean up orphaned data blocks from the vault with the pv gc command.
  • Integrity Checks: Verify the health of your local vault and detect corruption with pv check-integrity.
  • Lifecycle Hooks: Execute pre/post-backup and pre/post-restore shell commands for seamless integration.
  • Doppler Secret Integration: Automatically inject secrets from Doppler for secure cloud access.

โšก Quick Start

1. Initialize

Run this in your project root. The --smart flag auto-detects your language and creates a .pvignore.

pv init --smart

2. Create a Snapshot

Capture the current state of your project into the local vault.

pv vault

3. Check Status

See what has changed in your workspace since the last snapshot.

pv status

4. Sync to Cloud (Optional)

Push your encrypted, deduplicated snapshots to S3 or Backblaze B2.

pv push

5. Restore (Teleport)

Bring the project back to life on any machine.

# Restore from a local snapshot
pv vault-restore ./vault/snapshots/my-project/snapshot_latest.json ./restored_project

# Import and restore a portable capsule
pv capsule import my_project.pvc
pv capsule restore ./vault/snapshots/my-project/snapshot_from_capsule.json

๐Ÿ› ๏ธ Commands

Command Description
pv browse (God Level) Interactive TUI to browse, view, and restore from snapshots.
pv vault Create a content-addressable snapshot of the current directory.
pv vault-restore Full project restoration from a manifest.
pv capsule export Export a snapshot to a portable .pvc file.
pv capsule import Import a .pvc file into the local vault.
pv verify-clone (God Level) Verify a restored project is bit-identical to the source.
pv status Show modified files and cloud sync status.
pv init Create configuration. Use --smart for auto-ignore generation.
pv push Sync local vault to Cloud (S3/B2).
pv pull Download missing snapshots from Cloud.
pv list List all local or cloud snapshots.
pv diff Compare a local file against the latest snapshot.
pv checkout Restore a specific file from the latest snapshot.
pv gc Run garbage collection to clean up orphaned vault objects.
pv check-integrity Verify the health of the local vault (detect corruption).
pv check-env Check cloud credentials and dependencies.
pv notify-test Send a test notification.
pv config set-creds Save credentials to pv.toml (requires manual security override).

๐Ÿ–ฅ๏ธ Interactive TUI (pv browse)

For a "Time Machine"-like experience, run the browse command. This opens a Textual-based UI that lets you:

  • Navigate all historical snapshots for a project.
  • Expand snapshots to see the full file tree.
  • View the contents of any file from a past version.
  • Restore a single file by pressing r.
$ pv browse

โ”Œโ”€ Snapshots: my-api โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ โ”Œโ”€ 20231125_120000 โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โ”‚
โ”‚ โ”‚  ๐Ÿ“ src/                                                   โ”‚
โ”‚ โ”‚  โ”‚  ๐Ÿ“„ main.py                                             โ”‚
โ”‚ โ”‚  โ”‚  ๐Ÿ“„ routes.py                                           โ”‚
โ”‚ โ”‚  ๐Ÿ“„ .env                                                    โ”‚
โ”‚ โ”‚  ๐Ÿ“„ README.md                                               โ”‚
โ”‚ โ””โ”€ 20231124_183000 โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โ”‚
โ”‚    ...                                                       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โš™๏ธ Configuration & Advanced Usage

Configuration File (pv.toml)

Running pv init creates a pv.toml file for project-specific settings. You can also define these in your pyproject.toml under the [tool.project-vault] section.

[tool.project-vault]
bucket = "my-backup-bucket"
endpoint = "https://s3.us-east-1.amazonaws.com"
vault_path = "./.pv/vault"

Environment Variables & Precedence

pv uses a clear hierarchy for resolving settings:

  1. Command-Line Flags: --bucket my-bucket always wins.
  2. PV_ Prefixed Env Vars: PV_BUCKET overrides BUCKET.
  3. Doppler Secrets: If DOPPLER_TOKEN is set, secrets are fetched automatically.
  4. Standard Env Vars: AWS_ACCESS_KEY_ID, B2_KEY_ID, etc.
  5. Config File: pv.toml or pyproject.toml.

Security Note: Use PV_ prefixed variables or Doppler in CI/CD environments to avoid leaking general-purpose credentials.

Lifecycle Hooks

Define shell commands in pv.toml to run at critical stages.

[tool.project-vault.hooks]
pre-backup = "pg_dump my_db > backup.sql"
post-restore = "psql my_db < backup.sql && rm backup.sql"

๐Ÿ—๏ธ Architecture

Project Vault is a monorepo containing three distinct tools:

.
โ”œโ”€โ”€ src/                  # The 'pv' Orchestrator & CLI
โ”‚   โ”œโ”€โ”€ cli.py            # Main entry point
โ”‚   โ”œโ”€โ”€ tui.py            # Textual-based Time Machine
โ”‚   โ””โ”€โ”€ common/           # Shared utilities (Capsule, Smart Init, etc.)
โ”œโ”€โ”€ projectclone/         # The Backup Engine
โ”‚   โ””โ”€โ”€ src/
โ”‚       โ”œโ”€โ”€ cas_engine.py # Content-Addressable Storage logic
โ”‚       โ”œโ”€โ”€ verify_engine.py # Bit-identical verification
โ”‚       โ””โ”€โ”€ gc_engine.py  # Garbage Collection
โ””โ”€โ”€ projectrestore/       # The Restore Engine
    โ””โ”€โ”€ src/
        โ””โ”€โ”€ restore_engine.py # Safety-critical restoration logic
  1. project-vault (pv): The orchestrator. Handles configuration, cloud sync, and user interaction.
  2. projectclone: The backup engine. Handles hashing, deduplication, and manifest generation.
  3. projectrestore: The restore engine. A standalone, dependency-free tool focused purely on safe data reconstruction.

๐Ÿ—บ๏ธ Roadmap

See ROADMAP.md for the vision of Project Teleportation, Smart Capsules, and Device Mesh.


๐Ÿค Contributing & License

Contributions are welcome! Please check out the issues and PRs.

License: MIT License.

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

project_vault-5.0.1.tar.gz (57.7 kB view details)

Uploaded Source

Built Distribution

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

project_vault-5.0.1-py3-none-any.whl (40.8 kB view details)

Uploaded Python 3

File details

Details for the file project_vault-5.0.1.tar.gz.

File metadata

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

File hashes

Hashes for project_vault-5.0.1.tar.gz
Algorithm Hash digest
SHA256 ec77b83aa38589f8589034e71de914513cdc3ee33214bab4f633d3974ef78a15
MD5 3ccad8b16fe05dedba6033f58262e7d6
BLAKE2b-256 d8bd280a412f868f2dd0173597ffeca65297b927dc78936a54192316e5a4adfc

See more details on using hashes here.

Provenance

The following attestation bundles were made for project_vault-5.0.1.tar.gz:

Publisher: publish.yml on dhruv13x/project-vault

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

File details

Details for the file project_vault-5.0.1-py3-none-any.whl.

File metadata

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

File hashes

Hashes for project_vault-5.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 06b4b1bcc0a499593b402dc801aa6bc86b9fd3705cc5461b656c741ea4a9cd98
MD5 6a43866a8ef04a42197cc6a5d0e1a5ed
BLAKE2b-256 ebf88c2c71c587771026fb24a679a6c1529312351b8e6dbaa9fe76cbcc633901

See more details on using hashes here.

Provenance

The following attestation bundles were made for project_vault-5.0.1-py3-none-any.whl:

Publisher: publish.yml on dhruv13x/project-vault

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