appydave-tools 0.16.0 → 0.17.0

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 (40) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +6 -0
  3. data/AGENTS.md +22 -0
  4. data/CHANGELOG.md +12 -0
  5. data/CLAUDE.md +206 -51
  6. data/README.md +144 -11
  7. data/bin/archive_project.rb +249 -0
  8. data/bin/configuration.rb +21 -1
  9. data/bin/generate_manifest.rb +357 -0
  10. data/bin/sync_from_ssd.rb +236 -0
  11. data/bin/vat +623 -0
  12. data/docs/README.md +169 -0
  13. data/docs/configuration/.env.example +19 -0
  14. data/docs/configuration/README.md +394 -0
  15. data/docs/configuration/channels.example.json +26 -0
  16. data/docs/configuration/settings.example.json +6 -0
  17. data/docs/development/CODEX-recommendations.md +123 -0
  18. data/docs/development/README.md +100 -0
  19. data/docs/development/cli-architecture-patterns.md +1604 -0
  20. data/docs/development/pattern-comparison.md +284 -0
  21. data/docs/prd-unified-brands-configuration.md +792 -0
  22. data/docs/project-brand-systems-analysis.md +934 -0
  23. data/docs/vat/dam-vision.md +123 -0
  24. data/docs/vat/session-summary-2025-11-09.md +297 -0
  25. data/docs/vat/usage.md +508 -0
  26. data/docs/vat/vat-testing-plan.md +801 -0
  27. data/lib/appydave/tools/configuration/models/brands_config.rb +238 -0
  28. data/lib/appydave/tools/configuration/models/config_base.rb +7 -0
  29. data/lib/appydave/tools/configuration/models/settings_config.rb +4 -0
  30. data/lib/appydave/tools/vat/config.rb +153 -0
  31. data/lib/appydave/tools/vat/config_loader.rb +91 -0
  32. data/lib/appydave/tools/vat/manifest_generator.rb +239 -0
  33. data/lib/appydave/tools/vat/project_listing.rb +198 -0
  34. data/lib/appydave/tools/vat/project_resolver.rb +132 -0
  35. data/lib/appydave/tools/vat/s3_operations.rb +560 -0
  36. data/lib/appydave/tools/version.rb +1 -1
  37. data/lib/appydave/tools.rb +9 -1
  38. data/package.json +1 -1
  39. metadata +57 -3
  40. data/docs/dam/overview.md +0 -28
data/docs/vat/usage.md ADDED
@@ -0,0 +1,508 @@
1
+ # VAT (Video Asset Tools) - Usage Guide
2
+
3
+ **VAT** is a unified CLI for managing video projects across local storage, S3 cloud collaboration, and SSD archival storage.
4
+
5
+ ## Table of Contents
6
+
7
+ - [Quick Start](#quick-start)
8
+ - [Installation](#installation)
9
+ - [Configuration](#configuration)
10
+ - [Commands](#commands)
11
+ - [Examples](#examples)
12
+ - [Workflows](#workflows)
13
+ - [Troubleshooting](#troubleshooting)
14
+
15
+ ---
16
+
17
+ ## Quick Start
18
+
19
+ ```bash
20
+ # Install appydave-tools gem
21
+ gem install appydave-tools
22
+
23
+ # Initialize configuration
24
+ vat init
25
+
26
+ # List available brands
27
+ vat list
28
+
29
+ # List projects for a brand
30
+ vat list appydave
31
+
32
+ # Upload files to S3 for collaboration
33
+ vat s3-up appydave b65
34
+
35
+ # Download files from S3
36
+ vat s3-down appydave b65
37
+
38
+ # Check sync status
39
+ vat s3-status appydave b65
40
+ ```
41
+
42
+ ---
43
+
44
+ ## Installation
45
+
46
+ ### Install Gem
47
+
48
+ ```bash
49
+ gem install appydave-tools
50
+ ```
51
+
52
+ ### Initialize Configuration
53
+
54
+ ```bash
55
+ vat init
56
+ ```
57
+
58
+ This creates `~/.vat-config` pointing to your video projects directory.
59
+
60
+ ### AWS CLI Setup
61
+
62
+ VAT uses the AWS CLI for S3 operations. Install and configure:
63
+
64
+ ```bash
65
+ # Install AWS CLI (macOS)
66
+ brew install awscli
67
+
68
+ # Configure AWS credentials (if not using .video-tools.env)
69
+ aws configure
70
+ ```
71
+
72
+ ---
73
+
74
+ ## Configuration
75
+
76
+ ### System Configuration (`~/.vat-config`)
77
+
78
+ Created by `vat init`:
79
+
80
+ ```bash
81
+ VIDEO_PROJECTS_ROOT=/Users/yourname/dev/video-projects
82
+ ```
83
+
84
+ ### Brand Configuration (`.video-tools.env`)
85
+
86
+ Each brand directory contains a `.video-tools.env` file:
87
+
88
+ ```bash
89
+ # AWS Configuration
90
+ AWS_ACCESS_KEY_ID=AKIA...
91
+ AWS_SECRET_ACCESS_KEY=...
92
+ AWS_REGION=ap-southeast-1
93
+ S3_BUCKET=your-bucket-name
94
+ S3_STAGING_PREFIX=staging/v-appydave/
95
+
96
+ # SSD Backup Path
97
+ SSD_BASE=/Volumes/T7/youtube-PUBLISHED/appydave
98
+ ```
99
+
100
+ **Example template**: See `v-shared/video-asset-tools/.env.example` in your video-projects folder.
101
+
102
+ ---
103
+
104
+ ## Commands
105
+
106
+ ### Initialization & Help
107
+
108
+ #### `vat init`
109
+ Initialize VAT configuration.
110
+
111
+ ```bash
112
+ vat init
113
+ ```
114
+
115
+ #### `vat help [command]`
116
+ Show help information.
117
+
118
+ ```bash
119
+ vat help # Overview
120
+ vat help s3-up # Command-specific help
121
+ vat help brands # List available brands
122
+ vat help workflows # Explain FliVideo vs Storyline
123
+ ```
124
+
125
+ ### Project Discovery
126
+
127
+ #### `vat list [--summary] [brand] [pattern]`
128
+ List brands and projects.
129
+
130
+ **Mode 1: Brands only (clean list)**
131
+ ```bash
132
+ vat list
133
+ # Output: Brands: appydave, aitldr, joy, kiros, ss, voz
134
+ ```
135
+
136
+ **Mode 2: Brands with project counts (summary)**
137
+ ```bash
138
+ vat list --summary
139
+ # Output:
140
+ # appydave: 27 projects
141
+ # voz: 3 projects
142
+ # aitldr: 2 projects
143
+ ```
144
+
145
+ **Mode 3: Specific brand's projects**
146
+ ```bash
147
+ vat list appydave
148
+ # Output: Lists all AppyDave projects
149
+ ```
150
+
151
+ **Mode 3b: Pattern matching**
152
+ ```bash
153
+ vat list appydave 'b6*'
154
+ # Output: Lists b60, b61, b62...b69 projects
155
+ ```
156
+
157
+ ### S3 Sync Commands
158
+
159
+ #### `vat s3-up [brand] [project] [--dry-run]`
160
+ Upload files from local `s3-staging/` to S3.
161
+
162
+ ```bash
163
+ # With explicit args
164
+ vat s3-up appydave b65
165
+
166
+ # Auto-detect from current directory
167
+ cd ~/dev/video-projects/v-appydave/b65-project
168
+ vat s3-up
169
+
170
+ # Dry-run (preview without uploading)
171
+ vat s3-up appydave b65 --dry-run
172
+ ```
173
+
174
+ **What it does:**
175
+ - Uploads files from `project/s3-staging/` to S3
176
+ - Skips files already in sync (MD5 comparison)
177
+ - Shows progress and summary
178
+
179
+ #### `vat s3-down [brand] [project] [--dry-run]`
180
+ Download files from S3 to local `s3-staging/`.
181
+
182
+ ```bash
183
+ # With explicit args
184
+ vat s3-down appydave b65
185
+
186
+ # Auto-detect
187
+ cd ~/dev/video-projects/v-appydave/b65-project
188
+ vat s3-down
189
+
190
+ # Dry-run
191
+ vat s3-down voz boy-baker --dry-run
192
+ ```
193
+
194
+ **What it does:**
195
+ - Downloads files from S3 to `project/s3-staging/`
196
+ - Skips files already in sync
197
+ - Creates `s3-staging/` if it doesn't exist
198
+
199
+ #### `vat s3-status [brand] [project]`
200
+ Check sync status between local and S3.
201
+
202
+ ```bash
203
+ vat s3-status appydave b65
204
+ ```
205
+
206
+ **Output:**
207
+ ```
208
+ 📊 S3 Staging Status: v-appydave/b65-project
209
+
210
+ Local s3-staging/:
211
+ ✓ intro.mp4 (150.3 MB)
212
+ ↑ outro.mp4 (75.2 MB)
213
+
214
+ S3 (s3://bucket/staging/v-appydave/b65-project/):
215
+ ✓ intro.mp4 (150.3 MB)
216
+ ↓ chapter-1.mp4 (200.1 MB)
217
+
218
+ Status:
219
+ ✓ In sync: 1
220
+ ↑ Local only (need upload): 1
221
+ ↓ S3 only (need download): 1
222
+ ⚠️ Out of sync (file changed): 0
223
+ ```
224
+
225
+ #### `vat s3-cleanup [brand] [project] [--dry-run] [--force]`
226
+ Delete S3 staging files for a project.
227
+
228
+ ```bash
229
+ # Preview what would be deleted
230
+ vat s3-cleanup appydave b65 --dry-run
231
+
232
+ # Delete with confirmation prompt
233
+ vat s3-cleanup appydave b65
234
+
235
+ # Delete without confirmation
236
+ vat s3-cleanup appydave b65 --force
237
+ ```
238
+
239
+ **Warning:** This deletes files from S3. Use `--dry-run` first!
240
+
241
+ ### Project Management
242
+
243
+ #### `vat manifest [brand]`
244
+ Generate project manifest for a brand.
245
+
246
+ ```bash
247
+ vat manifest appydave
248
+ ```
249
+
250
+ #### `vat archive [brand] [project] [--dry-run]`
251
+ Archive project to SSD backup.
252
+
253
+ ```bash
254
+ vat archive appydave b63
255
+ vat archive appydave b63 --dry-run
256
+ ```
257
+
258
+ #### `vat sync-ssd [brand]`
259
+ Sync light files from SSD for brand.
260
+
261
+ ```bash
262
+ vat sync-ssd appydave
263
+ ```
264
+
265
+ ---
266
+
267
+ ## Examples
268
+
269
+ ### Example 1: Collaboration Workflow (David → Jan)
270
+
271
+ **David (uploads to S3):**
272
+ ```bash
273
+ cd ~/dev/video-projects/v-appydave/b65-guy-monroe
274
+ # Place files in s3-staging/
275
+ mkdir -p s3-staging
276
+ cp ~/Downloads/intro-footage.mp4 s3-staging/
277
+
278
+ # Upload to S3
279
+ vat s3-up appydave b65
280
+ ```
281
+
282
+ **Jan (downloads from S3):**
283
+ ```bash
284
+ cd ~/dev/video-projects/v-appydave/b65-guy-monroe
285
+
286
+ # Check what's available
287
+ vat s3-status appydave b65
288
+
289
+ # Download files
290
+ vat s3-down appydave b65
291
+
292
+ # Edit files in s3-staging/
293
+ # ...
294
+
295
+ # Upload edited files back
296
+ vat s3-up appydave b65
297
+ ```
298
+
299
+ ### Example 2: Pattern Matching
300
+
301
+ ```bash
302
+ # List all b60-series projects
303
+ vat list appydave 'b6*'
304
+
305
+ # List all completed projects
306
+ vat list appydave 'b[1-5]*'
307
+ ```
308
+
309
+ ### Example 3: Cleanup After Project Completion
310
+
311
+ ```bash
312
+ # Archive to SSD
313
+ vat archive appydave b63
314
+
315
+ # Verify sync status
316
+ vat s3-status appydave b63
317
+
318
+ # Clean up S3 (saves storage costs)
319
+ vat s3-cleanup appydave b63 --dry-run # Preview
320
+ vat s3-cleanup appydave b63 --force # Execute
321
+ ```
322
+
323
+ ---
324
+
325
+ ## Workflows
326
+
327
+ ### FliVideo Workflow (AppyDave Brand)
328
+
329
+ **Pattern:** Sequential, chapter-based recording
330
+
331
+ **Project Naming:** `b65-guy-monroe-marketing-plan`
332
+
333
+ **Short Name Support:**
334
+ ```bash
335
+ vat s3-up appydave b65 # Expands to full project name
336
+ ```
337
+
338
+ **Typical Flow:**
339
+ 1. Record chapters sequentially
340
+ 2. Upload raw footage to S3 for collaboration
341
+ 3. Download edited chapters from S3
342
+ 4. Publish final video
343
+ 5. Archive to SSD
344
+
345
+ ### Storyline Workflow (VOZ, AITLDR Brands)
346
+
347
+ **Pattern:** Script-first, narrative-driven content
348
+
349
+ **Project Naming:** `boy-baker`, `the-point`
350
+
351
+ **Full Name Required:**
352
+ ```bash
353
+ vat s3-up voz boy-baker # Use full project name
354
+ ```
355
+
356
+ **Typical Flow:**
357
+ 1. Write script
358
+ 2. Record A-roll (main footage)
359
+ 3. Upload raw footage to S3
360
+ 4. Download edited version from S3
361
+ 5. Publish and archive
362
+
363
+ ---
364
+
365
+ ## Brand Shortcuts
366
+
367
+ VAT supports brand shortcuts for faster typing:
368
+
369
+ | Shortcut | Full Name | Purpose |
370
+ |----------|-----------|---------|
371
+ | `appydave` | `v-appydave` | AppyDave brand videos |
372
+ | `voz` | `v-voz` | VOZ client projects |
373
+ | `aitldr` | `v-aitldr` | AITLDR brand videos |
374
+ | `kiros` | `v-kiros` | Kiros client projects |
375
+ | `joy` | `v-beauty-and-joy` | Beauty & Joy brand |
376
+ | `ss` | `v-supportsignal` | SupportSignal client |
377
+
378
+ **Usage:**
379
+ ```bash
380
+ # Both are equivalent
381
+ vat list appydave
382
+ vat list v-appydave
383
+
384
+ # Both are equivalent
385
+ vat s3-up joy project-name
386
+ vat s3-up v-beauty-and-joy project-name
387
+ ```
388
+
389
+ ---
390
+
391
+ ## Troubleshooting
392
+
393
+ ### "VIDEO_PROJECTS_ROOT not configured"
394
+
395
+ **Solution:**
396
+ ```bash
397
+ vat init
398
+ ```
399
+
400
+ ### "Brand directory not found"
401
+
402
+ **Check available brands:**
403
+ ```bash
404
+ vat list
405
+ ```
406
+
407
+ **Verify config:**
408
+ ```bash
409
+ cat ~/.vat-config
410
+ ```
411
+
412
+ ### "No project found matching 'b65'"
413
+
414
+ **Possible causes:**
415
+ 1. Project doesn't exist in brand directory
416
+ 2. Wrong brand specified
417
+
418
+ **Debug:**
419
+ ```bash
420
+ # List all projects
421
+ vat list appydave
422
+
423
+ # Use full project name
424
+ vat s3-up appydave b65-full-project-name
425
+ ```
426
+
427
+ ### "AWS credentials not found"
428
+
429
+ **Solution 1:** Add to `.video-tools.env` in brand directory
430
+ ```bash
431
+ AWS_ACCESS_KEY_ID=AKIA...
432
+ AWS_SECRET_ACCESS_KEY=...
433
+ AWS_REGION=ap-southeast-1
434
+ ```
435
+
436
+ **Solution 2:** Configure AWS CLI
437
+ ```bash
438
+ aws configure
439
+ ```
440
+
441
+ ### "Could not detect brand and project from current directory"
442
+
443
+ **Solution:** Either:
444
+ 1. Provide explicit args: `vat s3-up appydave b65`
445
+ 2. Ensure you're in project directory: `cd v-appydave/b65-project`
446
+
447
+ ### Files Not Syncing (Always "Skipped")
448
+
449
+ **Cause:** Files haven't changed (MD5 hash matches)
450
+
451
+ **Solution:** If you need to force re-upload, delete from S3 first:
452
+ ```bash
453
+ vat s3-cleanup appydave b65 --force
454
+ vat s3-up appydave b65
455
+ ```
456
+
457
+ ---
458
+
459
+ ## Advanced Usage
460
+
461
+ ### Auto-Detection from PWD
462
+
463
+ All S3 commands support auto-detection:
464
+
465
+ ```bash
466
+ cd ~/dev/video-projects/v-appydave/b65-project
467
+
468
+ # These auto-detect brand and project
469
+ vat s3-up
470
+ vat s3-down
471
+ vat s3-status
472
+ ```
473
+
474
+ ### Dry-Run Mode
475
+
476
+ Preview actions without making changes:
477
+
478
+ ```bash
479
+ vat s3-up appydave b65 --dry-run
480
+ vat s3-down voz boy-baker --dry-run
481
+ vat s3-cleanup aitldr movie-posters --dry-run
482
+ ```
483
+
484
+ ### Interactive Selection
485
+
486
+ When multiple projects match short name:
487
+
488
+ ```bash
489
+ vat s3-up appydave b65
490
+ # Output:
491
+ # ⚠️ Multiple projects match 'b65':
492
+ # 1. b65-first-project
493
+ # 2. b65-second-project
494
+ # Select project (1-2):
495
+ ```
496
+
497
+ ---
498
+
499
+ ## See Also
500
+
501
+ - **AWS Setup Guide:** [docs/usage/vat/aws-setup.md](./vat/aws-setup.md)
502
+ - **Architecture:** [docs/usage/vat/architecture.md](./vat/architecture.md)
503
+ - **Onboarding:** [docs/usage/vat/onboarding.md](./vat/onboarding.md)
504
+ - **Integration Brief:** [docs/vat-integration-plan.md](../vat-integration-plan.md)
505
+
506
+ ---
507
+
508
+ **Last Updated:** 2025-11-08