@mediaproc/cli 0.1.0 → 0.2.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.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # MediaProc
2
2
 
3
- > 🚧 **Under Active Development** - Planning & Architecture Phase
3
+ > ✨ **v0.2.0 Released!** - Image Plugin with 40 commands + Universal convert/info/optimize commands
4
4
 
5
5
  Universal media processing CLI with an extensible plugin architecture. One tool to process all your media - images, videos, audio, documents, and more.
6
6
 
@@ -128,33 +128,48 @@ mediaproc document compress input.pdf --quality high
128
128
 
129
129
  ## šŸ“Š Current Status
130
130
 
131
- **Version**: 0.1.0 (Alpha - Planning & Development Phase)
132
- **Status**: 🚧 Architecture Complete, Implementation In Progress
133
- **Expected Beta**: Q2 2026
134
- **Expected v1.0**: Q4 2026
131
+ **Version**: 0.2.0 (Alpha - Feature Complete Image Plugin!)
132
+ **Status**: āœ… Image plugin with 40 commands + Universal CLI commands
133
+ **Next Release**: Video & Audio plugins (Q1 2026)
134
+ **Expected v1.0**: Q2 2026
135
135
 
136
- ### What's Ready
136
+ ### šŸŽ‰ Released & Ready to Use (v0.2.0)
137
+
138
+ āœ… **Universal CLI Commands** - Work out-of-the-box without plugins
139
+ - `convert` - Auto-detect file type and suggest conversion
140
+ - `info` - Show file details for any media type
141
+ - `optimize` - Auto-optimize with intelligent strategy suggestions
142
+
143
+ āœ… **@mediaproc/image Plugin** - 40 professional image processing commands
144
+ - **Transform** (7): resize, crop, rotate, flip, trim, extend, thumbnail
145
+ - **Color & Tone** (6): modulate, gamma, tint, grayscale, negate, normalize
146
+ - **Effects & Filters** (6): blur, sharpen, median, sepia, vignette, pixelate
147
+ - **Advanced Operations** (5): composite, extract, border, clahe, convolve
148
+ - **Smart/AI Operations** (6): smart-crop, auto-enhance, palette, dominant-color, grid, batch
149
+ - **Utility** (10): convert, optimize, compress, watermark, info, stats, split, stack, mirror, metadata
150
+ - Full documentation with 200+ examples and 10 real-world workflows
137
151
 
138
152
  āœ… **Architecture** - Plugin system designed and implemented
139
153
  āœ… **Core CLI** - Command framework with plugin discovery
154
+ āœ… **Built-in Plugin System** - Image plugin ships with CLI
140
155
  āœ… **Plugin Registry** - Smart plugin management
141
156
  āœ… **Documentation** - Comprehensive guides and standards
142
- āœ… **Community Guidelines** - Contributing, security, code of conduct
143
- āœ… **Third-Party Support** - Standards for community plugins
157
+ āœ… **Community Guidelines** - Contributing, security, code of conduct
144
158
 
145
- ### What's In Progress
159
+ ### 🚧 In Development
146
160
 
147
- 🚧 **Core Plugins** - Implementing image, video, audio processing
148
- 🚧 **Testing** - Unit and integration tests
149
- 🚧 **Performance** - Optimization and benchmarking
161
+ 🚧 **Video Plugin** - Format conversion, transcoding, frame extraction
162
+ 🚧 **Audio Plugin** - Format conversion, normalization, trimming
163
+ 🚧 **Testing** - Comprehensive test coverage
150
164
  🚧 **Examples** - Real-world usage examples
151
165
 
152
166
  ### What's Next
153
167
 
154
- šŸ“‹ **Beta Release** - Feature-complete core plugins (Q2 2026)
155
- šŸ“‹ **Advanced Plugins** - 3D, streaming, AI features (Q3 2026)
156
- šŸ“‹ **Plugin Marketplace** - Community plugin directory (Q4 2026)
157
- šŸ“‹ **v1.0 Release** - Production-ready stable version (Q4 2026)
168
+ šŸ“‹ **Video Plugin** - Format conversion, transcoding (Q1 2026)
169
+ šŸ“‹ **Audio Plugin** - Format conversion, normalization (Q1 2026)
170
+ šŸ“‹ **Document Plugin** - PDF processing, OCR (Q2 2026)
171
+ šŸ“‹ **Advanced Plugins** - 3D, streaming, AI features (Q2-Q3 2026)
172
+ šŸ“‹ **Plugin Marketplace** - Community plugin directory (Q3 2026)
158
173
 
159
174
  See [Upcoming Features](docs/upcoming-features.md) for detailed roadmap.
160
175
 
@@ -162,11 +177,69 @@ See [Upcoming Features](docs/upcoming-features.md) for detailed roadmap.
162
177
 
163
178
  ## ✨ Features
164
179
 
180
+ ### Core Architecture
181
+
182
+ #### šŸŽ **Built-in Plugins** (Out of the Box)
183
+
184
+ MediaProc ships with essential plugins pre-installed, giving you immediate productivity:
185
+
186
+ - **@mediaproc/image** - Professional image processing (19 commands)
187
+ - Resize, crop, rotate, flip, convert formats
188
+ - Filters: blur, sharpen, tint, grayscale, median
189
+ - Color adjustments: modulate, gamma, normalize
190
+ - Utilities: thumbnail, watermark, optimize, trim, extend
191
+
192
+ _More built-in plugins coming soon: video, audio, document_
193
+
194
+ #### šŸ”Œ **Add-on Plugins** (Install as Needed)
195
+
196
+ Extend functionality by installing additional plugins from npm:
197
+
198
+ ```bash
199
+ # Add more plugins from npm
200
+ mediaproc add animation # GIF, WebP, Lottie optimization
201
+ mediaproc add 3d # glTF, OBJ, FBX processing
202
+ mediaproc add stream # HLS/DASH streaming
203
+ mediaproc add ai # AI-powered enhancements
204
+ ```
205
+
206
+ #### šŸ’” **Why This Architecture?**
207
+
208
+ **Universal CLI Benefits:**
209
+
210
+ - āœ… Get started instantly with built-in plugins
211
+ - āœ… Consistent command syntax across all plugins
212
+ - āœ… Unified plugin management (`add`, `remove`, `list`)
213
+ - āœ… Shared configuration and settings
214
+ - āœ… Better integration between different media types
215
+ - āœ… One tool to learn instead of many
216
+
217
+ **Standalone Plugin Benefits:**
218
+
219
+ - āœ… Each plugin can also run independently
220
+ - āœ… Lightweight installs (only what you need)
221
+ - āœ… Faster startup for single-purpose usage
222
+ - āœ… Easy to distribute and share
223
+
224
+ **Example: Two Ways to Use**
225
+
226
+ ```bash
227
+ # Option 1: Use with universal CLI (recommended)
228
+ npm install -g @mediaproc/cli # Includes @mediaproc/image built-in
229
+ mediaproc image resize photo.jpg -w 1920
230
+
231
+ # Option 2: Use plugin standalone (if you only need images)
232
+ npm install -g @mediaproc/image
233
+ mediaproc-image resize photo.jpg -w 1920
234
+ ```
235
+
165
236
  ### Current Features (v0.1.0)
166
237
 
167
238
  #### Core CLI
168
239
 
169
240
  - āœ… Plugin discovery and loading
241
+ - āœ… Built-in plugins (ship with CLI)
242
+ - āœ… Add-on plugins (install from npm)
170
243
  - āœ… Smart installation (auto-detects global/local)
171
244
  - āœ… Plugin registry with short names
172
245
  - āœ… Configuration management
@@ -175,25 +248,101 @@ See [Upcoming Features](docs/upcoming-features.md) for detailed roadmap.
175
248
 
176
249
  #### Plugin Management
177
250
 
178
- - `mediaproc add <plugin>` - Install plugins
179
- - `mediaproc remove <plugin>` - Uninstall plugins
180
- - `mediaproc list` - List installed plugins
251
+ - `mediaproc list` - List all plugins (built-in and installed)
252
+ - `mediaproc add <plugin>` - Install add-on plugins from npm
253
+ - `mediaproc remove <plugin>` - Uninstall add-on plugins
181
254
  - `mediaproc plugins` - Show available plugins
182
255
  - `mediaproc init` - Initialize configuration
183
256
  - `mediaproc config` - Manage settings
184
257
 
185
- ### Planned Features
258
+ #### Universal Commands (Work Without Plugins)
259
+
260
+ - `mediaproc convert <input> <output>` - Auto-detect and convert any media file
261
+ - `mediaproc info <file>` - Show file information for any media type
262
+ - `mediaproc optimize <file>` - Suggest optimization strategy based on file type
263
+
264
+ #### Image Processing (@mediaproc/image) ā˜… BUILT-IN
265
+
266
+ **40 Professional Commands Ready to Use:**
267
+
268
+ **Transform & Resize** (7 commands)
269
+
270
+ - `resize` - Resize with fit modes (cover, contain, fill, inside, outside)
271
+ - `crop` - Extract rectangular regions with positioning
272
+ - `rotate` - Any angle rotation with background control
273
+ - `flip` - Horizontal/vertical/both mirroring
274
+ - `trim` - Auto-remove uniform borders
275
+ - `extend` - Add padding/borders with custom colors
276
+ - `thumbnail` - Generate thumbnails (64px to 512px)
277
+
278
+ **Color & Tone** (6 commands)
279
+
280
+ - `modulate` - Adjust brightness, saturation, hue
281
+ - `gamma` - Gamma correction for midtones (0.1-3.0)
282
+ - `tint` - Apply color tint overlays (RGB hex)
283
+ - `grayscale` - Convert to black & white
284
+ - `negate` - Create negative/inverted images
285
+ - `normalize` - Auto-enhance contrast and brightness
186
286
 
187
- #### Image Processing (Q1 2026)
287
+ **Effects & Filters** (6 commands)
188
288
 
189
- - Resize, crop, rotate, flip
190
- - Format conversion (JPEG, PNG, WebP, AVIF, HEIF)
191
- - Optimization and compression
192
- - Filters (blur, sharpen, grayscale, sepia)
193
- - Watermarking with positioning
194
- - Batch processing
289
+ - `blur` - Gaussian blur (0.3-1000 sigma)
290
+ - `sharpen` - Enhance details and edges (flat/jagged modes)
291
+ - `median` - Noise reduction filter (1-50 size)
292
+ - `sepia` - Vintage sepia tone effect
293
+ - `vignette` - Darken edges for artistic focus
294
+ - `pixelate` - Retro pixel art effect (custom pixel size)
195
295
 
196
- #### Video Processing (Q1 2026)
296
+ **Advanced Operations** (5 commands)
297
+
298
+ - `composite` - Layer images with blend modes (overlay, multiply, screen)
299
+ - `extract` - Extract color channels (red, green, blue, alpha)
300
+ - `border` - Add decorative frames with custom colors
301
+ - `clahe` - Contrast-limited adaptive histogram equalization
302
+ - `convolve` - Apply custom convolution kernels (sharpen, emboss, edge)
303
+
304
+ **Smart/AI Operations** (6 commands)
305
+
306
+ - `smart-crop` - Intelligent content-aware cropping (attention/entropy)
307
+ - `auto-enhance` - Automatic color and contrast enhancement
308
+ - `palette` - Extract dominant color palettes (2-256 colors)
309
+ - `dominant-color` - Quick dominant color extraction
310
+ - `grid` - Combine images into collage layouts
311
+ - `batch` - Process multiple images at once with any operation
312
+
313
+ **Utility** (10 commands)
314
+
315
+ - `convert` - Format conversion (JPG, PNG, WebP, AVIF, TIFF, GIF)
316
+ - `optimize` - Size optimization (up to 70% reduction, lossless/lossy)
317
+ - `compress` - Advanced compression with quality control
318
+ - `watermark` - Add watermarks with positioning and opacity
319
+ - `info` - Display detailed image metadata
320
+ - `stats` - Technical image statistics (channels, depth, color space)
321
+ - `split` - Split image into grid tiles
322
+ - `stack` - Stack images horizontally/vertically
323
+ - `mirror` - Create mirror/kaleidoscope effects
324
+ - `metadata` - View, export, or remove EXIF data
325
+
326
+ **Format Support:**
327
+
328
+ - Input: JPG, PNG, WebP, AVIF, TIFF, GIF, SVG, HEIF
329
+ - Output: JPG, PNG, WebP, AVIF, TIFF, GIF
330
+ - Modern formats: WebP (25-35% smaller), AVIF (50% smaller)
331
+
332
+ **Professional Features:**
333
+
334
+ - Quality control (1-100)
335
+ - Dry-run mode (preview before executing)
336
+ - Verbose logging
337
+ - Built-in help for every command
338
+ - Comprehensive error handling
339
+ - File size reporting
340
+
341
+ See [plugins/image/README.md](plugins/image/README.md) for complete image plugin documentation.
342
+
343
+ ### Planned Features (Add-on Plugins)
344
+
345
+ #### Video Processing (@mediaproc/video) - Q1 2026
197
346
 
198
347
  - Format transcoding (MP4, WebM, AVI, MKV)
199
348
  - Codec conversion (H.264, H.265, VP9, AV1)
@@ -203,7 +352,7 @@ See [Upcoming Features](docs/upcoming-features.md) for detailed roadmap.
203
352
  - Video merging
204
353
  - Audio track management
205
354
 
206
- #### Audio Processing (Q1 2026)
355
+ #### Audio Processing (@mediaproc/audio) - Q1 2026
207
356
 
208
357
  - Format conversion (MP3, AAC, FLAC, WAV, OGG)
209
358
  - Normalization and loudness adjustment
@@ -212,6 +361,10 @@ See [Upcoming Features](docs/upcoming-features.md) for detailed roadmap.
212
361
  - Multi-track merging
213
362
  - Bitrate control
214
363
 
364
+ #### Document Processing (@mediaproc/document) - Q2 2026
365
+
366
+ - Bitrate control
367
+
215
368
  #### Document Processing (Q2 2026)
216
369
 
217
370
  - PDF compression
@@ -250,11 +403,16 @@ See [docs/upcoming-features.md](docs/upcoming-features.md) for complete feature
250
403
  #### From npm (when published)
251
404
 
252
405
  ```bash
253
- # Install globally
406
+ # Install the universal CLI (includes built-in plugins)
254
407
  npm install -g @mediaproc/cli
255
408
 
256
- # Verify installation
409
+ # Start using immediately - image plugin is built-in!
410
+ mediaproc image resize photo.jpg -w 1920
411
+ mediaproc image convert photo.jpg -f webp
412
+
413
+ # Check version and list plugins
257
414
  mediaproc --version
415
+ mediaproc list
258
416
  ```
259
417
 
260
418
  #### From Source (current)
@@ -267,49 +425,57 @@ cd mediaproc
267
425
  # Install dependencies
268
426
  pnpm install
269
427
 
270
- # Build all packages
271
- pnpm build
428
+ # Build all packages (including built-in plugins)
429
+ pnpm build:all
272
430
 
273
431
  # Link globally
274
- pnpm link --global
432
+ cd plugins/image && pnpm link --global
433
+ cd ../.. && pnpm link --global
275
434
 
276
435
  # Verify
277
436
  mediaproc --version
437
+ mediaproc list # Should show @mediaproc/image as built-in
278
438
  ```
279
439
 
280
440
  ### Basic Usage
281
441
 
282
442
  ```bash
283
- # Install your first plugin
284
- mediaproc add image
285
-
286
- # Process an image (when implemented)
443
+ # Image processing (built-in - works immediately!)
287
444
  mediaproc image resize photo.jpg --width 1920 --height 1080
445
+ mediaproc image convert photo.jpg -f webp -q 85
446
+ mediaproc image thumbnail photo.jpg -s 300
288
447
 
289
- # Get help
448
+ # Get help anytime
290
449
  mediaproc --help
291
450
  mediaproc image --help
292
451
  mediaproc image resize --help
293
452
  ```
294
453
 
295
- ### Installing More Plugins
454
+ ### Adding More Plugins
296
455
 
297
456
  ```bash
298
- # Install official plugins
299
- mediaproc add video
300
- mediaproc add audio
301
- mediaproc add document
457
+ # Install additional plugins from npm
458
+ mediaproc add video # Video processing
459
+ mediaproc add audio # Audio processing
460
+ mediaproc add document # PDF processing
302
461
 
303
- # Install third-party plugins
304
- npm install -g mediaproc-plugin-instagram
305
- mediaproc instagram filter photo.jpg --style vintage
462
+ # View all plugins (built-in + installed)
463
+ mediaproc list
306
464
 
307
- # View all available plugins
308
- mediaproc plugins
465
+ # Example output:
466
+ # šŸ“¦ Built-in Plugins:
467
+ # āœ“ image ā˜… BUILT-IN
468
+ #
469
+ # šŸ”Œ User-Installed:
470
+ # āœ“ video
471
+ # āœ“ audio
472
+ ```
309
473
 
310
474
  # View installed plugins
475
+
311
476
  mediaproc list
312
- ```
477
+
478
+ ````
313
479
 
314
480
  ---
315
481
 
@@ -376,6 +542,16 @@ Comprehensive documentation is available in the [docs/](docs/) folder:
376
542
  - Phase 3: AI & future-proof (Q4 2026)
377
543
  - Long-term vision (2027+)
378
544
 
545
+ ### Plugin Documentation
546
+
547
+ - **[Image Plugin Documentation](docs/image-plugin-documentation.md)** - Complete reference for the Image Plugin
548
+ - All 40 commands documented
549
+ - Usage examples and workflows
550
+ - Best practices and tips
551
+ - Social media presets
552
+ - Real-world use cases
553
+ - Troubleshooting guide
554
+
379
555
  ### Community Guides
380
556
 
381
557
  - **[Contributing](CONTRIBUTING.md)** - How to contribute to MediaProc
@@ -434,7 +610,7 @@ mediaproc image watermark photo.jpg --text "Ā© 2025" --position bottom-right
434
610
  for img in photos/*.jpg; do
435
611
  mediaproc image convert "$img" --format webp --quality 85
436
612
  done
437
- ```
613
+ ````
438
614
 
439
615
  ### Video Processing
440
616
 
@@ -503,7 +679,7 @@ steps:
503
679
  mediaproc run workflow.yaml --input images/ --output optimized/
504
680
  ```
505
681
 
506
- _Note: Most commands shown above are planned for implementation. See [Current Status](#-current-status) for what's available now._
682
+ _Note: Image processing commands are **fully implemented and ready to use**! Video, audio, and other commands are planned for Q1-Q2 2026. See [Current Status](#-current-status) for details._
507
683
 
508
684
  ---
509
685
 
package/dist/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAiBA,wBAAsB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAmCzC"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AA4BA,wBAAsB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAwCzC"}
package/dist/cli.js CHANGED
@@ -1,6 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { Command } from 'commander';
3
3
  import chalk from 'chalk';
4
+ import { readFileSync } from 'fs';
5
+ import { join, dirname } from 'path';
6
+ import { fileURLToPath } from 'url';
4
7
  import { PluginManager } from './plugin-manager.js';
5
8
  import { addCommand } from './commands/add.js';
6
9
  import { removeCommand } from './commands/remove.js';
@@ -10,13 +13,20 @@ import { initCommand } from './commands/init.js';
10
13
  import { configCommand } from './commands/config.js';
11
14
  import { runCommand } from './commands/run.js';
12
15
  import { validateCommand } from './commands/validate.js';
16
+ import { convertCommand } from './commands/convert.js';
17
+ import { infoCommand } from './commands/info.js';
18
+ import { optimizeCommand } from './commands/optimize.js';
13
19
  const program = new Command();
14
20
  const pluginManager = new PluginManager();
21
+ // Get version from package.json
22
+ const __filename = fileURLToPath(import.meta.url);
23
+ const __dirname = dirname(__filename);
24
+ const packageJson = JSON.parse(readFileSync(join(__dirname, '../package.json'), 'utf-8'));
15
25
  export async function cli() {
16
26
  program
17
27
  .name('mediaproc')
18
28
  .description('Modern, plugin-based media processing CLI')
19
- .version('1.0.0');
29
+ .version(packageJson.version);
20
30
  // Plugin management commands
21
31
  addCommand(program, pluginManager);
22
32
  removeCommand(program, pluginManager);
@@ -25,6 +35,10 @@ export async function cli() {
25
35
  // Project management commands
26
36
  initCommand(program);
27
37
  configCommand(program);
38
+ // Universal commands (work without plugins)
39
+ convertCommand(program);
40
+ infoCommand(program);
41
+ optimizeCommand(program);
28
42
  // Utility commands
29
43
  runCommand(program);
30
44
  validateCommand(program);
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,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AAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5E,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,wBAAwB,CAAC,EAAE,YAAY,CAAC,CAAC;IACnE,CAAC;IAED,kBAAkB;IAClB,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAE5B,mCAAmC;IACnC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;QAClC,OAAO,CAAC,UAAU,EAAE,CAAC;IACvB,CAAC;AACH,CAAC;AAED,qCAAqC;AACrC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACpB,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,KAAK,CAAC,CAAC;IAChD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/commands/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAqDpD"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/commands/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAmEpD"}
@@ -14,9 +14,17 @@ export function configCommand(program) {
14
14
  console.log(chalk.yellow('No config file found. Run: mediaproc init'));
15
15
  return;
16
16
  }
17
- const config = JSON.parse(readFileSync(configPath, 'utf-8'));
18
- console.log(chalk.bold('\nCurrent Configuration:\n'));
19
- console.log(JSON.stringify(config, null, 2));
17
+ try {
18
+ const config = JSON.parse(readFileSync(configPath, 'utf-8'));
19
+ console.log(chalk.bold('\nCurrent Configuration:\n'));
20
+ console.log(JSON.stringify(config, null, 2));
21
+ }
22
+ catch (error) {
23
+ console.error(chalk.red('āœ— Failed to parse config file (corrupted JSON)'));
24
+ const errorMessage = error instanceof Error ? error.message : String(error);
25
+ console.error(chalk.dim(errorMessage));
26
+ process.exit(1);
27
+ }
20
28
  });
21
29
  configCmd
22
30
  .command('set <key> <value>')
@@ -27,24 +35,32 @@ export function configCommand(program) {
27
35
  console.log(chalk.yellow('No config file found. Run: mediaproc init'));
28
36
  return;
29
37
  }
30
- const config = JSON.parse(readFileSync(configPath, 'utf-8'));
31
- // Simple dot notation support
32
- const keys = key.split('.');
33
- let current = config;
34
- for (let i = 0; i < keys.length - 1; i++) {
35
- if (!current[keys[i]])
36
- current[keys[i]] = {};
37
- current = current[keys[i]];
38
- }
39
- // Try to parse value as JSON, fallback to string
40
38
  try {
41
- current[keys[keys.length - 1]] = JSON.parse(value);
39
+ const config = JSON.parse(readFileSync(configPath, 'utf-8'));
40
+ // Simple dot notation support
41
+ const keys = key.split('.');
42
+ let current = config;
43
+ for (let i = 0; i < keys.length - 1; i++) {
44
+ if (!current[keys[i]])
45
+ current[keys[i]] = {};
46
+ current = current[keys[i]];
47
+ }
48
+ // Try to parse value as JSON, fallback to string
49
+ try {
50
+ current[keys[keys.length - 1]] = JSON.parse(value);
51
+ }
52
+ catch {
53
+ current[keys[keys.length - 1]] = value;
54
+ }
55
+ writeFileSync(configPath, JSON.stringify(config, null, 2));
56
+ console.log(chalk.green(`āœ“ Set ${key} = ${value}`));
42
57
  }
43
- catch {
44
- current[keys[keys.length - 1]] = value;
58
+ catch (error) {
59
+ console.error(chalk.red('āœ— Failed to parse or update config file'));
60
+ const errorMessage = error instanceof Error ? error.message : String(error);
61
+ console.error(chalk.dim(errorMessage));
62
+ process.exit(1);
45
63
  }
46
- writeFileSync(configPath, JSON.stringify(config, null, 2));
47
- console.log(chalk.green(`āœ“ Set ${key} = ${value}`));
48
64
  });
49
65
  }
50
66
  //# sourceMappingURL=config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/commands/config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,MAAM,UAAU,aAAa,CAAC,OAAgB;IAC5C,MAAM,SAAS,GAAG,OAAO;SACtB,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,gCAAgC,CAAC,CAAC;IAEjD,SAAS;SACN,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,4BAA4B,CAAC;SACzC,MAAM,CAAC,GAAG,EAAE;QACX,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,uBAAuB,CAAC,CAAC;QAEhE,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;YAC5B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,2CAA2C,CAAC,CAAC,CAAC;YACvE,OAAO;QACT,CAAC;QAED,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC;QAC7D,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC,CAAC;QACtD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;IAEL,SAAS;SACN,OAAO,CAAC,mBAAmB,CAAC;SAC5B,WAAW,CAAC,2BAA2B,CAAC;SACxC,MAAM,CAAC,CAAC,GAAW,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,iDAAiD;YACjD,IAAI,CAAC;gBACH,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACrD,CAAC;YAAC,MAAM,CAAC;gBACP,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;YACzC,CAAC;YAED,aAAa,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;YAC3D,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,GAAG,MAAM,KAAK,EAAE,CAAC,CAAC,CAAC;QACtD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,yCAAyC,CAAC,CAAC,CAAC;YACpE,MAAM,YAAY,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAC5E,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC;YACvC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { Command } from 'commander';
2
+ /**
3
+ * Universal convert command - auto-detects file type and suggests appropriate plugin
4
+ */
5
+ export declare function convertCommand(program: Command): void;
6
+ //# sourceMappingURL=convert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../../src/commands/convert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAmErD"}
@@ -0,0 +1,74 @@
1
+ import chalk from 'chalk';
2
+ import { extname } from 'path';
3
+ import { existsSync } from 'fs';
4
+ /**
5
+ * Universal convert command - auto-detects file type and suggests appropriate plugin
6
+ */
7
+ export function convertCommand(program) {
8
+ program
9
+ .command('convert <input> <output>')
10
+ .description('Universal converter - auto-detects file type and converts')
11
+ .option('-q, --quality <number>', 'Quality (1-100)', '85')
12
+ .option('-f, --force', 'Overwrite existing output file')
13
+ .option('-v, --verbose', 'Verbose output')
14
+ .action((input, output, options) => {
15
+ if (!existsSync(input)) {
16
+ console.error(chalk.red(`āœ— Input file not found: ${input}`));
17
+ process.exit(1);
18
+ }
19
+ if (existsSync(output) && !options.force) {
20
+ console.error(chalk.red(`āœ— Output file already exists: ${output}`));
21
+ console.log(chalk.dim('Use --force to overwrite'));
22
+ process.exit(1);
23
+ }
24
+ const inputExt = extname(input).toLowerCase().slice(1);
25
+ const outputExt = extname(output).toLowerCase().slice(1);
26
+ // Detect media type and suggest plugin
27
+ const imageExts = ['jpg', 'jpeg', 'png', 'webp', 'gif', 'bmp', 'tiff', 'avif', 'heif', 'svg'];
28
+ const videoExts = ['mp4', 'webm', 'mkv', 'avi', 'mov', 'flv', 'wmv', 'm4v', 'mpg', 'mpeg'];
29
+ const audioExts = ['mp3', 'wav', 'ogg', 'flac', 'aac', 'm4a', 'wma', 'opus'];
30
+ const documentExts = ['pdf', 'docx', 'doc', 'pptx', 'ppt', 'xlsx', 'xls', 'epub'];
31
+ const modelExts = ['gltf', 'glb', 'obj', 'fbx', 'usdz'];
32
+ let pluginName = '';
33
+ let mediaType = '';
34
+ if (imageExts.includes(inputExt) || imageExts.includes(outputExt)) {
35
+ pluginName = 'image';
36
+ mediaType = 'image';
37
+ }
38
+ else if (videoExts.includes(inputExt) || videoExts.includes(outputExt)) {
39
+ pluginName = 'video';
40
+ mediaType = 'video';
41
+ }
42
+ else if (audioExts.includes(inputExt) || audioExts.includes(outputExt)) {
43
+ pluginName = 'audio';
44
+ mediaType = 'audio';
45
+ }
46
+ else if (documentExts.includes(inputExt) || documentExts.includes(outputExt)) {
47
+ pluginName = 'document';
48
+ mediaType = 'document';
49
+ }
50
+ else if (modelExts.includes(inputExt) || modelExts.includes(outputExt)) {
51
+ pluginName = '3d';
52
+ mediaType = '3D model';
53
+ }
54
+ else {
55
+ console.error(chalk.red(`āœ— Unsupported file format: ${inputExt} → ${outputExt}`));
56
+ console.log(chalk.yellow('\nšŸ’” Supported formats:'));
57
+ console.log(chalk.dim(' Images: jpg, png, webp, gif, avif, heif, svg'));
58
+ console.log(chalk.dim(' Videos: mp4, webm, mkv, avi, mov'));
59
+ console.log(chalk.dim(' Audio: mp3, wav, ogg, flac, aac'));
60
+ console.log(chalk.dim(' Documents: pdf, docx, pptx, epub'));
61
+ console.log(chalk.dim(' 3D Models: gltf, glb, obj, fbx'));
62
+ process.exit(1);
63
+ }
64
+ console.log(chalk.blue(`šŸŽÆ Detected ${mediaType} conversion`));
65
+ console.log(chalk.dim(` ${inputExt.toUpperCase()} → ${outputExt.toUpperCase()}`));
66
+ console.log('');
67
+ console.log(chalk.yellow(`⚔ Quick command:`));
68
+ console.log(chalk.cyan(` mediaproc ${pluginName} convert ${input} ${output} --quality ${options.quality || 85}`));
69
+ console.log('');
70
+ console.log(chalk.dim(`šŸ’” Install plugin: mediaproc add ${pluginName}`));
71
+ console.log(chalk.dim(` Then run the command above`));
72
+ });
73
+ }
74
+ //# sourceMappingURL=convert.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convert.js","sourceRoot":"","sources":["../../src/commands/convert.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAEhC;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,OAAgB;IAC7C,OAAO;SACJ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AC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAgB,UAAU,YAAY,KAAK,IAAI,MAAM,cAAc,OAAO,CAAC,OAAO,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;QACpH,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAChB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,oCAAoC,UAAU,EAAE,CAAC,CAAC,CAAC;QACzE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC,CAAC;IAC1D,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { Command } from 'commander';
2
+ /**
3
+ * Universal info command - shows basic file information for any media type
4
+ */
5
+ export declare function infoCommand(program: Command): void;
6
+ //# sourceMappingURL=info.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../src/commands/info.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC;;GAEG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA+FlD"}