@mediaproc/cli 0.1.0 → 0.3.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 +381 -54
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +24 -9
- package/dist/cli.js.map +1 -1
- package/dist/commands/add.d.ts.map +1 -1
- package/dist/commands/add.js +108 -39
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +86 -27
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/convert.d.ts +7 -0
- package/dist/commands/convert.d.ts.map +1 -0
- package/dist/commands/convert.js +96 -0
- package/dist/commands/convert.js.map +1 -0
- package/dist/commands/help.js +2 -2
- package/dist/commands/help.js.map +1 -1
- package/dist/commands/info.d.ts +7 -0
- package/dist/commands/info.d.ts.map +1 -0
- package/dist/commands/info.js +117 -0
- package/dist/commands/info.js.map +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +25 -47
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/list.d.ts.map +1 -1
- package/dist/commands/list.js +90 -17
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/optimize.d.ts +7 -0
- package/dist/commands/optimize.d.ts.map +1 -0
- package/dist/commands/optimize.js +196 -0
- package/dist/commands/optimize.js.map +1 -0
- package/dist/commands/plugins.d.ts +4 -0
- package/dist/commands/plugins.d.ts.map +1 -0
- package/dist/commands/plugins.js +79 -0
- package/dist/commands/plugins.js.map +1 -0
- package/dist/commands/remove.d.ts.map +1 -1
- package/dist/commands/remove.js +92 -11
- package/dist/commands/remove.js.map +1 -1
- package/dist/config-manager.d.ts +110 -0
- package/dist/config-manager.d.ts.map +1 -0
- package/dist/config-manager.js +201 -0
- package/dist/config-manager.js.map +1 -0
- package/dist/plugin-manager.d.ts +31 -7
- package/dist/plugin-manager.d.ts.map +1 -1
- package/dist/plugin-manager.js +75 -44
- package/dist/plugin-manager.js.map +1 -1
- package/dist/plugin-registry.d.ts +9 -0
- package/dist/plugin-registry.d.ts.map +1 -1
- package/dist/plugin-registry.js +41 -6
- package/dist/plugin-registry.js.map +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# MediaProc
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> ✨ **v0.2.0 Released!** - Image Plugin with 49 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
|
|
|
@@ -20,6 +20,7 @@ Universal media processing CLI with an extensible plugin architecture. One tool
|
|
|
20
20
|
- [Features](#-features)
|
|
21
21
|
- [Quick Start](#-quick-start)
|
|
22
22
|
- [Available Plugins](#-available-plugins)
|
|
23
|
+
- [Plugin Terminology](#-plugin-terminology)
|
|
23
24
|
- [Documentation](#-documentation)
|
|
24
25
|
- [Examples](#-examples)
|
|
25
26
|
- [Development](#-development)
|
|
@@ -128,33 +129,137 @@ mediaproc document compress input.pdf --quality high
|
|
|
128
129
|
|
|
129
130
|
## 📊 Current Status
|
|
130
131
|
|
|
131
|
-
**Version**: 0.
|
|
132
|
-
**Status**:
|
|
133
|
-
**
|
|
134
|
-
**Expected v1.0**:
|
|
132
|
+
**Version**: 0.2.0 (Alpha - Feature Complete Image Plugin!)
|
|
133
|
+
**Status**: ✅ Image plugin with 49 commands + Universal CLI commands
|
|
134
|
+
**Next Release**: Video & Audio plugins (Q1 2026)
|
|
135
|
+
**Expected v1.0**: Q2 2026
|
|
135
136
|
|
|
136
|
-
###
|
|
137
|
+
### Plugin Management
|
|
138
|
+
|
|
139
|
+
- `mediaproc list` - List all plugins (built-in and installed)
|
|
140
|
+
- `mediaproc add <plugin>` - Install add-on plugins from npm
|
|
141
|
+
- `mediaproc remove <plugin>` - Uninstall add-on plugins
|
|
142
|
+
- `mediaproc plugins` - Show available plugins
|
|
143
|
+
- `mediaproc init` - Initialize configuration
|
|
144
|
+
- `mediaproc config` - Manage settings
|
|
145
|
+
|
|
146
|
+
### Universal Commands (Work Without Plugins)
|
|
147
|
+
|
|
148
|
+
- `mediaproc convert <input> <output>` - Auto-detect and convert any media file
|
|
149
|
+
- `mediaproc info <file>` - Show file information for any media type
|
|
150
|
+
- `mediaproc optimize <file>` - Suggest optimization strategy based on file type
|
|
151
|
+
|
|
152
|
+
### Image Processing (@mediaproc/image)
|
|
153
|
+
|
|
154
|
+
**Install:** `mediaproc add image`
|
|
155
|
+
|
|
156
|
+
**49 Professional Commands Available:**
|
|
157
|
+
|
|
158
|
+
**Transform & Resize** (10 commands)
|
|
159
|
+
|
|
160
|
+
- `resize` - Resize with fit modes (cover, contain, fill, inside, outside)
|
|
161
|
+
- `crop` - Extract rectangular regions with positioning
|
|
162
|
+
- `rotate` - Any angle rotation with background control
|
|
163
|
+
- `flip` - Vertical mirroring (top-bottom)
|
|
164
|
+
- `flop` - Horizontal mirroring (left-right)
|
|
165
|
+
- `auto-orient` - Auto-rotate based on EXIF orientation
|
|
166
|
+
- `affine` - Apply affine transformation matrix (scale, shear, reflect)
|
|
167
|
+
- `trim` - Auto-remove uniform borders
|
|
168
|
+
- `extend` - Add padding/borders with custom colors
|
|
169
|
+
- `thumbnail` - Generate thumbnails (64px to 512px)
|
|
170
|
+
|
|
171
|
+
**Color & Tone** (10 commands)
|
|
172
|
+
|
|
173
|
+
- `modulate` - Adjust brightness, saturation, hue
|
|
174
|
+
- `gamma` - Gamma correction for midtones (0.1-3.0)
|
|
175
|
+
- `tint` - Apply color tint overlays (RGB hex)
|
|
176
|
+
- `grayscale` - Convert to black & white
|
|
177
|
+
- `negate` - Create negative/inverted images
|
|
178
|
+
- `normalize` - Auto-enhance contrast and brightness
|
|
179
|
+
- `linear` - Apply linear formula: output = (a \* input) + b
|
|
180
|
+
- `recomb` - Recombine RGB channels using matrix
|
|
181
|
+
- `flatten` - Remove alpha transparency with background color
|
|
182
|
+
- `unflatten` - Add alpha channel (RGB→RGBA)
|
|
183
|
+
|
|
184
|
+
**Effects & Filters** (9 commands)
|
|
185
|
+
|
|
186
|
+
- `blur` - Gaussian blur (0.3-1000 sigma)
|
|
187
|
+
- `sharpen` - Enhance details and edges (flat/jagged modes)
|
|
188
|
+
- `median` - Noise reduction filter (1-50 size)
|
|
189
|
+
- `sepia` - Vintage sepia tone effect
|
|
190
|
+
- `vignette` - Darken edges for artistic focus
|
|
191
|
+
- `pixelate` - Retro pixel art effect (custom pixel size)
|
|
192
|
+
- `threshold` - Binary black/white conversion (0-255)
|
|
193
|
+
- `dilate` - Morphological dilation (expand bright regions)
|
|
194
|
+
- `erode` - Morphological erosion (expand dark regions)
|
|
195
|
+
|
|
196
|
+
**Advanced Operations** (6 commands)
|
|
197
|
+
|
|
198
|
+
- `composite` - Layer images with blend modes (overlay, multiply, screen)
|
|
199
|
+
- `extract` - Extract color channels (red, green, blue, alpha)
|
|
200
|
+
- `border` - Add decorative frames with custom colors
|
|
201
|
+
- `clahe` - Contrast-limited adaptive histogram equalization
|
|
202
|
+
- `convolve` - Apply custom convolution kernels (sharpen, emboss, edge)
|
|
203
|
+
- `boolean` - Perform boolean operations between images (AND, OR, XOR)
|
|
204
|
+
|
|
205
|
+
**Smart/AI Operations** (6 commands)
|
|
206
|
+
|
|
207
|
+
- `smart-crop` - Intelligent content-aware cropping (attention/entropy)
|
|
208
|
+
- `auto-enhance` - Automatic color and contrast enhancement
|
|
209
|
+
- `palette` - Extract dominant color palettes (2-256 colors)
|
|
210
|
+
- `dominant-color` - Quick dominant color extraction
|
|
211
|
+
- `grid` - Combine images into collage layouts
|
|
212
|
+
- `batch` - Process multiple images at once with any operation
|
|
213
|
+
|
|
214
|
+
**Utility** (10 commands)
|
|
215
|
+
|
|
216
|
+
- `convert` - Format conversion (JPG, PNG, WebP, AVIF, TIFF, GIF)
|
|
217
|
+
- `optimize` - Size optimization (up to 70% reduction, lossless/lossy)
|
|
218
|
+
- `compress` - Advanced compression with quality control
|
|
219
|
+
- `watermark` - Add watermarks with positioning and opacity
|
|
220
|
+
- `info` - Display detailed image metadata
|
|
221
|
+
- `stats` - Technical image statistics (channels, depth, color space)
|
|
222
|
+
- `split` - Split image into grid tiles
|
|
223
|
+
- `stack` - Stack images horizontally/vertically
|
|
224
|
+
- `mirror` - Create mirror/kaleidoscope effects
|
|
225
|
+
- `metadata` - View, export, or remove EXIF data
|
|
226
|
+
|
|
227
|
+
**Format Support:**
|
|
228
|
+
|
|
229
|
+
- Input: JPG, PNG, WebP, AVIF, TIFF, GIF, SVG, HEIF
|
|
230
|
+
- Output: JPG, PNG, WebP, AVIF, TIFF, GIF
|
|
231
|
+
- Modern formats: WebP (25-35% smaller), AVIF (50% smaller)
|
|
232
|
+
|
|
233
|
+
**Professional Features:**
|
|
234
|
+
|
|
235
|
+
- Quality control (1-100)
|
|
236
|
+
- Dry-run mode (preview before executing)
|
|
237
|
+
- Verbose logging
|
|
238
|
+
- Built-in help for every command
|
|
239
|
+
- Comprehensive error handling
|
|
240
|
+
- File size reporting
|
|
137
241
|
|
|
138
242
|
✅ **Architecture** - Plugin system designed and implemented
|
|
139
243
|
✅ **Core CLI** - Command framework with plugin discovery
|
|
244
|
+
✅ **Built-in Plugin System** - Image plugin ships with CLI
|
|
140
245
|
✅ **Plugin Registry** - Smart plugin management
|
|
141
246
|
✅ **Documentation** - Comprehensive guides and standards
|
|
142
|
-
✅ **Community Guidelines** - Contributing, security, code of conduct
|
|
143
|
-
✅ **Third-Party Support** - Standards for community plugins
|
|
247
|
+
✅ **Community Guidelines** - Contributing, security, code of conduct
|
|
144
248
|
|
|
145
|
-
###
|
|
249
|
+
### 🚧 In Development
|
|
146
250
|
|
|
147
|
-
🚧 **
|
|
148
|
-
🚧 **
|
|
149
|
-
🚧 **
|
|
251
|
+
🚧 **Video Plugin** - Format conversion, transcoding, frame extraction
|
|
252
|
+
🚧 **Audio Plugin** - Format conversion, normalization, trimming
|
|
253
|
+
🚧 **Testing** - Comprehensive test coverage
|
|
150
254
|
🚧 **Examples** - Real-world usage examples
|
|
151
255
|
|
|
152
256
|
### What's Next
|
|
153
257
|
|
|
154
|
-
📋 **
|
|
155
|
-
📋 **
|
|
156
|
-
📋 **Plugin
|
|
157
|
-
📋 **
|
|
258
|
+
📋 **Video Plugin** - Format conversion, transcoding (Q1 2026)
|
|
259
|
+
📋 **Audio Plugin** - Format conversion, normalization (Q1 2026)
|
|
260
|
+
📋 **Document Plugin** - PDF processing, OCR (Q2 2026)
|
|
261
|
+
📋 **Advanced Plugins** - 3D, streaming, AI features (Q2-Q3 2026)
|
|
262
|
+
📋 **Plugin Marketplace** - Community plugin directory (Q3 2026)
|
|
158
263
|
|
|
159
264
|
See [Upcoming Features](docs/upcoming-features.md) for detailed roadmap.
|
|
160
265
|
|
|
@@ -162,11 +267,69 @@ See [Upcoming Features](docs/upcoming-features.md) for detailed roadmap.
|
|
|
162
267
|
|
|
163
268
|
## ✨ Features
|
|
164
269
|
|
|
165
|
-
###
|
|
270
|
+
### Core Architecture
|
|
271
|
+
|
|
272
|
+
#### 🎁 **Built-in Plugins** (Out of the Box)
|
|
273
|
+
|
|
274
|
+
MediaProc ships with essential plugins pre-installed, giving you immediate productivity:
|
|
275
|
+
|
|
276
|
+
- **@mediaproc/image** - Professional image processing (40 commands)
|
|
277
|
+
- Resize, crop, rotate, flip, convert formats
|
|
278
|
+
- Filters: blur, sharpen, tint, grayscale, median
|
|
279
|
+
- Color adjustments: modulate, gamma, normalize
|
|
280
|
+
- Utilities: thumbnail, watermark, optimize, trim, extend
|
|
281
|
+
|
|
282
|
+
_More built-in plugins coming soon: video, audio, document_
|
|
283
|
+
|
|
284
|
+
#### 🔌 **Add-on Plugins** (Install as Needed)
|
|
285
|
+
|
|
286
|
+
Extend functionality by installing additional plugins from npm:
|
|
287
|
+
|
|
288
|
+
```bash
|
|
289
|
+
# Add more plugins from npm
|
|
290
|
+
mediaproc add animation # GIF, WebP, Lottie optimization
|
|
291
|
+
mediaproc add 3d # glTF, OBJ, FBX processing
|
|
292
|
+
mediaproc add stream # HLS/DASH streaming
|
|
293
|
+
mediaproc add ai # AI-powered enhancements
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
#### 💡 **Why This Architecture?**
|
|
297
|
+
|
|
298
|
+
**Universal CLI Benefits:**
|
|
299
|
+
|
|
300
|
+
- ✅ Get started instantly with built-in plugins
|
|
301
|
+
- ✅ Consistent command syntax across all plugins
|
|
302
|
+
- ✅ Unified plugin management (`add`, `remove`, `list`)
|
|
303
|
+
- ✅ Shared configuration and settings
|
|
304
|
+
- ✅ Better integration between different media types
|
|
305
|
+
- ✅ One tool to learn instead of many
|
|
306
|
+
|
|
307
|
+
**Standalone Plugin Benefits:**
|
|
308
|
+
|
|
309
|
+
- ✅ Each plugin can also run independently
|
|
310
|
+
- ✅ Lightweight installs (only what you need)
|
|
311
|
+
- ✅ Faster startup for single-purpose usage
|
|
312
|
+
- ✅ Easy to distribute and share
|
|
313
|
+
|
|
314
|
+
**Example: Two Ways to Use**
|
|
315
|
+
|
|
316
|
+
```bash
|
|
317
|
+
# Option 1: Use with universal CLI (recommended)
|
|
318
|
+
npm install -g @mediaproc/cli # Includes @mediaproc/image built-in
|
|
319
|
+
mediaproc image resize photo.jpg -w 1920
|
|
320
|
+
|
|
321
|
+
# Option 2: Use plugin standalone (if you only need images)
|
|
322
|
+
npm install -g @mediaproc/image
|
|
323
|
+
mediaproc-image resize photo.jpg -w 1920
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
### Current Features (v0.2.0)
|
|
166
327
|
|
|
167
328
|
#### Core CLI
|
|
168
329
|
|
|
169
330
|
- ✅ Plugin discovery and loading
|
|
331
|
+
- ✅ Built-in plugins (ship with CLI)
|
|
332
|
+
- ✅ Add-on plugins (install from npm)
|
|
170
333
|
- ✅ Smart installation (auto-detects global/local)
|
|
171
334
|
- ✅ Plugin registry with short names
|
|
172
335
|
- ✅ Configuration management
|
|
@@ -175,25 +338,101 @@ See [Upcoming Features](docs/upcoming-features.md) for detailed roadmap.
|
|
|
175
338
|
|
|
176
339
|
#### Plugin Management
|
|
177
340
|
|
|
178
|
-
- `mediaproc
|
|
179
|
-
- `mediaproc
|
|
180
|
-
- `mediaproc
|
|
341
|
+
- `mediaproc list` - List all plugins (built-in and installed)
|
|
342
|
+
- `mediaproc add <plugin>` - Install add-on plugins from npm
|
|
343
|
+
- `mediaproc remove <plugin>` - Uninstall add-on plugins
|
|
181
344
|
- `mediaproc plugins` - Show available plugins
|
|
182
345
|
- `mediaproc init` - Initialize configuration
|
|
183
346
|
- `mediaproc config` - Manage settings
|
|
184
347
|
|
|
185
|
-
|
|
348
|
+
#### Universal Commands (Work Without Plugins)
|
|
349
|
+
|
|
350
|
+
- `mediaproc convert <input> <output>` - Auto-detect and convert any media file
|
|
351
|
+
- `mediaproc info <file>` - Show file information for any media type
|
|
352
|
+
- `mediaproc optimize <file>` - Suggest optimization strategy based on file type
|
|
353
|
+
|
|
354
|
+
#### Image Processing (@mediaproc/image) ★ BUILT-IN
|
|
355
|
+
|
|
356
|
+
**40 Professional Commands Ready to Use:**
|
|
357
|
+
|
|
358
|
+
**Transform & Resize** (7 commands)
|
|
359
|
+
|
|
360
|
+
- `resize` - Resize with fit modes (cover, contain, fill, inside, outside)
|
|
361
|
+
- `crop` - Extract rectangular regions with positioning
|
|
362
|
+
- `rotate` - Any angle rotation with background control
|
|
363
|
+
- `flip` - Horizontal/vertical/both mirroring
|
|
364
|
+
- `trim` - Auto-remove uniform borders
|
|
365
|
+
- `extend` - Add padding/borders with custom colors
|
|
366
|
+
- `thumbnail` - Generate thumbnails (64px to 512px)
|
|
367
|
+
|
|
368
|
+
**Color & Tone** (6 commands)
|
|
369
|
+
|
|
370
|
+
- `modulate` - Adjust brightness, saturation, hue
|
|
371
|
+
- `gamma` - Gamma correction for midtones (0.1-3.0)
|
|
372
|
+
- `tint` - Apply color tint overlays (RGB hex)
|
|
373
|
+
- `grayscale` - Convert to black & white
|
|
374
|
+
- `negate` - Create negative/inverted images
|
|
375
|
+
- `normalize` - Auto-enhance contrast and brightness
|
|
376
|
+
|
|
377
|
+
**Effects & Filters** (6 commands)
|
|
378
|
+
|
|
379
|
+
- `blur` - Gaussian blur (0.3-1000 sigma)
|
|
380
|
+
- `sharpen` - Enhance details and edges (flat/jagged modes)
|
|
381
|
+
- `median` - Noise reduction filter (1-50 size)
|
|
382
|
+
- `sepia` - Vintage sepia tone effect
|
|
383
|
+
- `vignette` - Darken edges for artistic focus
|
|
384
|
+
- `pixelate` - Retro pixel art effect (custom pixel size)
|
|
186
385
|
|
|
187
|
-
|
|
386
|
+
**Advanced Operations** (5 commands)
|
|
188
387
|
|
|
189
|
-
-
|
|
190
|
-
-
|
|
191
|
-
-
|
|
192
|
-
-
|
|
193
|
-
-
|
|
194
|
-
- Batch processing
|
|
388
|
+
- `composite` - Layer images with blend modes (overlay, multiply, screen)
|
|
389
|
+
- `extract` - Extract color channels (red, green, blue, alpha)
|
|
390
|
+
- `border` - Add decorative frames with custom colors
|
|
391
|
+
- `clahe` - Contrast-limited adaptive histogram equalization
|
|
392
|
+
- `convolve` - Apply custom convolution kernels (sharpen, emboss, edge)
|
|
195
393
|
|
|
196
|
-
|
|
394
|
+
**Smart/AI Operations** (6 commands)
|
|
395
|
+
|
|
396
|
+
- `smart-crop` - Intelligent content-aware cropping (attention/entropy)
|
|
397
|
+
- `auto-enhance` - Automatic color and contrast enhancement
|
|
398
|
+
- `palette` - Extract dominant color palettes (2-256 colors)
|
|
399
|
+
- `dominant-color` - Quick dominant color extraction
|
|
400
|
+
- `grid` - Combine images into collage layouts
|
|
401
|
+
- `batch` - Process multiple images at once with any operation
|
|
402
|
+
|
|
403
|
+
**Utility** (10 commands)
|
|
404
|
+
|
|
405
|
+
- `convert` - Format conversion (JPG, PNG, WebP, AVIF, TIFF, GIF)
|
|
406
|
+
- `optimize` - Size optimization (up to 70% reduction, lossless/lossy)
|
|
407
|
+
- `compress` - Advanced compression with quality control
|
|
408
|
+
- `watermark` - Add watermarks with positioning and opacity
|
|
409
|
+
- `info` - Display detailed image metadata
|
|
410
|
+
- `stats` - Technical image statistics (channels, depth, color space)
|
|
411
|
+
- `split` - Split image into grid tiles
|
|
412
|
+
- `stack` - Stack images horizontally/vertically
|
|
413
|
+
- `mirror` - Create mirror/kaleidoscope effects
|
|
414
|
+
- `metadata` - View, export, or remove EXIF data
|
|
415
|
+
|
|
416
|
+
**Format Support:**
|
|
417
|
+
|
|
418
|
+
- Input: JPG, PNG, WebP, AVIF, TIFF, GIF, SVG, HEIF
|
|
419
|
+
- Output: JPG, PNG, WebP, AVIF, TIFF, GIF
|
|
420
|
+
- Modern formats: WebP (25-35% smaller), AVIF (50% smaller)
|
|
421
|
+
|
|
422
|
+
**Professional Features:**
|
|
423
|
+
|
|
424
|
+
- Quality control (1-100)
|
|
425
|
+
- Dry-run mode (preview before executing)
|
|
426
|
+
- Verbose logging
|
|
427
|
+
- Built-in help for every command
|
|
428
|
+
- Comprehensive error handling
|
|
429
|
+
- File size reporting
|
|
430
|
+
|
|
431
|
+
See [plugins/image/README.md](plugins/image/README.md) for complete image plugin documentation.
|
|
432
|
+
|
|
433
|
+
### Planned Features (Add-on Plugins)
|
|
434
|
+
|
|
435
|
+
#### Video Processing (@mediaproc/video) - Q1 2026
|
|
197
436
|
|
|
198
437
|
- Format transcoding (MP4, WebM, AVI, MKV)
|
|
199
438
|
- Codec conversion (H.264, H.265, VP9, AV1)
|
|
@@ -203,7 +442,7 @@ See [Upcoming Features](docs/upcoming-features.md) for detailed roadmap.
|
|
|
203
442
|
- Video merging
|
|
204
443
|
- Audio track management
|
|
205
444
|
|
|
206
|
-
#### Audio Processing (Q1 2026
|
|
445
|
+
#### Audio Processing (@mediaproc/audio) - Q1 2026
|
|
207
446
|
|
|
208
447
|
- Format conversion (MP3, AAC, FLAC, WAV, OGG)
|
|
209
448
|
- Normalization and loudness adjustment
|
|
@@ -212,6 +451,10 @@ See [Upcoming Features](docs/upcoming-features.md) for detailed roadmap.
|
|
|
212
451
|
- Multi-track merging
|
|
213
452
|
- Bitrate control
|
|
214
453
|
|
|
454
|
+
#### Document Processing (@mediaproc/document) - Q2 2026
|
|
455
|
+
|
|
456
|
+
- Bitrate control
|
|
457
|
+
|
|
215
458
|
#### Document Processing (Q2 2026)
|
|
216
459
|
|
|
217
460
|
- PDF compression
|
|
@@ -250,11 +493,16 @@ See [docs/upcoming-features.md](docs/upcoming-features.md) for complete feature
|
|
|
250
493
|
#### From npm (when published)
|
|
251
494
|
|
|
252
495
|
```bash
|
|
253
|
-
# Install
|
|
496
|
+
# Install the universal CLI (includes built-in plugins)
|
|
254
497
|
npm install -g @mediaproc/cli
|
|
255
498
|
|
|
256
|
-
#
|
|
499
|
+
# Start using immediately - image plugin is built-in!
|
|
500
|
+
mediaproc image resize photo.jpg -w 1920
|
|
501
|
+
mediaproc image convert photo.jpg -f webp
|
|
502
|
+
|
|
503
|
+
# Check version and list plugins
|
|
257
504
|
mediaproc --version
|
|
505
|
+
mediaproc list
|
|
258
506
|
```
|
|
259
507
|
|
|
260
508
|
#### From Source (current)
|
|
@@ -267,49 +515,57 @@ cd mediaproc
|
|
|
267
515
|
# Install dependencies
|
|
268
516
|
pnpm install
|
|
269
517
|
|
|
270
|
-
# Build all packages
|
|
271
|
-
pnpm build
|
|
518
|
+
# Build all packages (including built-in plugins)
|
|
519
|
+
pnpm build:all
|
|
272
520
|
|
|
273
521
|
# Link globally
|
|
274
|
-
pnpm link --global
|
|
522
|
+
cd plugins/image && pnpm link --global
|
|
523
|
+
cd ../.. && pnpm link --global
|
|
275
524
|
|
|
276
525
|
# Verify
|
|
277
526
|
mediaproc --version
|
|
527
|
+
mediaproc list # Should show @mediaproc/image as built-in
|
|
278
528
|
```
|
|
279
529
|
|
|
280
530
|
### Basic Usage
|
|
281
531
|
|
|
282
532
|
```bash
|
|
283
|
-
#
|
|
284
|
-
mediaproc add image
|
|
285
|
-
|
|
286
|
-
# Process an image (when implemented)
|
|
533
|
+
# Image processing (built-in - works immediately!)
|
|
287
534
|
mediaproc image resize photo.jpg --width 1920 --height 1080
|
|
535
|
+
mediaproc image convert photo.jpg -f webp -q 85
|
|
536
|
+
mediaproc image thumbnail photo.jpg -s 300
|
|
288
537
|
|
|
289
|
-
# Get help
|
|
538
|
+
# Get help anytime
|
|
290
539
|
mediaproc --help
|
|
291
540
|
mediaproc image --help
|
|
292
541
|
mediaproc image resize --help
|
|
293
542
|
```
|
|
294
543
|
|
|
295
|
-
###
|
|
544
|
+
### Adding More Plugins
|
|
296
545
|
|
|
297
546
|
```bash
|
|
298
|
-
# Install
|
|
299
|
-
mediaproc add video
|
|
300
|
-
mediaproc add audio
|
|
301
|
-
mediaproc add document
|
|
547
|
+
# Install additional plugins from npm
|
|
548
|
+
mediaproc add video # Video processing
|
|
549
|
+
mediaproc add audio # Audio processing
|
|
550
|
+
mediaproc add document # PDF processing
|
|
302
551
|
|
|
303
|
-
#
|
|
304
|
-
|
|
305
|
-
mediaproc instagram filter photo.jpg --style vintage
|
|
552
|
+
# View all plugins (built-in + installed)
|
|
553
|
+
mediaproc list
|
|
306
554
|
|
|
307
|
-
#
|
|
308
|
-
|
|
555
|
+
# Example output:
|
|
556
|
+
# 📦 Built-in Plugins:
|
|
557
|
+
# ✓ image ★ BUILT-IN
|
|
558
|
+
#
|
|
559
|
+
# 🔌 User-Installed:
|
|
560
|
+
# ✓ video
|
|
561
|
+
# ✓ audio
|
|
562
|
+
```
|
|
309
563
|
|
|
310
564
|
# View installed plugins
|
|
565
|
+
|
|
311
566
|
mediaproc list
|
|
312
|
-
|
|
567
|
+
|
|
568
|
+
````
|
|
313
569
|
|
|
314
570
|
---
|
|
315
571
|
|
|
@@ -346,12 +602,73 @@ _Coming soon: Browse community plugins at https://plugins.mediaproc.dev_
|
|
|
346
602
|
|
|
347
603
|
---
|
|
348
604
|
|
|
349
|
-
##
|
|
605
|
+
## � Plugin Terminology
|
|
606
|
+
|
|
607
|
+
### Important: No Plugins Are Pre-Installed!
|
|
608
|
+
|
|
609
|
+
MediaProc CLI is lightweight and contains **NO plugin code**. All plugins must be explicitly installed.
|
|
610
|
+
|
|
611
|
+
### Plugin Types
|
|
612
|
+
|
|
613
|
+
1. **Official Plugins** (`@mediaproc/*`) - Maintained by MediaProc team
|
|
614
|
+
- Example: `@mediaproc/image`, `@mediaproc/video`
|
|
615
|
+
- High quality, regularly updated
|
|
616
|
+
- Install: `mediaproc add image`
|
|
617
|
+
|
|
618
|
+
2. **Community Plugins** (`mediaproc-*`) - Community-maintained
|
|
619
|
+
- Example: `mediaproc-custom-filter`
|
|
620
|
+
- Follow community standards
|
|
621
|
+
- Install: `mediaproc add mediaproc-custom-filter`
|
|
622
|
+
|
|
623
|
+
3. **Third-Party Plugins** - Any compatible npm package
|
|
624
|
+
- No naming convention required
|
|
625
|
+
- Must implement MediaProc plugin interface
|
|
626
|
+
- Install: `mediaproc add package-name`
|
|
627
|
+
|
|
628
|
+
### Quick Reference
|
|
629
|
+
|
|
630
|
+
```bash
|
|
631
|
+
# Install CLI (no plugins included)
|
|
632
|
+
npm install -g @mediaproc/cli
|
|
633
|
+
|
|
634
|
+
# Browse available plugins
|
|
635
|
+
mediaproc plugins
|
|
636
|
+
|
|
637
|
+
# Install official plugins
|
|
638
|
+
mediaproc add image # Image processing
|
|
639
|
+
mediaproc add video # Video processing
|
|
640
|
+
|
|
641
|
+
# Check what's installed
|
|
642
|
+
mediaproc list
|
|
643
|
+
|
|
644
|
+
# Use installed plugins
|
|
645
|
+
mediaproc image resize photo.jpg -w 800
|
|
646
|
+
```
|
|
647
|
+
|
|
648
|
+
**📘 Full Guide:** See [Plugin Terminology Guide](docs/plugin-terminology.md) for detailed explanations.
|
|
649
|
+
|
|
650
|
+
---
|
|
651
|
+
|
|
652
|
+
## �📚 Documentation
|
|
350
653
|
|
|
351
654
|
Comprehensive documentation is available in the [docs/](docs/) folder:
|
|
352
655
|
|
|
353
656
|
### Core Documentation
|
|
354
657
|
|
|
658
|
+
- **[Plugin Terminology](docs/plugin-terminology.md)** - **START HERE!** Clear definitions and common misconceptions
|
|
659
|
+
|
|
660
|
+
- Official vs Community vs Third-Party plugins
|
|
661
|
+
- No plugins are pre-installed (explained)
|
|
662
|
+
- Installation workflow and plugin states
|
|
663
|
+
- Best practices and FAQ
|
|
664
|
+
|
|
665
|
+
- **[Plugin Architecture](docs/plugin-architecture.md)** - How the plugin system works
|
|
666
|
+
|
|
667
|
+
- On-demand loading architecture
|
|
668
|
+
- Plugin discovery and lifecycle
|
|
669
|
+
- Why no auto-loading
|
|
670
|
+
- Technical implementation
|
|
671
|
+
|
|
355
672
|
- **[Plugin System](docs/plugin-system.md)** - Complete guide to the plugin architecture
|
|
356
673
|
|
|
357
674
|
- How plugins work
|
|
@@ -376,6 +693,16 @@ Comprehensive documentation is available in the [docs/](docs/) folder:
|
|
|
376
693
|
- Phase 3: AI & future-proof (Q4 2026)
|
|
377
694
|
- Long-term vision (2027+)
|
|
378
695
|
|
|
696
|
+
### Plugin Documentation
|
|
697
|
+
|
|
698
|
+
- **[Image Plugin Documentation](docs/image-plugin-documentation.md)** - Complete reference for the Image Plugin
|
|
699
|
+
- All 40 commands documented
|
|
700
|
+
- Usage examples and workflows
|
|
701
|
+
- Best practices and tips
|
|
702
|
+
- Social media presets
|
|
703
|
+
- Real-world use cases
|
|
704
|
+
- Troubleshooting guide
|
|
705
|
+
|
|
379
706
|
### Community Guides
|
|
380
707
|
|
|
381
708
|
- **[Contributing](CONTRIBUTING.md)** - How to contribute to MediaProc
|
|
@@ -434,7 +761,7 @@ mediaproc image watermark photo.jpg --text "© 2025" --position bottom-right
|
|
|
434
761
|
for img in photos/*.jpg; do
|
|
435
762
|
mediaproc image convert "$img" --format webp --quality 85
|
|
436
763
|
done
|
|
437
|
-
|
|
764
|
+
````
|
|
438
765
|
|
|
439
766
|
### Video Processing
|
|
440
767
|
|
|
@@ -503,7 +830,7 @@ steps:
|
|
|
503
830
|
mediaproc run workflow.yaml --input images/ --output optimized/
|
|
504
831
|
```
|
|
505
832
|
|
|
506
|
-
_Note:
|
|
833
|
+
_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
834
|
|
|
508
835
|
---
|
|
509
836
|
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAkCA,wBAAsB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAqCzC"}
|
package/dist/cli.js
CHANGED
|
@@ -1,41 +1,56 @@
|
|
|
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';
|
|
8
|
+
import { ConfigManager } from './config-manager.js';
|
|
5
9
|
import { addCommand } from './commands/add.js';
|
|
6
10
|
import { removeCommand } from './commands/remove.js';
|
|
7
11
|
import { listCommand } from './commands/list.js';
|
|
12
|
+
import { pluginsCommand } from './commands/plugins.js';
|
|
8
13
|
import { helpCommand } from './commands/help.js';
|
|
9
14
|
import { initCommand } from './commands/init.js';
|
|
10
15
|
import { configCommand } from './commands/config.js';
|
|
11
16
|
import { runCommand } from './commands/run.js';
|
|
12
17
|
import { validateCommand } from './commands/validate.js';
|
|
18
|
+
import { convertCommand } from './commands/convert.js';
|
|
19
|
+
import { infoCommand } from './commands/info.js';
|
|
20
|
+
import { optimizeCommand } from './commands/optimize.js';
|
|
13
21
|
const program = new Command();
|
|
14
22
|
const pluginManager = new PluginManager();
|
|
23
|
+
// Initialize config on startup (creates default if not exists)
|
|
24
|
+
const configManager = new ConfigManager();
|
|
25
|
+
configManager.load();
|
|
26
|
+
// Get version from package.json
|
|
27
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
28
|
+
const __dirname = dirname(__filename);
|
|
29
|
+
const packageJson = JSON.parse(readFileSync(join(__dirname, '../package.json'), 'utf-8'));
|
|
15
30
|
export async function cli() {
|
|
16
31
|
program
|
|
17
32
|
.name('mediaproc')
|
|
18
33
|
.description('Modern, plugin-based media processing CLI')
|
|
19
|
-
.version(
|
|
34
|
+
.version(packageJson.version);
|
|
20
35
|
// Plugin management commands
|
|
21
36
|
addCommand(program, pluginManager);
|
|
22
37
|
removeCommand(program, pluginManager);
|
|
23
38
|
listCommand(program, pluginManager);
|
|
39
|
+
pluginsCommand(program, pluginManager);
|
|
24
40
|
helpCommand(program);
|
|
25
41
|
// Project management commands
|
|
26
42
|
initCommand(program);
|
|
27
43
|
configCommand(program);
|
|
44
|
+
// Universal commands (auto-install plugins if needed)
|
|
45
|
+
convertCommand(program, pluginManager);
|
|
46
|
+
infoCommand(program, pluginManager);
|
|
47
|
+
optimizeCommand(program, pluginManager);
|
|
28
48
|
// Utility commands
|
|
29
49
|
runCommand(program);
|
|
30
50
|
validateCommand(program);
|
|
31
|
-
//
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
catch (error) {
|
|
36
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
37
|
-
console.error(chalk.red('Error loading plugins:'), errorMessage);
|
|
38
|
-
}
|
|
51
|
+
// Plugins are NOT loaded at startup
|
|
52
|
+
// Users must explicitly install plugins using: mediaproc add <plugin>
|
|
53
|
+
// This gives users full control over which plugins they want
|
|
39
54
|
// Parse arguments
|
|
40
55
|
program.parse(process.argv);
|
|
41
56
|
// Show help if no command provided
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],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AAW,CAAC;
|
|
1
|
+
{"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../src/commands/add.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAwC1D,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,GAAG,IAAI,CAmN/E"}
|