@cocoviral/cli 1.5.4
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 +159 -0
- package/dist/cli.js +920 -0
- package/dist/client.js +339 -0
- package/package.json +39 -0
package/README.md
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# cviral — the CocoViral CLI
|
|
2
|
+
|
|
3
|
+
Generate AI images and video, drive Director Studio, and build, run and deliver
|
|
4
|
+
[Viral Flow](https://www.cocoviral.ai) graphs, from your terminal or a script.
|
|
5
|
+
|
|
6
|
+
Driving CocoViral from an agent instead? Use the MCP server:
|
|
7
|
+
[`@cocoviral/mcp-server`](https://www.npmjs.com/package/@cocoviral/mcp-server),
|
|
8
|
+
or the Claude Code / Codex plugin, which needs no install:
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
/plugin marketplace add https://cdn.cocoviral.ai/plugins/cocoviral-claude-marketplace.json
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Install
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install -g @cocoviral/cli
|
|
18
|
+
export COCOVIRAL_API_KEY=cv_your_api_key_here
|
|
19
|
+
cviral credits
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Get an API key at [cocoviral.ai/mcp-skills](https://www.cocoviral.ai/mcp-skills).
|
|
23
|
+
`COCOVIRAL_API_URL` overrides the API host if you need it.
|
|
24
|
+
|
|
25
|
+
## Commands
|
|
26
|
+
|
|
27
|
+
| Command | What it does |
|
|
28
|
+
|---------|--------------|
|
|
29
|
+
| `cviral credits` | Credit balance and subscription |
|
|
30
|
+
| `cviral videos [--limit N] [--status S]` | List recent videos |
|
|
31
|
+
| `cviral image <prompt> [--model --ratio --ref]` | Generate an image |
|
|
32
|
+
| `cviral edit <prompt> --url <url>` | Edit an existing image |
|
|
33
|
+
| `cviral video <prompt> [options]` | Generate a video |
|
|
34
|
+
| `cviral status <predictionId> [--type video\|image]` | Poll a generation |
|
|
35
|
+
| `cviral analyze <videoUrl>` | Analyze a video for remixing |
|
|
36
|
+
| `cviral remix <videoUrl> [--count --product --modify]` | Analyze and build remix variants |
|
|
37
|
+
| `cviral translate <videoUrl> --lang ja [--tone]` | Translate and dub a video |
|
|
38
|
+
| `cviral translate-status <jobId>` | Poll a translation job |
|
|
39
|
+
| `cviral characters` | List saved AI characters |
|
|
40
|
+
|
|
41
|
+
### Viral Flow
|
|
42
|
+
|
|
43
|
+
Local files are the reason to reach for the CLI: it uploads from disk and
|
|
44
|
+
downloads finished assets, which the hosted MCP tools cannot do.
|
|
45
|
+
|
|
46
|
+
| Command | What it does |
|
|
47
|
+
|---------|--------------|
|
|
48
|
+
| `cviral flows` | List your flows |
|
|
49
|
+
| `cviral flow show <flowId>` | Nodes, readiness and estimated cost |
|
|
50
|
+
| `cviral flow upload <path>` | Upload a local file, get a URL for a node |
|
|
51
|
+
| `cviral flow run <flowId> --node <id> [--watch]` | Run one node |
|
|
52
|
+
| `cviral flow status <flowId> --node <id>` | Check a running node |
|
|
53
|
+
| `cviral flow pull <flowId> [--out dir] [--generated]` | Download its assets |
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
cviral flows
|
|
57
|
+
cviral flow show flow_abc123
|
|
58
|
+
cviral flow upload ./hero.jpg
|
|
59
|
+
cviral flow run flow_abc123 --node node_7 --watch
|
|
60
|
+
cviral flow pull flow_abc123 --out ./assets
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Director Studio
|
|
64
|
+
|
|
65
|
+
| Command | What it does |
|
|
66
|
+
|---------|--------------|
|
|
67
|
+
| `cviral presets [looks\|moves\|sizes\|camera]` | List looks, camera moves, shot sizes, camera setup |
|
|
68
|
+
| `cviral frame <scene> [options]` | Generate a cinematic still frame |
|
|
69
|
+
| `cviral shot --start <url> [options]` | Animate a frame with a camera move |
|
|
70
|
+
|
|
71
|
+
A **look** grades the still, a **camera move** animates it:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
cviral presets looks --category lighting
|
|
75
|
+
cviral frame "a lone astronaut on a rain-soaked rooftop" --look blockbuster --size wide
|
|
76
|
+
cviral shot --start https://example.com/frame.png --move crash-zoom-in --duration 5
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
`frame` also takes `--lighting`, `--palette`, `--camera`, `--lens`, `--aperture`,
|
|
80
|
+
`--ratio` and `--model`. `shot` takes `--direction`, `--scene`, `--duration`,
|
|
81
|
+
`--ratio`, `--res` and `--model`.
|
|
82
|
+
|
|
83
|
+
## Options
|
|
84
|
+
|
|
85
|
+
**Image** — `--model` (default `flux-2-pro`), `--ratio` (`1:1` `16:9` `9:16` `4:3` `3:4`),
|
|
86
|
+
`--ref` (repeatable reference image URL). `edit` additionally requires `--url`.
|
|
87
|
+
|
|
88
|
+
**Video** — `--model` (default `veo3.1`), `--ratio` (default `9:16`; `21:9` is Seedance 2.5
|
|
89
|
+
only), `--duration` (default 5), `--res` (`sd` `hd` `fhd` `2k`), `--start` / `--end` frame
|
|
90
|
+
URLs, and `--ref` / `--refvid` / `--refaudio` for the `-omni` and `-ref` models
|
|
91
|
+
(repeatable).
|
|
92
|
+
|
|
93
|
+
**Translate** — `--lang` (`ja` `zh` `ko` `es` `fr` `de` `pt` `ar` `hi` `ru`), `--tone`
|
|
94
|
+
(`casual` `professional` `energetic` `formal`).
|
|
95
|
+
|
|
96
|
+
**Remix** — `--count` (default 3), `--product`, `--modify`.
|
|
97
|
+
|
|
98
|
+
Run `cviral --help` for every flag with its default.
|
|
99
|
+
|
|
100
|
+
## Image Models
|
|
101
|
+
|
|
102
|
+
Pass a slug as `model`. The `/edit` variants take an `image_url` to modify.
|
|
103
|
+
|
|
104
|
+
| Family | Slugs |
|
|
105
|
+
|--------|-------|
|
|
106
|
+
| GPT Image 2.5 | `openai/gpt-image-2.5-flare/text-to-image`, `.../flare/edit`, `openai/gpt-image-2.5-sunburst/text-to-image`, `.../sunburst/edit` |
|
|
107
|
+
| Nano Banana | `fal-ai/nano-banana-2`, `fal-ai/nano-banana-2/edit`, `google/nano-banana-pro` |
|
|
108
|
+
| Seedream 5 | `fal-ai/bytedance/seedream/v5/lite/text-to-image`, `.../lite/edit`, `.../pro/text-to-image`, `.../pro/edit` |
|
|
109
|
+
| FLUX | `black-forest-labs/flux-2-pro` |
|
|
110
|
+
| Midjourney | `midjourney/v8.2`, `midjourney/v8.2/edit` |
|
|
111
|
+
| GPT Image | `openai/gpt-image-2`, `openai/gpt-image-2/edit` |
|
|
112
|
+
|
|
113
|
+
## Video Models
|
|
114
|
+
|
|
115
|
+
Pass a slug as `model`. Use `-i2v` for image-to-video and `-omni` / `-ref` for reference-to-video.
|
|
116
|
+
|
|
117
|
+
| Family | Slugs | Duration | Resolution |
|
|
118
|
+
|--------|-------|----------|------------|
|
|
119
|
+
| **MiniMax H3** | `minimax-h3`, `-i2v`, `-ref` | **5–15s (whole seconds)** | `2k` only |
|
|
120
|
+
| MiniMax H3 Max | `minimax-h3-max`, `-i2v`, `-ref` | 5–15s | up to `768p` |
|
|
121
|
+
| **FLUX 3** | `flux3`, `flux3-i2v`, `flux3-keyframes`, `flux3-extend` | 5–20s | `hd` (720p) `fhd` (1080p) |
|
|
122
|
+
| **Seedance 2.5** | `seedance2.5`, `seedance2.5-i2v`, `seedance2.5-omni` | **4–30s single pass** | `sd` `hd` |
|
|
123
|
+
| Seedance 2.0 | `seedance2`, `seedance2-i2v`, `seedance2-omni` (+ `-fast`, `-mini`) | 3–20s | `sd` `hd` `fhd` `uhd` |
|
|
124
|
+
| Kling 3.0 | `kling3-standard`, `kling3-pro`, `kling3-4k` (+ `-i2v`) | 3–20s | `sd` `hd` `fhd` `uhd` |
|
|
125
|
+
| Veo 3.1 *(default)* | `veo3.1`, `veo3.1-fast` | 3–20s | `sd` `hd` `fhd` `uhd` |
|
|
126
|
+
|
|
127
|
+
Seedance 2.5 also accepts `21:9`, and `seedance2.5-omni` takes up to 50 mixed
|
|
128
|
+
`reference_images` / `reference_videos` / `reference_audios`. `seedance2.5-i2v` always
|
|
129
|
+
matches its source image's aspect ratio. `minimax-h3-ref` takes up to 9 images, 3 videos
|
|
130
|
+
and 3 audios. FLUX 3 has native audio and uses `auto` as its aspect-ratio sentinel (not Seedance's
|
|
131
|
+
`adaptive`); `flux3-keyframes` pins up to 10 images to exact frame positions, and
|
|
132
|
+
`flux3-extend` continues a clip under 15s / 50 MB. H3 Max is capped at 768p but costs
|
|
133
|
+
about half of H3 per second. End frames (`end_image_url`) work on `veo3.1*`, `flux3-i2v`,
|
|
134
|
+
`seedance2.5-i2v` and `minimax-h3-i2v`.
|
|
135
|
+
|
|
136
|
+
## Examples
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
cviral image "a sunset over Tokyo" --model gpt-image-2 --ratio 16:9
|
|
140
|
+
cviral edit "make the sky purple" --url https://example.com/photo.jpg --model nano-banana-2
|
|
141
|
+
cviral video "UGC skincare ad" --model seedance2 --ratio 9:16 --duration 10
|
|
142
|
+
cviral video "one-take product story" --model seedance2.5 --duration 30 --ratio 21:9
|
|
143
|
+
cviral video "she turns and speaks" --model seedance2.5-omni \
|
|
144
|
+
--ref https://example.com/hero.jpg --refaudio https://example.com/voice.mp3
|
|
145
|
+
cviral video "founder to camera" --model minimax-h3-max --res hd --duration 12
|
|
146
|
+
cviral status pred_abc123
|
|
147
|
+
cviral remix https://tiktok.com/... --count 5 --product "my face cream"
|
|
148
|
+
cviral translate https://example.com/video.mp4 --lang ja --tone casual
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Development
|
|
152
|
+
|
|
153
|
+
The CLI and the MCP server are built from one source tree in
|
|
154
|
+
`mcp-server/`; `sync-dist.sh` copies the
|
|
155
|
+
two files `cviral` needs into `dist/` at pack time, so neither copy can drift.
|
|
156
|
+
|
|
157
|
+
## License
|
|
158
|
+
|
|
159
|
+
MIT
|