pyvegh 0.6.0__tar.gz → 0.8.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. pyvegh-0.8.0/.github/workflows/rust-clippy.yml +55 -0
  2. {pyvegh-0.6.0 → pyvegh-0.8.0}/Cargo.lock +159 -2
  3. pyvegh-0.8.0/Cargo.toml +37 -0
  4. {pyvegh-0.6.0 → pyvegh-0.8.0}/PKG-INFO +18 -25
  5. {pyvegh-0.6.0 → pyvegh-0.8.0}/README.md +17 -24
  6. {pyvegh-0.6.0 → pyvegh-0.8.0}/pyproject.toml +1 -1
  7. {pyvegh-0.6.0 → pyvegh-0.8.0}/python/vegh/__init__.py +3 -1
  8. pyvegh-0.8.0/python/vegh/analytics.py +281 -0
  9. pyvegh-0.8.0/python/vegh/cli.py +6 -0
  10. pyvegh-0.6.0/python/vegh/cli.py → pyvegh-0.8.0/python/vegh/cli_commands.py +148 -579
  11. pyvegh-0.8.0/python/vegh/cli_config.py +81 -0
  12. pyvegh-0.8.0/python/vegh/cli_helpers.py +124 -0
  13. pyvegh-0.8.0/python/vegh/cli_hooks.py +48 -0
  14. pyvegh-0.8.0/python/vegh/cli_main.py +98 -0
  15. pyvegh-0.8.0/python/vegh/cli_repo.py +90 -0
  16. pyvegh-0.8.0/python/vegh/config.jsonc +1116 -0
  17. pyvegh-0.8.0/python/vegh/jsonc.py +53 -0
  18. pyvegh-0.8.0/src/core.rs +588 -0
  19. pyvegh-0.8.0/src/hash.rs +108 -0
  20. pyvegh-0.8.0/src/lib.rs +584 -0
  21. pyvegh-0.8.0/src/storage.rs +290 -0
  22. pyvegh-0.6.0/Cargo.toml +0 -28
  23. pyvegh-0.6.0/python/vegh/analytics.py +0 -621
  24. pyvegh-0.6.0/src/lib.rs +0 -716
  25. {pyvegh-0.6.0 → pyvegh-0.8.0}/.github/workflows/ci.yml +0 -0
  26. {pyvegh-0.6.0 → pyvegh-0.8.0}/.github/workflows/release.yml +0 -0
  27. {pyvegh-0.6.0 → pyvegh-0.8.0}/.gitignore +0 -0
  28. {pyvegh-0.6.0 → pyvegh-0.8.0}/LICENSE +0 -0
  29. {pyvegh-0.6.0 → pyvegh-0.8.0}/tests/integration_test.sh +0 -0
  30. {pyvegh-0.6.0 → pyvegh-0.8.0}/tests/test_smoke.py +0 -0
  31. {pyvegh-0.6.0 → pyvegh-0.8.0}/uv.lock +0 -0
@@ -0,0 +1,55 @@
1
+ # This workflow uses actions that are not certified by GitHub.
2
+ # They are provided by a third-party and are governed by
3
+ # separate terms of service, privacy policy, and support
4
+ # documentation.
5
+ # rust-clippy is a tool that runs a bunch of lints to catch common
6
+ # mistakes in your Rust code and help improve your Rust code.
7
+ # More details at https://github.com/rust-lang/rust-clippy
8
+ # and https://rust-lang.github.io/rust-clippy/
9
+
10
+ name: rust-clippy analyze
11
+
12
+ on:
13
+ push:
14
+ branches: [ "main" ]
15
+ pull_request:
16
+ # The branches below must be a subset of the branches above
17
+ branches: [ "main" ]
18
+ schedule:
19
+ - cron: '32 11 * * 4'
20
+
21
+ jobs:
22
+ rust-clippy-analyze:
23
+ name: Run rust-clippy analyzing
24
+ runs-on: ubuntu-latest
25
+ permissions:
26
+ contents: read
27
+ security-events: write
28
+ actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
29
+ steps:
30
+ - name: Checkout code
31
+ uses: actions/checkout@v4
32
+
33
+ - name: Install Rust toolchain
34
+ uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af #@v1
35
+ with:
36
+ profile: minimal
37
+ toolchain: stable
38
+ components: clippy
39
+ override: true
40
+
41
+ - name: Install required cargo
42
+ run: cargo install clippy-sarif sarif-fmt
43
+
44
+ - name: Run rust-clippy
45
+ run:
46
+ cargo clippy
47
+ --all-features
48
+ --message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
49
+ continue-on-error: true
50
+
51
+ - name: Upload analysis results to GitHub
52
+ uses: github/codeql-action/upload-sarif@v3
53
+ with:
54
+ sarif_file: rust-clippy-results.sarif
55
+ wait-for-processing: true
@@ -44,6 +44,15 @@ version = "1.5.0"
44
44
  source = "registry+https://github.com/rust-lang/crates.io-index"
45
45
  checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
46
46
 
47
+ [[package]]
48
+ name = "bincode"
49
+ version = "1.3.3"
50
+ source = "registry+https://github.com/rust-lang/crates.io-index"
51
+ checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad"
52
+ dependencies = [
53
+ "serde",
54
+ ]
55
+
47
56
  [[package]]
48
57
  name = "bitflags"
49
58
  version = "2.10.0"
@@ -108,10 +117,24 @@ dependencies = [
108
117
  "iana-time-zone",
109
118
  "js-sys",
110
119
  "num-traits",
120
+ "serde",
111
121
  "wasm-bindgen",
112
122
  "windows-link",
113
123
  ]
114
124
 
125
+ [[package]]
126
+ name = "console"
127
+ version = "0.16.2"
128
+ source = "registry+https://github.com/rust-lang/crates.io-index"
129
+ checksum = "03e45a4a8926227e4197636ba97a9fc9b00477e9f4bd711395687c5f0734bec4"
130
+ dependencies = [
131
+ "encode_unicode",
132
+ "libc",
133
+ "once_cell",
134
+ "unicode-width",
135
+ "windows-sys 0.61.2",
136
+ ]
137
+
115
138
  [[package]]
116
139
  name = "constant_time_eq"
117
140
  version = "0.3.1"
@@ -124,6 +147,15 @@ version = "0.8.7"
124
147
  source = "registry+https://github.com/rust-lang/crates.io-index"
125
148
  checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
126
149
 
150
+ [[package]]
151
+ name = "crossbeam-channel"
152
+ version = "0.5.15"
153
+ source = "registry+https://github.com/rust-lang/crates.io-index"
154
+ checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2"
155
+ dependencies = [
156
+ "crossbeam-utils",
157
+ ]
158
+
127
159
  [[package]]
128
160
  name = "crossbeam-deque"
129
161
  version = "0.8.6"
@@ -149,6 +181,26 @@ version = "0.8.21"
149
181
  source = "registry+https://github.com/rust-lang/crates.io-index"
150
182
  checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
151
183
 
184
+ [[package]]
185
+ name = "dashmap"
186
+ version = "6.1.0"
187
+ source = "registry+https://github.com/rust-lang/crates.io-index"
188
+ checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf"
189
+ dependencies = [
190
+ "cfg-if",
191
+ "crossbeam-utils",
192
+ "hashbrown",
193
+ "lock_api",
194
+ "once_cell",
195
+ "parking_lot_core",
196
+ ]
197
+
198
+ [[package]]
199
+ name = "encode_unicode"
200
+ version = "1.0.0"
201
+ source = "registry+https://github.com/rust-lang/crates.io-index"
202
+ checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0"
203
+
152
204
  [[package]]
153
205
  name = "errno"
154
206
  version = "0.3.14"
@@ -159,6 +211,12 @@ dependencies = [
159
211
  "windows-sys 0.61.2",
160
212
  ]
161
213
 
214
+ [[package]]
215
+ name = "fastcdc"
216
+ version = "3.2.1"
217
+ source = "registry+https://github.com/rust-lang/crates.io-index"
218
+ checksum = "bf51ceb43e96afbfe4dd5c6f6082af5dfd60e220820b8123792d61963f2ce6bc"
219
+
162
220
  [[package]]
163
221
  name = "filetime"
164
222
  version = "0.2.26"
@@ -202,6 +260,12 @@ dependencies = [
202
260
  "regex-syntax",
203
261
  ]
204
262
 
263
+ [[package]]
264
+ name = "hashbrown"
265
+ version = "0.14.5"
266
+ source = "registry+https://github.com/rust-lang/crates.io-index"
267
+ checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
268
+
205
269
  [[package]]
206
270
  name = "heck"
207
271
  version = "0.5.0"
@@ -254,6 +318,19 @@ dependencies = [
254
318
  "winapi-util",
255
319
  ]
256
320
 
321
+ [[package]]
322
+ name = "indicatif"
323
+ version = "0.18.3"
324
+ source = "registry+https://github.com/rust-lang/crates.io-index"
325
+ checksum = "9375e112e4b463ec1b1c6c011953545c65a30164fbab5b581df32b3abf0dcb88"
326
+ dependencies = [
327
+ "console",
328
+ "portable-atomic",
329
+ "unicode-width",
330
+ "unit-prefix",
331
+ "web-time",
332
+ ]
333
+
257
334
  [[package]]
258
335
  name = "indoc"
259
336
  version = "2.0.7"
@@ -303,7 +380,7 @@ checksum = "3d0b95e02c851351f877147b7deea7b1afb1df71b63aa5f8270716e0c5720616"
303
380
  dependencies = [
304
381
  "bitflags",
305
382
  "libc",
306
- "redox_syscall",
383
+ "redox_syscall 0.7.0",
307
384
  ]
308
385
 
309
386
  [[package]]
@@ -312,6 +389,15 @@ version = "0.11.0"
312
389
  source = "registry+https://github.com/rust-lang/crates.io-index"
313
390
  checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039"
314
391
 
392
+ [[package]]
393
+ name = "lock_api"
394
+ version = "0.4.14"
395
+ source = "registry+https://github.com/rust-lang/crates.io-index"
396
+ checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965"
397
+ dependencies = [
398
+ "scopeguard",
399
+ ]
400
+
315
401
  [[package]]
316
402
  name = "log"
317
403
  version = "0.4.29"
@@ -357,6 +443,19 @@ version = "1.21.3"
357
443
  source = "registry+https://github.com/rust-lang/crates.io-index"
358
444
  checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
359
445
 
446
+ [[package]]
447
+ name = "parking_lot_core"
448
+ version = "0.9.12"
449
+ source = "registry+https://github.com/rust-lang/crates.io-index"
450
+ checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1"
451
+ dependencies = [
452
+ "cfg-if",
453
+ "libc",
454
+ "redox_syscall 0.5.18",
455
+ "smallvec",
456
+ "windows-link",
457
+ ]
458
+
360
459
  [[package]]
361
460
  name = "pkg-config"
362
461
  version = "0.3.32"
@@ -441,15 +540,21 @@ dependencies = [
441
540
 
442
541
  [[package]]
443
542
  name = "pyvegh"
444
- version = "0.6.0"
543
+ version = "0.8.0"
445
544
  dependencies = [
446
545
  "anyhow",
546
+ "bincode",
447
547
  "blake3",
448
548
  "chrono",
549
+ "crossbeam-channel",
550
+ "dashmap",
551
+ "fastcdc",
449
552
  "hex",
450
553
  "ignore",
554
+ "indicatif",
451
555
  "memmap2",
452
556
  "pyo3",
557
+ "redb",
453
558
  "serde",
454
559
  "serde_json",
455
560
  "tar",
@@ -481,6 +586,24 @@ dependencies = [
481
586
  "crossbeam-utils",
482
587
  ]
483
588
 
589
+ [[package]]
590
+ name = "redb"
591
+ version = "3.1.0"
592
+ source = "registry+https://github.com/rust-lang/crates.io-index"
593
+ checksum = "ae323eb086579a3769daa2c753bb96deb95993c534711e0dbe881b5192906a06"
594
+ dependencies = [
595
+ "libc",
596
+ ]
597
+
598
+ [[package]]
599
+ name = "redox_syscall"
600
+ version = "0.5.18"
601
+ source = "registry+https://github.com/rust-lang/crates.io-index"
602
+ checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d"
603
+ dependencies = [
604
+ "bitflags",
605
+ ]
606
+
484
607
  [[package]]
485
608
  name = "redox_syscall"
486
609
  version = "0.7.0"
@@ -535,6 +658,12 @@ dependencies = [
535
658
  "winapi-util",
536
659
  ]
537
660
 
661
+ [[package]]
662
+ name = "scopeguard"
663
+ version = "1.2.0"
664
+ source = "registry+https://github.com/rust-lang/crates.io-index"
665
+ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
666
+
538
667
  [[package]]
539
668
  name = "serde"
540
669
  version = "1.0.228"
@@ -584,6 +713,12 @@ version = "1.3.0"
584
713
  source = "registry+https://github.com/rust-lang/crates.io-index"
585
714
  checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
586
715
 
716
+ [[package]]
717
+ name = "smallvec"
718
+ version = "1.15.1"
719
+ source = "registry+https://github.com/rust-lang/crates.io-index"
720
+ checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
721
+
587
722
  [[package]]
588
723
  name = "syn"
589
724
  version = "2.0.114"
@@ -618,12 +753,24 @@ version = "1.0.22"
618
753
  source = "registry+https://github.com/rust-lang/crates.io-index"
619
754
  checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5"
620
755
 
756
+ [[package]]
757
+ name = "unicode-width"
758
+ version = "0.2.2"
759
+ source = "registry+https://github.com/rust-lang/crates.io-index"
760
+ checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254"
761
+
621
762
  [[package]]
622
763
  name = "unindent"
623
764
  version = "0.2.4"
624
765
  source = "registry+https://github.com/rust-lang/crates.io-index"
625
766
  checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
626
767
 
768
+ [[package]]
769
+ name = "unit-prefix"
770
+ version = "0.5.2"
771
+ source = "registry+https://github.com/rust-lang/crates.io-index"
772
+ checksum = "81e544489bf3d8ef66c953931f56617f423cd4b5494be343d9b9d3dda037b9a3"
773
+
627
774
  [[package]]
628
775
  name = "walkdir"
629
776
  version = "2.5.0"
@@ -688,6 +835,16 @@ dependencies = [
688
835
  "unicode-ident",
689
836
  ]
690
837
 
838
+ [[package]]
839
+ name = "web-time"
840
+ version = "1.1.0"
841
+ source = "registry+https://github.com/rust-lang/crates.io-index"
842
+ checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb"
843
+ dependencies = [
844
+ "js-sys",
845
+ "wasm-bindgen",
846
+ ]
847
+
691
848
  [[package]]
692
849
  name = "winapi-util"
693
850
  version = "0.1.11"
@@ -0,0 +1,37 @@
1
+ [package]
2
+ name = "pyvegh"
3
+ version = "0.8.0"
4
+ edition = "2024"
5
+ authors = ["CodeTease"]
6
+ readme = "README.md"
7
+
8
+ [lib]
9
+ name = "pyvegh_core"
10
+ crate-type = ["cdylib"]
11
+
12
+ [dependencies]
13
+ pyo3 = { version = "0.27", features = ["extension-module", "abi3-py310"] }
14
+
15
+ # Core Logic Deps (Synced from Vegh 0.4.0)
16
+ tar = "0.4"
17
+ zstd = { version = "0.13", features = ["zstdmt"] }
18
+ ignore = "0.4"
19
+
20
+ # Hashing & CDC
21
+ blake3 = { version = "1.8", features = ["rayon", "mmap"] }
22
+ hex = "0.4"
23
+ memmap2 = "0.9"
24
+ fastcdc = "3.2.1" # Added for CDC support
25
+
26
+ # Storage & Cache
27
+ redb = "3.1.0" # Migrated from JSON cache to Embedded DB
28
+ bincode = "1.3" # Struct serialization
29
+ dashmap = "6.1.0" # Concurrent Map for Deduplication
30
+
31
+ # Utilities
32
+ anyhow = "1.0"
33
+ serde = { version = "1.0", features = ["derive"] }
34
+ serde_json = "1.0"
35
+ chrono = { version = "0.4", features = ["serde"] }
36
+ crossbeam-channel = "0.5" # Pipeline messaging
37
+ indicatif = "0.18"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyvegh
3
- Version: 0.6.0
3
+ Version: 0.8.0
4
4
  Classifier: Programming Language :: Python :: 3.10
5
5
  Classifier: Programming Language :: Python :: 3.11
6
6
  Classifier: Programming Language :: Python :: 3.12
@@ -49,13 +49,16 @@ It delivers the raw performance of Rust (Zstd multithreaded compression, Tar arc
49
49
  ## Installation
50
50
 
51
51
  Install directly from PyPI:
52
- ```bash
52
+ ```shell
53
53
  pip install pyvegh
54
+
55
+ # Or via uv
56
+ uv pip install pyvegh
54
57
  ```
55
58
 
56
59
  Or build from source (requires Rust):
57
60
 
58
- ```bash
61
+ ```shell
59
62
  maturin develop --release
60
63
  ```
61
64
 
@@ -67,7 +70,7 @@ PyVegh provides a powerful command-line interface via the `vegh` (or `pyvegh`) c
67
70
 
68
71
  Set up your default server URL and Auth Token so you don't have to type them every time.
69
72
 
70
- ```bash
73
+ ```shell
71
74
  vegh config
72
75
  # Or one-liner:
73
76
  vegh config send --url https://api.teaserverse.online/test --auth YOUR_TOKEN
@@ -83,7 +86,7 @@ vegh config reset
83
86
 
84
87
  Pack a directory into a highly compressed snapshot.
85
88
 
86
- ```bash
89
+ ```shell
87
90
  # Basic snapshot
88
91
  vegh snap ./my-project --output backup.vegh
89
92
 
@@ -95,7 +98,7 @@ vegh snap ./my-project --dry-run
95
98
 
96
99
  View the Analytics Dashboard to break down your project by language and lines of code.
97
100
 
98
- ```bash
101
+ ```shell
99
102
  vegh loc backup.vegh
100
103
 
101
104
  # Show Source Lines of Code (SLOC) instead of total LOC
@@ -106,7 +109,7 @@ vegh loc backup.vegh --sloc
106
109
  ### 4\. Prompt
107
110
 
108
111
  Generate a structured XML context of your codebase to feed directly into ChatGPT, Claude, or Gemini.
109
- ```bash
112
+ ```shell
110
113
  # Generate XML context to stdout
111
114
  vegh prompt .
112
115
 
@@ -125,7 +128,7 @@ vegh prompt . --clean --output context.xml
125
128
 
126
129
  Clean up old snapshots to free disk space.
127
130
 
128
- ```bash
131
+ ```shell
129
132
  # Keep only the 5 most recent snapshots in the current directory
130
133
  vegh prune --keep 5
131
134
 
@@ -137,7 +140,7 @@ vegh prune --keep 1 --force
137
140
 
138
141
  Check file integrity (Blake3) and view embedded metadata.
139
142
 
140
- ```bash
143
+ ```shell
141
144
  vegh check backup.vegh
142
145
  ```
143
146
 
@@ -145,7 +148,7 @@ vegh check backup.vegh
145
148
 
146
149
  Restore the snapshot to a target directory. Supports **Partial Restore**.
147
150
 
148
- ```bash
151
+ ```shell
149
152
  # Full restore
150
153
  vegh restore backup.vegh ./restored-folder
151
154
 
@@ -160,7 +163,7 @@ vegh restore backup.vegh ./restored-folder --flatten
160
163
 
161
164
  Inspect content without extracting.
162
165
 
163
- ```bash
166
+ ```shell
164
167
  # View a file's content inside the snapshot
165
168
  vegh cat backup.vegh src/main.rs
166
169
 
@@ -175,7 +178,7 @@ vegh diff backup.vegh ./current-project
175
178
 
176
179
  Send the snapshot to a remote server. Supports **Chunked Uploads** for reliability.
177
180
 
178
- ```bash
181
+ ```shell
179
182
  # Auto-detects if chunking is needed, or force it:
180
183
  vegh send backup.vegh --force-chunk
181
184
  ```
@@ -184,7 +187,7 @@ vegh send backup.vegh --force-chunk
184
187
 
185
188
  Check your environment and installation health.
186
189
 
187
- ```bash
190
+ ```shell
188
191
  vegh doctor
189
192
  ```
190
193
 
@@ -194,18 +197,8 @@ Create a `.veghhooks.json` in your workspace.
194
197
 
195
198
  ```json
196
199
  {
197
- "hooks": {
198
- "pre": [
199
- "echo '🚀 Pre-snap hook started...'",
200
- "echo 'Preparing to backup...'",
201
- "echo 'Backing up database...'",
202
- "echo 'Backup completed.'"
203
- ],
204
- "post": [
205
- "echo '🎉 Snapshot completed!'",
206
- "echo 'Cleaning up...'"
207
- ]
208
- }
200
+ "pre": ["echo 'Checking...'", "ruff check -e"],
201
+ "post": ["echo 'Clean up...'"]
209
202
  }
210
203
  ```
211
204
 
@@ -21,13 +21,16 @@ It delivers the raw performance of Rust (Zstd multithreaded compression, Tar arc
21
21
  ## Installation
22
22
 
23
23
  Install directly from PyPI:
24
- ```bash
24
+ ```shell
25
25
  pip install pyvegh
26
+
27
+ # Or via uv
28
+ uv pip install pyvegh
26
29
  ```
27
30
 
28
31
  Or build from source (requires Rust):
29
32
 
30
- ```bash
33
+ ```shell
31
34
  maturin develop --release
32
35
  ```
33
36
 
@@ -39,7 +42,7 @@ PyVegh provides a powerful command-line interface via the `vegh` (or `pyvegh`) c
39
42
 
40
43
  Set up your default server URL and Auth Token so you don't have to type them every time.
41
44
 
42
- ```bash
45
+ ```shell
43
46
  vegh config
44
47
  # Or one-liner:
45
48
  vegh config send --url https://api.teaserverse.online/test --auth YOUR_TOKEN
@@ -55,7 +58,7 @@ vegh config reset
55
58
 
56
59
  Pack a directory into a highly compressed snapshot.
57
60
 
58
- ```bash
61
+ ```shell
59
62
  # Basic snapshot
60
63
  vegh snap ./my-project --output backup.vegh
61
64
 
@@ -67,7 +70,7 @@ vegh snap ./my-project --dry-run
67
70
 
68
71
  View the Analytics Dashboard to break down your project by language and lines of code.
69
72
 
70
- ```bash
73
+ ```shell
71
74
  vegh loc backup.vegh
72
75
 
73
76
  # Show Source Lines of Code (SLOC) instead of total LOC
@@ -78,7 +81,7 @@ vegh loc backup.vegh --sloc
78
81
  ### 4\. Prompt
79
82
 
80
83
  Generate a structured XML context of your codebase to feed directly into ChatGPT, Claude, or Gemini.
81
- ```bash
84
+ ```shell
82
85
  # Generate XML context to stdout
83
86
  vegh prompt .
84
87
 
@@ -97,7 +100,7 @@ vegh prompt . --clean --output context.xml
97
100
 
98
101
  Clean up old snapshots to free disk space.
99
102
 
100
- ```bash
103
+ ```shell
101
104
  # Keep only the 5 most recent snapshots in the current directory
102
105
  vegh prune --keep 5
103
106
 
@@ -109,7 +112,7 @@ vegh prune --keep 1 --force
109
112
 
110
113
  Check file integrity (Blake3) and view embedded metadata.
111
114
 
112
- ```bash
115
+ ```shell
113
116
  vegh check backup.vegh
114
117
  ```
115
118
 
@@ -117,7 +120,7 @@ vegh check backup.vegh
117
120
 
118
121
  Restore the snapshot to a target directory. Supports **Partial Restore**.
119
122
 
120
- ```bash
123
+ ```shell
121
124
  # Full restore
122
125
  vegh restore backup.vegh ./restored-folder
123
126
 
@@ -132,7 +135,7 @@ vegh restore backup.vegh ./restored-folder --flatten
132
135
 
133
136
  Inspect content without extracting.
134
137
 
135
- ```bash
138
+ ```shell
136
139
  # View a file's content inside the snapshot
137
140
  vegh cat backup.vegh src/main.rs
138
141
 
@@ -147,7 +150,7 @@ vegh diff backup.vegh ./current-project
147
150
 
148
151
  Send the snapshot to a remote server. Supports **Chunked Uploads** for reliability.
149
152
 
150
- ```bash
153
+ ```shell
151
154
  # Auto-detects if chunking is needed, or force it:
152
155
  vegh send backup.vegh --force-chunk
153
156
  ```
@@ -156,7 +159,7 @@ vegh send backup.vegh --force-chunk
156
159
 
157
160
  Check your environment and installation health.
158
161
 
159
- ```bash
162
+ ```shell
160
163
  vegh doctor
161
164
  ```
162
165
 
@@ -166,18 +169,8 @@ Create a `.veghhooks.json` in your workspace.
166
169
 
167
170
  ```json
168
171
  {
169
- "hooks": {
170
- "pre": [
171
- "echo '🚀 Pre-snap hook started...'",
172
- "echo 'Preparing to backup...'",
173
- "echo 'Backing up database...'",
174
- "echo 'Backup completed.'"
175
- ],
176
- "post": [
177
- "echo '🎉 Snapshot completed!'",
178
- "echo 'Cleaning up...'"
179
- ]
180
- }
172
+ "pre": ["echo 'Checking...'", "ruff check -e"],
173
+ "post": ["echo 'Clean up...'"]
181
174
  }
182
175
  ```
183
176
 
@@ -4,7 +4,7 @@ build-backend = "maturin"
4
4
 
5
5
  [project]
6
6
  name = "pyvegh"
7
- version = "0.6.0"
7
+ version = "0.8.0"
8
8
  description = "Python bindings for Vegh - The Snapshot Tool."
9
9
  authors = [{name = "CodeTease"}]
10
10
  readme = "README.md"
@@ -9,9 +9,10 @@ from ._core import (
9
9
  get_metadata,
10
10
  count_locs,
11
11
  scan_locs_dir,
12
+ read_snapshot_text,
12
13
  )
13
14
 
14
- __version__ = "0.6.0"
15
+ __version__ = "0.8.0"
15
16
  __all__ = [
16
17
  "create_snap",
17
18
  "dry_run_snap",
@@ -20,5 +21,6 @@ __all__ = [
20
21
  "get_metadata",
21
22
  "count_locs",
22
23
  "scan_locs_dir",
24
+ "read_snapshot_text",
23
25
  "__version__",
24
26
  ]