🥬 PyVegh
PyVegh is the official Python binding for the Vegh snapshot engine, developed by CodeTease.
It delivers the raw performance of Rust (Zstd multithreaded compression, Tar archiving, Blake3 hashing) wrapped in a modern, flexible Python interface.
"Tight packing, swift unpacking, no nonsense."
Features
- Blazing Fast: Core logic is implemented in Rust using PyO3, utilizing Zstd Multithreading and the next-gen Blake3 hashing algorithm.
- AI-Ready Context: Generate clean, token-optimized XML prompts for ChatGPT/Claude in milliseconds.
- Analytics Dashboard: Instantly visualize your project's Lines of Code (LOC) with a beautiful terminal dashboard, no extraction required.
- Dry-Run Mode: Simulate snapshot creation to check file sizes and detect sensitive data risks before packing.
- Integrity v2: Verify data integrity at lightning speed with Blake3 and inspect metadata (author, timestamp, tool version) without unpacking.
- Smart Upload: Built-in
sendcommand supporting concurrent Chunked Uploads for large files. - Smart Filtering: Automatically respects
.veghignoreand.gitignorerules. - Vegh Hooks: Allow you to custom automation shell command while snapping.
- Deep Inspection: Peek into files (
cat) and compare snapshots (diff) without unpacking.
Installation
Install directly from PyPI:
pip install pyvegh
# Or via uv
uv pip install pyvegh
Or build from source (requires Rust):
maturin develop --release
CLI Usage
PyVegh provides a powerful command-line interface via the vegh (or pyvegh) command.
1. Configuration
Set up your default server URL and Auth Token so you don't have to type them every time.
vegh config
# Or one-liner:
vegh config send --url https://api.teaserverse.online/test --auth YOUR_TOKEN
# List current configuration
vegh config list
# Reset configuration to defaults
vegh config reset
Advanced: You can also configure custom audit patterns in ~/.vegh/config.json:
{
"audit": {
"patterns": ["custom_secret\\.key", ".*\\.private"],
"keywords": ["MY_API_KEY", "INTERNAL_TOKEN"]
}
}
2. Create Snapshot
Pack a directory into a highly compressed snapshot.
# Basic snapshot
vegh snap ./my-project --output backup.vegh
# Dry-Run (Simulation) - Check for large/sensitive files
vegh snap ./my-project --dry-run
3. LOC
View the Analytics Dashboard to break down your project by language and lines of code.
vegh loc backup.vegh
# Show Source Lines of Code (SLOC) instead of total LOC
# Excludes blank lines and comments
vegh loc backup.vegh --sloc
4. Prompt
Generate a structured XML context of your codebase to feed directly into ChatGPT, Claude, or Gemini.
# Generate XML context to stdout
vegh prompt .
# Clean Mode (Recommended):
# Removes lock files (package-lock.json, Cargo.lock), logs, secrets and other unnecessary files.
vegh prompt . --clean
# Copy to Clipboard (One-shot):
vegh prompt . --clean --copy
# Save to file
vegh prompt . --clean --output context.xml
5. Prune
Clean up old snapshots to free disk space.
# Keep only the 5 most recent snapshots in the current directory
vegh prune --keep 5
# Delete snapshots older than 30 days (but always keep the 5 most recent)
vegh prune --older-than 30 --keep 5
# Force clean without confirmation (useful for CI/CD)
vegh prune --keep 1 --force
6. Check
Check file integrity (Blake3) and view embedded metadata.
vegh check backup.vegh
7. Restore
Restore the snapshot to a target directory. Supports Partial Restore.
# Full restore
vegh restore backup.vegh ./restored-folder
# Partial restore (Specific files or folders)
vegh restore backup.vegh ./restored-folder --path src/main.rs --path config/
# Flatten directory structure (Extract files directly to output dir)
vegh restore backup.vegh ./restored-folder --flatten
8. Cat & Diff
Inspect content without extracting.
# View a file's content inside the snapshot
vegh cat backup.vegh src/main.rs
# View raw content (Useful for piping binary files)
vegh cat backup.vegh image.png --raw > extracted_image.png
# Compare snapshot with a directory
# (Automatically performs Blake3 Hash comparison if file sizes match)
vegh diff backup.vegh ./current-project
9. Send
Send the snapshot to a remote server. Supports Chunked Uploads for reliability.
# Auto-detects if chunking is needed, or force it:
vegh send backup.vegh --force-chunk
10. Doctor
Check your environment and installation health.
vegh doctor
11. Hooks example
Create a .veghhooks.json in your workspace.
{
"pre": ["echo 'Checking...'", "ruff check -e"],
"post": ["echo 'Clean up...'"]
}
12. Audit
Scan a snapshot for sensitive filenames and secrets.
vegh audit backup.vegh
Library Usage
You can also use PyVegh as a library in your own Python scripts:
import json
from vegh import create_snap, restore_snap, check_integrity, get_metadata
# 1. Create a snapshot
# Returns the number of files compressed
count = create_snap("src_folder", "backup.vegh", comment="Automated backup")
print(f"Compressed {count} files.")
# 2. Check integrity (Now uses Blake3)
checksum = check_integrity("backup.vegh")
print(f"Blake3 Hash: {checksum}")
# 3. Read Metadata (Fast, no unpacking)
raw_meta = get_metadata("backup.vegh")
meta = json.loads(raw_meta)
print(f"Snapshot created by: {meta.get('author')}")
# 4. Restore
restore_snap("backup.vegh", "dest_folder")
License
This project is under the MIT License.
Metadata
Release files for pyvegh 0.9.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyvegh-0.9.1.tar.gz | 64.5 kB | With provenance | Details for pyvegh-0.9.1.tar.gz |
Built distributions (wheels)
Total release size: 12.2 MB
Release files / pyvegh-0.9.1.tar.gz
| Download URL | pyvegh-0.9.1.tar.gz |
|---|---|
| Size | 64.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e9eb95975f33588d179f9cb41d87e770ad8ef6acd650a0628221d4c2e8004c96
|
|
BLAKE2b-256 checksum How to use checksums |
55e75c22f6b092e2feb1ea4709a4dc3795be3a19ad56df4f37f0ba32091d17d7
|
| 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 Feb 15, 2026.
Transparency logRelease files / pyvegh-0.9.1-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pyvegh-0.9.1-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | Linux glibc 2.17+ x86-64 PyPy 3.11 PyPy 3.11 7.3 |
|
SHA-256 checksum How to use checksums |
cb3581080547cd96ab0b64d4ac803ee9a68f1a69c0434c60e499b4c4be203d0d
|
|
BLAKE2b-256 checksum How to use checksums |
1858b62d95e2b1eac697f7aad5de897f5ff003a490f0cf444b173eaa937a5cbf
|
| 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 Feb 15, 2026.
Transparency logRelease files / pyvegh-0.9.1-cp310-abi3-win_amd64.whl
| Download URL | pyvegh-0.9.1-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
deb6b1d7474b6f77886d74f734145d59892d4f317765c5210c7c1e55d9b65002
|
|
BLAKE2b-256 checksum How to use checksums |
7c789deea51cd25e218ebc408e9d81cc67c5ca4d2eba6039bd5d3749c82327ed
|
| 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 Feb 15, 2026.
Transparency logRelease files / pyvegh-0.9.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pyvegh-0.9.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
16e884639a7ba0048387aa1b6d8e9997d8f255259d404db9de7e1a7bb40a043b
|
|
BLAKE2b-256 checksum How to use checksums |
faaaef3076963423025e441ec5649286405d8ccc4dff68c7fa76305caa5f76a4
|
| 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 Feb 15, 2026.
Transparency logRelease files / pyvegh-0.9.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | pyvegh-0.9.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 2.1 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
0501758d6a8a0c5179cf1cfe8fb4140589d2b627a01ec666747c3a0f25a9da6f
|
|
BLAKE2b-256 checksum How to use checksums |
1ec2b4e0b2a28168a8440f3ece3a91288cb9f3817978384868b1049cc9bafcd8
|
| 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 Feb 15, 2026.
Transparency logRelease files / pyvegh-0.9.1-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | pyvegh-0.9.1-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
4c08f4bebc59f12807474540370bd8a0c96b7c5402efc48f55b734220a90906f
|
|
BLAKE2b-256 checksum How to use checksums |
816720439e4e4222c863728431f4a10993feceffd040f1871e65d67b19089ae0
|
| 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 Feb 15, 2026.
Transparency logRelease files / pyvegh-0.9.1-cp310-abi3-macosx_10_12_x86_64.whl
| Download URL | pyvegh-0.9.1-cp310-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.10 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
9f5e4827972944cc58e7647e56ed805eb982fca3734ab89d251db9cae35aaa13
|
|
BLAKE2b-256 checksum How to use checksums |
45290aaf6e86456728a1bca316c7a6084726c850823326a561cab477dee9d1e4
|
| 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 Feb 15, 2026.
Transparency logSecurity for pyvegh 0.9.1
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.
Full provenance
All 7 files in this release have been uploaded with provenance metadata.
Attestation for pyvegh-0.9.1.tar.gz
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 Feb 15, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.