@miketromba/ploof 0.1.4 → 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
@@ -9,7 +9,7 @@
9
9
  <img src="https://img.shields.io/badge/node-%3E%3D18-brightgreen" alt="node version" />
10
10
  </p>
11
11
 
12
- Ploof is a CLI for generating and editing creative assets with AI providers. It supports OpenAI image generation, editing, and variations today, with a provider registry designed for audio, video, and broader model marketplaces over time.
12
+ Ploof is a CLI for generating and editing creative assets with AI providers. It supports OpenAI image generation/editing and OpenAI video generation/editing today, plus the legacy OpenAI image variations endpoint when the authenticated project has access. The provider registry is designed for audio and broader model marketplaces over time.
13
13
 
14
14
  It is built for both developers and AI agents: predictable commands, parseable output, local auth profiles, YAML manifests, parallel execution, and a companion skill.
15
15
 
@@ -20,13 +20,17 @@ It is built for both developers and AI agents: predictable commands, parseable o
20
20
  | OpenAI auth profiles | Supported |
21
21
  | OpenAI image generation | Supported |
22
22
  | OpenAI image editing | Supported |
23
- | OpenAI image variations | Supported |
23
+ | OpenAI image variations | Legacy endpoint; supported when available to the authenticated project |
24
+ | OpenAI video generation | Supported |
25
+ | OpenAI video editing/extensions | Supported |
26
+ | OpenAI video downloads/library/characters | Supported |
24
27
  | Context images and masks | Supported |
28
+ | Video references and source videos | Supported |
25
29
  | YAML/JSON batch manifests | Supported |
26
30
  | Dependency-aware parallel runs | Supported |
27
31
  | Agent instructions via `ploof learn` | Supported |
28
32
  | Additional providers | Planned |
29
- | Audio/video generation | Planned |
33
+ | Audio generation | Planned |
30
34
 
31
35
  ## Install
32
36
 
@@ -68,6 +72,14 @@ ploof image edit \
68
72
  --prompt "Replace the background with a clean marble countertop" \
69
73
  --out assets/edited.png
70
74
 
75
+ # Generate and download a video
76
+ ploof video generate \
77
+ --prompt "Wide tracking shot of a paper city at blue hour" \
78
+ --model sora-2 \
79
+ --size 1280x720 \
80
+ --seconds 4 \
81
+ --out assets/clip.mp4
82
+
71
83
  # Run a manifest
72
84
  ploof run assets.yaml --parallel 4
73
85
  ```
@@ -154,7 +166,7 @@ Use repeated `--image` flags for context/reference images. Use `--mask` when the
154
166
 
155
167
  ## Image Variations
156
168
 
157
- OpenAI image variations use the legacy variations endpoint and default to `dall-e-2`, which is currently the only supported model for that endpoint.
169
+ OpenAI image variations use the legacy variations endpoint and default to `dall-e-2`, which is currently the only supported model for that endpoint. If OpenAI returns a 404 for this command, use `ploof image edit` for image-to-image workflows or try a profile/project with DALL-E 2 variation access.
158
170
 
159
171
  ```bash
160
172
  ploof image variation \
@@ -170,6 +182,71 @@ The plural alias also works:
170
182
  ploof image variations --image input.png --out variation.png
171
183
  ```
172
184
 
185
+ ## Video Generation
186
+
187
+ OpenAI video generation uses the asynchronous Videos API. `ploof video generate` submits a job immediately. If you pass `--out` or `--download`, Ploof waits for completion and downloads the requested asset.
188
+
189
+ ```bash
190
+ ploof video generate \
191
+ --provider openai \
192
+ --prompt "Wide tracking shot of a teal coupe on a desert highway" \
193
+ --model sora-2 \
194
+ --size 1280x720 \
195
+ --seconds 4 \
196
+ --out assets/clip.mp4 \
197
+ --output json
198
+ ```
199
+
200
+ Useful generation flags:
201
+
202
+ | Flag | Description |
203
+ | --- | --- |
204
+ | `--model <model>` | Video model, for example `sora-2` or `sora-2-pro` |
205
+ | `--size <size>` | Output resolution, for example `1280x720` |
206
+ | `--seconds <seconds>` | Clip or extension duration |
207
+ | `--input-reference <path-or-url-or-file-id>` | Image reference for the first frame |
208
+ | `--input-reference-file-id <id>` | OpenAI uploaded image file id |
209
+ | `--input-reference-url <url>` | Image URL or data URL reference |
210
+ | `--character <id>` | Reusable character id; repeat for multiple characters |
211
+ | `--wait` | Poll until the job reaches a terminal status |
212
+ | `--download` | Download after waiting |
213
+ | `--variant <variant>` | `video`, `thumbnail`, or `spritesheet` |
214
+ | `--poll-interval <seconds>` | Polling interval while waiting |
215
+ | `--timeout <seconds>` | Maximum wait time |
216
+ | `--param key=value` | Provider-specific pass-through parameter |
217
+ | `--json '{...}'` | Provider-specific JSON object |
218
+
219
+ If you omit `--model`, Ploof defaults OpenAI video generation to `sora-2`.
220
+
221
+ ## Video Editing And Library
222
+
223
+ ```bash
224
+ ploof video edit \
225
+ --video-id video_abc123 \
226
+ --prompt "Shift the palette to teal and rust" \
227
+ --out assets/edit.mp4
228
+
229
+ ploof video extend \
230
+ --video-id video_abc123 \
231
+ --prompt "Continue as the camera rises over the rooftops" \
232
+ --seconds 4 \
233
+ --out assets/extended.mp4
234
+
235
+ ploof video download video_abc123 --variant thumbnail --out assets/thumb.webp
236
+ ploof video status video_abc123 --output json
237
+ ploof video list --limit 20 --output json
238
+ ploof video delete video_abc123
239
+ ```
240
+
241
+ OpenAI video edits accept either `--video-id <id>` for an existing completed OpenAI video or `--video <path>` for an uploaded source video when the authenticated project is eligible for that workflow. Extensions accept a source video id or upload, plus a prompt and `--seconds`.
242
+
243
+ Reusable character commands:
244
+
245
+ ```bash
246
+ ploof video character create --name Mossy --video character.mp4 --output json
247
+ ploof video character get char_abc123 --output json
248
+ ```
249
+
173
250
  ## Batch Manifests
174
251
 
175
252
  ```yaml
@@ -205,6 +282,18 @@ tasks:
205
282
  images:
206
283
  - task: base
207
284
  output: assets/variation.png
285
+
286
+ - id: clip
287
+ kind: video.generate
288
+ provider: openai
289
+ prompt: "Slow dolly shot through a miniature paper city"
290
+ params:
291
+ model: sora-2
292
+ size: 1280x720
293
+ seconds: "4"
294
+ wait: true
295
+ download: true
296
+ output: assets/clip.mp4
208
297
  ```
209
298
 
210
299
  Run it:
@@ -283,7 +372,7 @@ bun run build
283
372
  npm pack --dry-run
284
373
  ```
285
374
 
286
- The default test suite includes mocked OpenAI end-to-end tests. Those tests run real `ploof` CLI commands against a local mock OpenAI server and verify generated files, edit uploads, sidecar metadata, and dependency-aware manifests without spending API credits.
375
+ The default test suite includes mocked OpenAI end-to-end tests. Those tests run real `ploof` CLI commands against a local mock OpenAI server and verify generated files, edit uploads, video job polling/downloads, sidecar metadata, and dependency-aware manifests without spending API credits.
287
376
 
288
377
  Live OpenAI tests are opt-in only:
289
378
 
package/SPEC.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Summary
4
4
 
5
- Ploof is an npm-published CLI for generating and editing assets through AI generation providers. It starts with OpenAI image generation and editing, but the architecture must support multiple authenticated providers, multiple asset modalities, provider-specific settings, and parallel execution across mixed jobs.
5
+ Ploof is an npm-published CLI for generating and editing assets through AI generation providers. It starts with OpenAI image and video generation/editing, but the architecture must support multiple authenticated providers, multiple asset modalities, provider-specific settings, and parallel execution across mixed jobs.
6
6
 
7
7
  The product should feel like a small, sharp developer tool: easy to run manually, predictable in scripts, and optimized for AI agents.
8
8
 
@@ -87,6 +87,16 @@ Initial capabilities:
87
87
  - `image.generate`
88
88
  - `image.edit`
89
89
  - `image.variation`
90
+ - `video.generate`
91
+ - `video.edit`
92
+ - `video.extend`
93
+ - `video.remix`
94
+ - `video.status`
95
+ - `video.download`
96
+ - `video.list`
97
+ - `video.delete`
98
+ - `video.character.create`
99
+ - `video.character.get`
90
100
 
91
101
  Future providers should be added through the provider registry without changing the manifest model.
92
102
 
@@ -223,8 +233,75 @@ ploof image variation \
223
233
  --size 1024x1024
224
234
  ```
225
235
 
226
- OpenAI variations default to `dall-e-2`, because the current OpenAI variations
227
- endpoint only supports that model. `ploof image variations` is an alias.
236
+ OpenAI variations default to `dall-e-2`, because the legacy OpenAI variations
237
+ endpoint only supports that model. This endpoint is supported when the
238
+ authenticated project has DALL-E 2 variation access; if OpenAI returns a 404,
239
+ use `ploof image edit` for image-to-image workflows. `ploof image variations`
240
+ is an alias.
241
+
242
+ ### Video Generation
243
+
244
+ OpenAI video generation uses the asynchronous Videos API. `ploof video generate`
245
+ submits a job; passing `--out` or `--download` makes Ploof poll until a terminal
246
+ status and download the requested asset.
247
+
248
+ ```bash
249
+ ploof video generate \
250
+ --provider openai \
251
+ --prompt "Wide tracking shot of a paper city at blue hour" \
252
+ --model sora-2 \
253
+ --size 1280x720 \
254
+ --seconds 4 \
255
+ --out assets/clip.mp4 \
256
+ --output json
257
+ ```
258
+
259
+ First-class OpenAI video flags:
260
+
261
+ - `--model <model>`
262
+ - `--size <size>`
263
+ - `--seconds <seconds>`
264
+ - `--input-reference <path-or-url-or-file-id>`
265
+ - `--input-reference-file-id <id>`
266
+ - `--input-reference-url <url>`
267
+ - `--character <id>`
268
+ - `--wait`
269
+ - `--download`
270
+ - `--variant video|thumbnail|spritesheet`
271
+ - `--poll-interval <seconds>`
272
+ - `--timeout <seconds>`
273
+ - `--param key=value`
274
+ - `--json '{...}'`
275
+
276
+ OpenAI video generation defaults to `sora-2` when no model is specified.
277
+
278
+ ### Video Editing And Library
279
+
280
+ ```bash
281
+ ploof video edit \
282
+ --video-id video_abc123 \
283
+ --prompt "Shift the palette to teal and rust" \
284
+ --out assets/edit.mp4
285
+
286
+ ploof video extend \
287
+ --video-id video_abc123 \
288
+ --prompt "Continue as the camera rises over the rooftops" \
289
+ --seconds 4 \
290
+ --out assets/extended.mp4
291
+
292
+ ploof video download video_abc123 --variant thumbnail --out assets/thumb.webp
293
+ ploof video status video_abc123 --output json
294
+ ploof video list --limit 20 --output json
295
+ ploof video delete video_abc123
296
+ ploof video character create --name Mossy --video character.mp4 --output json
297
+ ploof video character get char_abc123 --output json
298
+ ```
299
+
300
+ Video edits accept either `--video-id <id>` for an existing completed OpenAI
301
+ video or `--video <path>` for an uploaded source video when the authenticated
302
+ project is eligible for that workflow. Extensions accept a source video id or
303
+ upload, plus a prompt and `--seconds`. `video remix` is supported for the SDK's
304
+ legacy remix endpoint, but new integrations should prefer `video edit`.
228
305
 
229
306
  ### Batch Run
230
307
 
@@ -267,6 +344,18 @@ tasks:
267
344
  images:
268
345
  - task: base
269
346
  output: assets/variation.png
347
+
348
+ - id: clip
349
+ kind: video.generate
350
+ provider: openai
351
+ prompt: "Slow dolly shot through a miniature paper city"
352
+ params:
353
+ model: sora-2
354
+ size: 1280x720
355
+ seconds: "4"
356
+ wait: true
357
+ download: true
358
+ output: assets/clip.mp4
270
359
  ```
271
360
 
272
361
  ## Asset Input Model
@@ -294,6 +383,11 @@ OpenAI image editing maps:
294
383
  - `role=image` to image input files.
295
384
  - `role=mask` to mask file.
296
385
 
386
+ OpenAI video generation/editing maps:
387
+
388
+ - `role=reference` to `input_reference` for image-guided video generation.
389
+ - `role=video` to source video uploads for eligible edit/extension workflows.
390
+
297
391
  Future providers can map roles such as `reference`, `style`, `init-image`, `audio`, or `video` differently.
298
392
 
299
393
  ## Provider Architecture
@@ -307,6 +401,16 @@ type Provider = {
307
401
  runImageGenerate(job, context): Promise<ProviderResult>
308
402
  runImageEdit(job, context): Promise<ProviderResult>
309
403
  runImageVariation(job, context): Promise<ProviderResult>
404
+ runVideoGenerate(job, context): Promise<ProviderResult>
405
+ runVideoEdit(job, context): Promise<ProviderResult>
406
+ runVideoExtend(job, context): Promise<ProviderResult>
407
+ runVideoRemix(job, context): Promise<ProviderResult>
408
+ runVideoStatus(job, context): Promise<ProviderResult>
409
+ runVideoDownload(job, context): Promise<ProviderResult>
410
+ runVideoList(job, context): Promise<ProviderResult>
411
+ runVideoDelete(job, context): Promise<ProviderResult>
412
+ runVideoCharacterCreate(job, context): Promise<ProviderResult>
413
+ runVideoCharacterGet(job, context): Promise<ProviderResult>
310
414
  }
311
415
  ```
312
416