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

Docs

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.
  • Resurrect: Restore a dead environment exactly as it was 3 months ago.
  • Debug: Snapshot a bug state (including the DB) and send it to a colleague.

๐Ÿ“ฆ 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.
  • An interactive TUI for browsing snapshots (powered by textual).

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).
  • 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.
  • Lifecycle Hooks: Execute pre/post-backup and pre/post-restore shell commands for seamless integration with databases and services.
  • Vault Garbage Collection: Clean up orphaned data blocks from the vault with the pv gc command.
  • Environment Checker: The pv check-env command verifies your cloud credentials and dependencies.
  • Notification Integration: Test your notification setup with pv notify-test.
  • Doppler Secret Integration: Automatically inject secrets from Doppler for secure cloud access.

โšก Quick Start

1. Initialize

Run this in your project root to generate a config file (pv.toml).

pv init

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

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

# Preview what will be uploaded
pv push --dry-run

# Upload
pv push

5. Restore (Teleport)

Bring the project back to life on any machine.

# Restore the entire project
pv vault-restore ./vault/snapshots/my-project/snapshot_latest.json ./restored_project

# Or fix a single mistake locally
pv checkout src/main.py

๐Ÿ› ๏ธ Commands

Command Description
pv browse (New) 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 status Show modified files and cloud sync status.
pv diff Compare a local file against the latest snapshot.
pv checkout Restore a specific file from the latest snapshot.
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 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 backup (Legacy) Create a file-based backup.
pv archive-restore (Legacy) Restore a file-based backup.

๐Ÿ–ฅ๏ธ 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.

Key options:

  • bucket: The default cloud bucket.
  • endpoint: The S3-compatible endpoint URL.
  • vault_path: The local directory to store vault data.
  • restore_path: The default directory for vault-restore.

Environment Variables & Precedence

pv uses a clear hierarchy for resolving settings:

  1. Command-Line Flags: Arguments like --bucket my-bucket always win.
  2. PV_ Prefixed Env Vars: PV_BUCKET overrides BUCKET from a file.
  3. Doppler Secrets: If DOPPLER_TOKEN is set, secrets are fetched and injected as environment variables.
  4. Standard Env Vars: AWS_ACCESS_KEY_ID, B2_KEY_ID, etc.
  5. Config File: pv.toml or pyproject.toml values are used last.

Blockquote: Security Note For automated environments, using Doppler or PV_ prefixed variables is highly recommended to avoid leaking general-purpose cloud credentials.

Lifecycle Hooks

You can define shell commands in your pv.toml to run at critical stages of the backup/restore process. This is ideal for dumping a database before backup or restarting a service after restore.

[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:

  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.


๐Ÿ“„ 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-3.6.0.tar.gz (45.9 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-3.6.0-py3-none-any.whl (33.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for project_vault-3.6.0.tar.gz
Algorithm Hash digest
SHA256 08a06b00aad1a7b1f02bb6183bed3bf0c5ae65e91caf6414d2ef4fb0a46e5e7b
MD5 bb15e3046bc0792c5812be7eb5e6dcd7
BLAKE2b-256 e456420703a87d78bf55ae5346050854fa236ee0b549cd62ab5b707383889a72

See more details on using hashes here.

Provenance

The following attestation bundles were made for project_vault-3.6.0.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-3.6.0-py3-none-any.whl.

File metadata

  • Download URL: project_vault-3.6.0-py3-none-any.whl
  • Upload date:
  • Size: 33.9 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-3.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f17e1ee66e650fb82cf7b74e935b93f31b7eff419aeab1f6d5c6d6d3eba2d4af
MD5 ff0e911e8f94d54d213c17c5870f3e81
BLAKE2b-256 759e4e4afed9a4c4b3f4cbd33e8a7495d0eb8a56027b4d5131dc4d9925e0e896

See more details on using hashes here.

Provenance

The following attestation bundles were made for project_vault-3.6.0-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