@remixmate/cli 0.1.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 (91) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +166 -0
  3. package/dist/argv.d.ts +15 -0
  4. package/dist/argv.js +51 -0
  5. package/dist/cli.d.ts +13 -0
  6. package/dist/cli.js +83 -0
  7. package/dist/handlers/gen-image.d.ts +13 -0
  8. package/dist/handlers/gen-image.js +161 -0
  9. package/dist/handlers/gen-voice.d.ts +16 -0
  10. package/dist/handlers/gen-voice.js +110 -0
  11. package/dist/handlers/index.d.ts +13 -0
  12. package/dist/handlers/index.js +14 -0
  13. package/dist/handlers/template-bind.d.ts +15 -0
  14. package/dist/handlers/template-bind.js +149 -0
  15. package/dist/http.d.ts +52 -0
  16. package/dist/http.js +110 -0
  17. package/dist/index.d.ts +9 -0
  18. package/dist/index.js +8 -0
  19. package/dist/manifest.json +260 -0
  20. package/dist/progress.d.ts +23 -0
  21. package/dist/progress.js +15 -0
  22. package/dist/registry.d.ts +33 -0
  23. package/dist/registry.js +72 -0
  24. package/dist/runner.d.ts +17 -0
  25. package/dist/runner.js +63 -0
  26. package/package.json +54 -0
  27. package/skills/export-jianying/SKILL.md +251 -0
  28. package/skills/export-jianying/scripts/gen_jianying_draft.py +1099 -0
  29. package/skills/export-jianying/skill.json +24 -0
  30. package/skills/export-jianying/version.json +7 -0
  31. package/skills/gen-digital-human/SKILL.md +211 -0
  32. package/skills/gen-digital-human/scripts/gen_digital_human_video.py +574 -0
  33. package/skills/gen-digital-human/skill.json +23 -0
  34. package/skills/gen-digital-human/version.json +7 -0
  35. package/skills/gen-image/SKILL.md +130 -0
  36. package/skills/gen-image/skill.json +22 -0
  37. package/skills/gen-image/version.json +7 -0
  38. package/skills/gen-script/SKILL.md +283 -0
  39. package/skills/gen-script/scripts/gen_script.py +1208 -0
  40. package/skills/gen-script/skill.json +41 -0
  41. package/skills/gen-script/version.json +7 -0
  42. package/skills/gen-video/SKILL.md +170 -0
  43. package/skills/gen-video/scripts/gen_video.py +591 -0
  44. package/skills/gen-video/skill.json +24 -0
  45. package/skills/gen-video/version.json +7 -0
  46. package/skills/gen-voice/SKILL.md +104 -0
  47. package/skills/gen-voice/skill.json +21 -0
  48. package/skills/gen-voice/version.json +7 -0
  49. package/skills/prepare-video-assets/SKILL.md +192 -0
  50. package/skills/prepare-video-assets/scripts/prepare_video_assets.py +57 -0
  51. package/skills/prepare-video-assets/skill.json +23 -0
  52. package/skills/prepare-video-assets/version.json +7 -0
  53. package/skills/render-video/SKILL.md +187 -0
  54. package/skills/render-video/scripts/_chrome_vendor.py +305 -0
  55. package/skills/render-video/scripts/_video_probe.py +174 -0
  56. package/skills/render-video/scripts/_vod_polling.py +86 -0
  57. package/skills/render-video/scripts/remote_renderer_client.py +236 -0
  58. package/skills/render-video/scripts/render_video.py +2288 -0
  59. package/skills/render-video/scripts/upload_video.py +193 -0
  60. package/skills/render-video/skill.json +21 -0
  61. package/skills/render-video/version.json +7 -0
  62. package/skills/template-bind/README.md +63 -0
  63. package/skills/template-bind/SKILL.md +234 -0
  64. package/skills/template-bind/scripts/check_contracts.py +196 -0
  65. package/skills/template-bind/scripts/match_template.py +215 -0
  66. package/skills/template-bind/scripts/registry_loader.py +379 -0
  67. package/skills/template-bind/scripts/render_job_client.py +162 -0
  68. package/skills/template-bind/scripts/sync_registry.py +44 -0
  69. package/skills/template-bind/scripts/template_paths.py +72 -0
  70. package/skills/template-bind/skill.json +20 -0
  71. package/skills/template-bind/version.json +7 -0
  72. package/skills/template-bind/video_dsl/README.md +97 -0
  73. package/skills/template-bind/video_dsl/runtime/__init__.py +11 -0
  74. package/skills/template-bind/video_dsl/runtime/dsl_validator.py +495 -0
  75. package/skills/template-bind/video_dsl/runtime/prompt_enhancer.py +274 -0
  76. package/skills/template-bind/video_dsl/runtime/template_binder.py +87 -0
  77. package/skills/template-bind/video_dsl/runtime/timeline_compiler.py +312 -0
  78. package/skills/template-bind/video_dsl/schema/render-plan-v1alpha1.json +193 -0
  79. package/skills/template-bind/video_dsl/schema/template-binding-v1alpha1.json +122 -0
  80. package/skills/template-bind/video_dsl/schema/template-definition-v1alpha1.json +247 -0
  81. package/skills/template-bind/video_dsl/schema/video-dsl-v1alpha1.json +378 -0
  82. package/skills/video-parser/SKILL.md +238 -0
  83. package/skills/video-parser/scripts/analyze_video.py +1038 -0
  84. package/skills/video-parser/scripts/deconstruct_video.py +602 -0
  85. package/skills/video-parser/scripts/parse_via_render.py +148 -0
  86. package/skills/video-parser/skill.json +21 -0
  87. package/skills/video-parser/version.json +7 -0
  88. package/skills/web-capture/SKILL.md +183 -0
  89. package/skills/web-capture/scripts/web_capture.py +461 -0
  90. package/skills/web-capture/skill.json +29 -0
  91. package/skills/web-capture/version.json +7 -0
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "gen-script",
3
+ "toolName": "gen_script",
4
+ "tier": "orchestration",
5
+ "title": "Video Script Generation",
6
+ "description": "Video script generation: turn a topic into a structured Video DSL (JSON) that describes the full video — scene structure, asset requirements, and narrative flow.",
7
+ "envVars": ["DEFAULT_IMAGE_MODEL", "DEFAULT_VIDEO_MODEL", "STUB_IMAGE_URL", "STUB_VIDEO_URL"],
8
+ "scriptPath": "scripts/gen_script.py",
9
+ "parameters": {
10
+ "type": "object",
11
+ "properties": {
12
+ "topic": { "type": "string", "description": "Video topic (required)" },
13
+ "platform": {
14
+ "type": "string",
15
+ "enum": ["douyin", "xiaohongshu", "bilibili", "wechat", "youtube", "generic"],
16
+ "description": "Target platform"
17
+ },
18
+ "duration": { "type": "number", "description": "Target duration in seconds" },
19
+ "style": { "type": "string", "description": "Style tag" },
20
+ "ratio": { "type": "string", "description": "Aspect ratio, e.g. 16:9 or 9:16" },
21
+ "scenes": { "type": "number", "description": "Scene count" },
22
+ "voice_id": { "type": "string", "description": "Narration voice id. Default depends on the bound template's outputLanguage; query gen_voice with list_voices=true to see available ids." },
23
+ "template_id": { "type": "string", "description": "Template id (e.g. html-slide). The template owns outputLanguage and may also declare a defaultVoiceId; both flow into the produced DSL." },
24
+ "headline": { "type": "string", "description": "On-screen headline (recommended 4-12 chars / ~3 words). Stored at meta.headline and pushed into every scene's textLayers[role=headline] so the template can render it as the top big-text. **Must** be set when the user explicitly provided a headline / main title; without it, headline falls back to the long-form topic and overflows the top text layer." },
25
+ "subheadline": { "type": "string", "description": "On-screen subheadline (project name / slogan / source, e.g. 'Pixelle-Video'). Stored at meta.subheadline and pushed into every scene's textLayers[role=subheadline] so the template can render it as the top small-text. **Must** be set when the user explicitly provided a subtitle / project name. Note: this is the on-screen subheadline, not the CC subtitle (global.subtitle) — they are independent." },
26
+ "carousel_items": {
27
+ "type": "array",
28
+ "items": { "type": "string" },
29
+ "description": "Media URLs for the template's image/video carousel (e.g. spotlight-card's middle carousel). When provided together with a template_id that has an input-schema.json, these URLs are placed directly into customPayload.carousel.items as existing assets — NO AI image generation is triggered. **Must** pass when the user explicitly provides image/video URLs for carousel-style templates (spotlight-card, etc.). Each element is a full URL string."
30
+ },
31
+ "caption_lines": {
32
+ "type": "array",
33
+ "items": { "type": "string" },
34
+ "description": "Bottom typewriter text lines for templates that support a caption/typewriter area (e.g. spotlight-card). Each element is one line of text. Supports **emphasis** syntax (rendered with accent color). **Must** pass when the user explicitly provides bullet-point text / bottom copy for the video."
35
+ },
36
+ "stub_image_url": { "type": "string", "description": "Test-mode image stub URL. Only pass when the user explicitly says things like 'just testing / don't actually generate / use a placeholder image / stub URL / save credits' AND provides a concrete URL. With this set, every image AssetRef in the produced DSL is written as source=existing, status=generated, url=<this URL> — no gen-image call. Do not pass otherwise; if the user expressed the intent without a URL, ask for one — do not invent one." },
37
+ "stub_video_url": { "type": "string", "description": "Test-mode video stub URL. Only pass when the user explicitly says things like 'just testing / don't actually generate the video / placeholder clip / save credits' AND provides a concrete URL. With this set, every video AssetRef in the produced DSL is written as source=existing, status=generated, url=<this URL> — no gen-video call. Do not pass otherwise; if the user expressed the intent without a URL, ask for one — do not invent one." }
38
+ },
39
+ "required": ["topic"]
40
+ }
41
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "skillName": "gen-script",
3
+ "repoName": "agent-skill-media-maker",
4
+ "skillId": "474",
5
+ "version": "V8",
6
+ "skillDescription": "视频脚本生成技能,将用户主题转化为结构化 Video DSL(JSON),描述视频的完整结构、素材需求与叙事逻辑。\n\n当用户提到以下任何需求时,立即使用本 skill:\n- 帮我写视频脚本、生成视频脚本、视频策划、写分镜脚本\n- 做一个短视频、帮我规划视频内容、生成视频 DSL\n- 把主题转成视频结构、视频内容规划\n\n即使用户没有明确说「生成 DSL」,只要他们想要把一个主题变成视频内容结构,也要使用本 skill。"
7
+ }
@@ -0,0 +1,170 @@
1
+ ---
2
+ name: gen-video
3
+ description: |
4
+ AI video generation skill: produce a short clip from a text prompt. Backed by ab-api's `/model/genVideo` (Seedance and Veo families).
5
+
6
+ Use this skill immediately whenever the user asks for any of:
7
+ - Text-to-video, AI-generated clip, "make a short video of ..."
8
+ - Generate video with Doubao / Seedance / Veo / Google
9
+ - Image-to-video, first-frame / last-frame, reference-image-to-video
10
+
11
+ Even without an explicit "use AI", any request that turns a description into a moving clip should route here.
12
+ triggers:
13
+ - Text-to-video, AI-generated clip, "make a short video of ..."
14
+ - Generate video with Doubao / Seedance / Veo / Google
15
+ - Image-to-video, first-frame / last-frame, reference-image-to-video
16
+ ---
17
+
18
+ # AI Video Generation Skill
19
+
20
+ Wraps ab-api's `POST /model/genVideo` (the same endpoint the web "Lingchuang AI Video" tool uses), authenticated with the **Tianyan privateToken**, routed through LiteLLM to **Seedance** or **Veo**.
21
+
22
+ ## Models
23
+
24
+ Aligned with `gen_video.py`'s `GEN_VIDEO_MODEL_PRESETS` and the frontend `AI_VIDEO_MODELS`:
25
+
26
+ | LiteLLM `model` | Display name | Provider | Duration | Notes |
27
+ |-----------------|--------------|----------|----------|-------|
28
+ | `doubao-seedance-1-5-pro-251215` | Seedance 1.5 Pro | Volcano | 4–12s | Audio support, first/last frame, fixed camera, adaptive ratio |
29
+ | `veo-3.1-generate-001` | Veo 3.1 | Google | 4 / 6 / 8s | Native audio, first/last frame, reference images, negative prompt, up to 4K |
30
+ | `veo-3.1-fast-generate-001` | Veo 3.1 Fast | Google | 4 / 6 / 8s | Faster Veo 3.1 variant for quick iteration |
31
+
32
+ **Model shortcuts** (`--model` / `-m` accepts these directly):
33
+ - `seedance` / `seedance-1.5` / `seedance-1.5-pro` → Seedance 1.5 Pro
34
+ - `veo` / `veo-3.1` → Veo 3.1
35
+ - `veo-fast` / `veo-3.1-fast` → Veo 3.1 Fast
36
+
37
+ ### Per-model parameter ranges
38
+
39
+ | | Seedance 1.5 Pro | Veo 3.1 / Veo 3.1 Fast |
40
+ |--|--|--|
41
+ | **Aspect ratio** | `adaptive` `16:9` `4:3` `1:1` `3:4` `9:16` `21:9` | `16:9` `9:16` |
42
+ | **Resolution** | `480p` `720p` `1080p` | `720p` `1080p` `4k` |
43
+ | **Duration** | 4–12 seconds (continuous integers) | 4 / 6 / 8 seconds |
44
+ | **First / last frame** | yes | yes |
45
+ | **Reference images** | not supported (use first/last frame) | yes, up to 3 |
46
+ | **Generated audio** | yes | yes (native audio) |
47
+ | **Fixed camera** | yes | — |
48
+ | **Negative prompt** | — | yes |
49
+
50
+ ## Auth & environment
51
+
52
+ No skill-local env file — the executing process inherits the system environment. Examples below say `python`; on macOS you may need `python3`.
53
+
54
+ - **Enterprise OpenClaw**: auth is already injected, **no need** for `PRIV_TOKEN` / `--priv-token`.
55
+ - **Other environments**: configure the token. Without a token, non-interactive runs fail; interactive ones may prompt.
56
+
57
+ | Env var | Description | Default |
58
+ |---------|-------------|---------|
59
+ | `PRIV_TOKEN` | Tianyan token; `--priv-token` overrides | none |
60
+ | `MM_VIDEO_MODEL` | Default model id | `doubao-seedance-1-5-pro-251215` |
61
+ | `MM_API_BASE_URL` | API root | see `gen_video.py` default |
62
+ | `AGENT_NAME` | Optional `x-invoke-agent` header | none |
63
+
64
+ ## Operations
65
+
66
+ 1. **Script path**: read the system-injected `Base directory for this skill: <path>` as `<SkillDir>` and always use `<SkillDir>/scripts/gen_video.py`. Do not hardcode paths.
67
+ 2. **Prompt**: include camera language ("aerial shot", "slow motion", "push-in") and dynamic descriptions for better results. Chinese or English both work.
68
+ 3. By default only the URL is printed; pass `--download` (and optional `--output`) to save locally.
69
+ 4. **Async job**: video generation is async; the script polls until completion (typically 1–3 minutes).
70
+
71
+ ### Seedance text-to-video (default model)
72
+
73
+ ```bash
74
+ python3 <SkillDir>/scripts/gen_video.py \
75
+ --prompt "<video description>" \
76
+ --duration 5 \
77
+ --ratio "16:9"
78
+ ```
79
+
80
+ ### Seedance first/last frame + audio
81
+
82
+ ```bash
83
+ python3 <SkillDir>/scripts/gen_video.py \
84
+ --prompt "<transition description>" \
85
+ --first-frame ./start.png \
86
+ --last-frame ./end.png \
87
+ --duration 8 \
88
+ --generate-audio
89
+ ```
90
+
91
+ ### Veo 3.1 high-resolution
92
+
93
+ ```bash
94
+ python3 <SkillDir>/scripts/gen_video.py \
95
+ --model veo \
96
+ --prompt "<video description>" \
97
+ --duration 8 \
98
+ --ratio "16:9" \
99
+ --resolution 4k
100
+ ```
101
+
102
+ ### Veo 3.1 Fast for rapid iteration
103
+
104
+ ```bash
105
+ python3 <SkillDir>/scripts/gen_video.py \
106
+ --model veo-fast \
107
+ --prompt "<video description>" \
108
+ --duration 6
109
+ ```
110
+
111
+ ### Veo with reference images
112
+
113
+ ```bash
114
+ python3 <SkillDir>/scripts/gen_video.py \
115
+ --model veo \
116
+ --prompt "<video description>" \
117
+ --reference ./ref1.png \
118
+ --reference ./ref2.png \
119
+ --duration 8
120
+ ```
121
+
122
+ ### Download to disk
123
+
124
+ ```bash
125
+ python3 <SkillDir>/scripts/gen_video.py \
126
+ --prompt "<video description>" \
127
+ --download \
128
+ --output "output_video.mp4"
129
+ ```
130
+
131
+ 5. **Surface results**: without `--download`, print the video URL; with `--download`, mention the local path.
132
+
133
+ For the full flag list: `python3 <SkillDir>/scripts/gen_video.py --help`.
134
+
135
+ ## Common CLI flags
136
+
137
+ | Flag | Description | Default |
138
+ |------|-------------|---------|
139
+ | `-p` / `--prompt` | Video description (combinable with first/last frame or references) | — |
140
+ | `-m` / `--model` | Model id or shortcut (`seedance` / `veo` / `veo-fast`) | see `MM_VIDEO_MODEL` |
141
+ | `-d` / `--duration` | Duration in seconds. Defaults to 5 (Seedance) or 8 (Veo) when omitted | per model |
142
+ | `-r` / `--ratio` | Aspect ratio (default `16:9`). Seedance also accepts `adaptive` | `16:9` |
143
+ | `--resolution` | Resolution. Veo accepts `4k` | `720p` |
144
+ | `--first-frame` | First-frame image: local path, https URL, or data URI | none |
145
+ | `--last-frame` | Last-frame image | none |
146
+ | `--reference` | Reference image (repeatable; Veo only, max 3) | none |
147
+ | `--generate-audio` | Generate native audio | off |
148
+ | `--camera-fixed` | Fixed camera (mainly Seedance) | off |
149
+ | `--negative-prompt` | Negative prompt (mainly Veo) | none |
150
+ | `--seed` | Random seed | none |
151
+ | `--person-generation` | Person policy: `allow_all` / `dont_allow` (Veo) | none |
152
+ | `--download` | Download the video to disk | off |
153
+ | `-o` / `--output` | Download path (only effective with `--download`) | `generated_video.mp4` |
154
+ | `--poll-interval` | Polling interval (seconds) | `10` |
155
+ | `--max-wait` | Max wait time (seconds) | `300` |
156
+ | `--private-token` | Override token | see above |
157
+
158
+ ## Prompt tips
159
+
160
+ - Include camera language: "aerial shot", "slow motion", "push-in", "close-up".
161
+ - Describe motion explicitly.
162
+ - Example: `"At sunrise, an aerial drone shot of a futuristic city, golden light on glass facades, mist swirling, 4K ultra-clear"`.
163
+
164
+ ## Error handling
165
+
166
+ - **401** / **token missing** (non-OpenClaw): set `PRIV_TOKEN`.
167
+ - **Business `code != 0`**: read `msg` on stderr.
168
+ - **429**: rate-limited; retry later.
169
+ - **Generation timeout**: increase `--max-wait` or retry later.
170
+ - **Network**: verify connectivity and `MM_API_BASE_URL`.