@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,24 @@
1
+ {
2
+ "name": "export-jianying",
3
+ "toolName": "export_jianying",
4
+ "tier": "orchestration",
5
+ "title": "Jianying (CapCut) Draft Export",
6
+ "description": "Jianying (CapCut) draft export: package asset URLs into a draft ZIP that Jianying can import. Supports automatic conversion from a RenderPlan.",
7
+ "envVars": ["PRIV_TOKEN", "MM_API_BASE_URL", "AGENT_NAME"],
8
+ "scriptPath": "scripts/gen_jianying_draft.py",
9
+ "parameters": {
10
+ "type": "object",
11
+ "properties": {
12
+ "from_render_plan": { "type": "string", "description": "Build the draft from a RenderPlan JSON (replaces --scenes)" },
13
+ "scenes": { "type": "string", "description": "Scene array as JSON (inline string or file path)" },
14
+ "title": { "type": "string", "description": "Draft title" },
15
+ "width": { "type": "number", "description": "Canvas width in pixels (default 1080)" },
16
+ "height": { "type": "number", "description": "Canvas height in pixels (default 1920)" },
17
+ "system": { "type": "string", "enum": ["mac", "windows"], "description": "Draft-root preset" },
18
+ "draft_root_path": { "type": "string", "description": "Explicit Jianying draft root path (overrides --system)" },
19
+ "no_download": { "type": "boolean", "description": "Do not download the ZIP; print the URL only" },
20
+ "output": { "type": "string", "description": "Local download path" }
21
+ },
22
+ "required": []
23
+ }
24
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "skillName": "export-jianying",
3
+ "repoName": "agent-skill-media-maker",
4
+ "skillId": "554",
5
+ "version": "V2",
6
+ "skillDescription": "剪映草稿生成技能,将素材URL打包为剪映可导入的草稿ZIP,支持从 RenderPlan 自动转换(调用 ab-api /file/generateJianYing)。\n\n当用户提到以下任何需求时,立即使用本 skill:\n- 导出剪映、剪映草稿、打包剪映、导入剪映\n- 将素材导出为剪映格式、生成剪映工程\n- 把视频/图片/音频打包成剪映草稿\n- 从 RenderPlan 导出剪映草稿\n\n即使用户没有明确说「剪映」,只要他们想要将素材打包为可在剪映中编辑的草稿格式,也要使用本 skill。"
7
+ }
@@ -0,0 +1,211 @@
1
+ ---
2
+ name: gen-digital-human
3
+ description: |
4
+ Digital-human (talking-head) skill: list available avatars, run TTS-based or audio-driven lip-sync, and check the status of pending jobs. Backed by ab-api's digital-human endpoints (Jimeng / HiFly providers).
5
+
6
+ Use this skill immediately whenever the user asks for any of:
7
+ - Digital human, talking-head video, AI presenter, virtual host
8
+ - "Make a talking-head video out of this script / this audio file"
9
+ - List or browse digital-human avatars
10
+ - Use Jimeng or HiFly to drive an avatar
11
+
12
+ Even without an explicit "use AI", any request that turns text or audio into a synthesized presenter video should route here.
13
+ triggers:
14
+ - Digital human, talking-head video, AI presenter, virtual host
15
+ - "Make a talking-head video out of this script / this audio file"
16
+ - List or browse digital-human avatars
17
+ - Use Jimeng or HiFly to drive an avatar
18
+ ---
19
+
20
+ # Digital-Human Skill
21
+
22
+ Wraps ab-api's digital-human endpoints (the same ones the web studio uses), authenticated with the **Tianyan privateToken**. Two providers: **Jimeng** (image-driven) and **HiFly** (video-driven).
23
+
24
+ ## Capabilities
25
+
26
+ | Capability | Description | API |
27
+ |------------|-------------|-----|
28
+ | List avatars | Page through available avatars; filter by source / gender / name | `POST /digital-human/avatar/page` |
29
+ | TTS lip-sync | avatar + text + voice → talking-head video | `POST /digital-human/video/generate` |
30
+ | Audio-driven | avatar + existing audio URL → talking-head video | `POST /digital-human/video/generate` |
31
+ | Check status | Poll the progress of a generation job | `POST /digital-human/video/status` |
32
+
33
+ **Cross-skill dependency**: voice ids are shared with `gen-voice` (same Minimax catalog). Use `gen-voice --list-voices` to see available voices.
34
+
35
+ ## Auth & environment
36
+
37
+ No skill-local env file — the executing process inherits the system environment. Examples below say `python`; on macOS you may need `python3`.
38
+
39
+ - **Enterprise OpenClaw**: auth is already injected, **no need** for `PRIV_TOKEN` / `--priv-token`.
40
+ - **Other environments**: configure the token. Without a token, non-interactive runs fail; interactive ones may prompt.
41
+
42
+ | Env var | Description | Default |
43
+ |---------|-------------|---------|
44
+ | `PRIV_TOKEN` | Tianyan token; `--priv-token` overrides | none |
45
+ | `MM_API_BASE_URL` | API root | see `gen_digital_human_video.py` default |
46
+ | `AGENT_NAME` | Optional `x-invoke-agent` header | none |
47
+
48
+ ## Operations
49
+
50
+ **Script path**: read the system-injected `Base directory for this skill: <path>` as `<SkillDir>`. Always use `<SkillDir>/scripts/gen_digital_human_video.py`. Do not hardcode paths.
51
+
52
+ ### 1. List avatars
53
+
54
+ ```bash
55
+ python3 <SkillDir>/scripts/gen_digital_human_video.py --list-avatars
56
+ ```
57
+
58
+ Optional filters:
59
+
60
+ ```bash
61
+ # Filter by source (jimeng = image-driven, hifly = video-driven)
62
+ python3 <SkillDir>/scripts/gen_digital_human_video.py --list-avatars --source jimeng
63
+ python3 <SkillDir>/scripts/gen_digital_human_video.py --list-avatars --source hifly
64
+
65
+ # Filter by gender
66
+ python3 <SkillDir>/scripts/gen_digital_human_video.py --list-avatars --gender female
67
+
68
+ # Show your custom avatars
69
+ python3 <SkillDir>/scripts/gen_digital_human_video.py --list-avatars --mine
70
+
71
+ # Filter by name
72
+ python3 <SkillDir>/scripts/gen_digital_human_video.py --list-avatars --name "alice"
73
+ ```
74
+
75
+ > Custom avatars require `--mine`. When generating a video the script auto-falls back from the public list to `mine: true` if needed.
76
+
77
+ ### 2. Generate a digital-human video
78
+
79
+ By default only the URL is printed; pass `--download` (and optional `--output`) to save locally. Generation is async; the script polls until done (typically 1–5 minutes).
80
+
81
+ #### TTS mode
82
+
83
+ ```bash
84
+ python3 <SkillDir>/scripts/gen_digital_human_video.py \
85
+ --avatar-id 7 \
86
+ --text "Hi everyone, welcome to the live stream — today I'll introduce a new product." \
87
+ --voice-id "male-qn-qingse"
88
+ ```
89
+
90
+ #### TTS + custom voice + aspect ratio
91
+
92
+ ```bash
93
+ python3 <SkillDir>/scripts/gen_digital_human_video.py \
94
+ --avatar-id 7 \
95
+ --text "Hi class, here's our brand-new course." \
96
+ --voice-id "female-shaonv" \
97
+ --aspect-ratio "9:16"
98
+ ```
99
+
100
+ #### Audio-driven mode
101
+
102
+ ```bash
103
+ python3 <SkillDir>/scripts/gen_digital_human_video.py \
104
+ --avatar-id 39 \
105
+ --source hifly \
106
+ --audio-url "https://example.com/voice.mp3" \
107
+ --aspect-ratio "16:9"
108
+ ```
109
+
110
+ #### Download to disk
111
+
112
+ ```bash
113
+ python3 <SkillDir>/scripts/gen_digital_human_video.py \
114
+ --avatar-id 7 \
115
+ --text "Hello world" \
116
+ --download \
117
+ --output "digital_human_output.mp4"
118
+ ```
119
+
120
+ ### 3. Check job status
121
+
122
+ ```bash
123
+ # Status only
124
+ python3 <SkillDir>/scripts/gen_digital_human_video.py \
125
+ --check-status --generation-id 123
126
+
127
+ # Download once it's done
128
+ python3 <SkillDir>/scripts/gen_digital_human_video.py \
129
+ --check-status --generation-id 123 --download --output result.mp4
130
+ ```
131
+
132
+ For the full flag list: `python3 <SkillDir>/scripts/gen_digital_human_video.py --help`.
133
+
134
+ ## Common CLI flags
135
+
136
+ ### List avatars
137
+
138
+ | Flag | Description | Default |
139
+ |------|-------------|---------|
140
+ | `--list-avatars` | List avatars and exit | — |
141
+ | `--source` | Filter by source: `jimeng` / `hifly` | no filter |
142
+ | `--gender` | Filter by gender: `male` / `female` | no filter |
143
+ | `--mine` | Limit to user's custom avatars | off |
144
+ | `--name` | Fuzzy filter by name | no filter |
145
+
146
+ ### Generate video
147
+
148
+ | Flag | Description | Default |
149
+ |------|-------------|---------|
150
+ | `--avatar-id` | Avatar id (required) | — |
151
+ | `-t` / `--text` | Speech text (required for TTS mode; optional with `--audio-url`) | — |
152
+ | `--audio-url` | Audio URL (audio-driven mode) | none |
153
+ | `--voice-id` | Voice id (TTS mode) | `male-qn-qingse` |
154
+ | `--voice-name` | Voice display name (recordkeeping) | none |
155
+ | `--source` | `jimeng` / `hifly` (inferable from avatar) | auto |
156
+ | `--aspect-ratio` | `9:16` / `16:9` / `3:4` / `1:1` | avatar's default |
157
+ | `--prompt` | Action prompt (e.g. "more hand gestures") | none |
158
+ | `--download` | Download the video locally | off |
159
+ | `-o` / `--output` | Download path (only with `--download`) | `digital_human_video.mp4` |
160
+ | `--poll-interval` | Polling interval (seconds) | `5` |
161
+ | `--max-wait` | Max wait time (seconds) | `600` |
162
+ | `--private-token` | Override token | see env vars |
163
+
164
+ ### Check status
165
+
166
+ | Flag | Description | Default |
167
+ |------|-------------|---------|
168
+ | `--check-status` | Enter status-check mode | — |
169
+ | `--generation-id` | Job id (required) | — |
170
+ | `--download` | Download when finished | off |
171
+ | `-o` / `--output` | Download path | `digital_human_video.mp4` |
172
+
173
+ ## Typical flows
174
+
175
+ ### Flow A — TTS
176
+
177
+ ```
178
+ 1. List avatars → --list-avatars [--gender female]
179
+ 2. Pick avatar-id
180
+ 3. Confirm or polish the speech text
181
+ 4. (Optional) pick a voice → use gen-voice --list-voices
182
+ 5. Generate → --avatar-id <id> --text "..." --voice-id "female-shaonv"
183
+ 6. Show URL or local path
184
+ ```
185
+
186
+ ### Flow B — Audio-driven
187
+
188
+ ```
189
+ 1. List avatars → --list-avatars [--mine]
190
+ 2. Prepare an audio URL (gen-voice can produce one)
191
+ 3. Generate → --avatar-id <id> --audio-url "https://..." [--source hifly]
192
+ 4. Show URL or local path
193
+ ```
194
+
195
+ ## Text guidance (TTS)
196
+
197
+ - Punctuation drives pacing — commas short, periods long.
198
+ - Keep individual jobs under ~500 characters.
199
+ - Tone and style of the script affect the perceived voice.
200
+
201
+ ## Error handling
202
+
203
+ - **401** / **token missing** (non-OpenClaw): set `PRIV_TOKEN`.
204
+ - **Business `code != 0`**: read `msg` on stderr.
205
+ - **429**: rate-limited; retry later.
206
+ - **Generation timeout**: increase `--max-wait`, or use `--check-status` later.
207
+ - **Empty TTS text**: provide non-empty `--text` or use `--audio-url`.
208
+ - **Invalid voice id**: re-check via `gen-voice --list-voices`.
209
+ - **Avatar id not found**: re-check via `--list-avatars` (or `--list-avatars --mine`).
210
+ - **Cannot infer source**: when the avatar lacks a `source` and `--source` is not set, pass `--source jimeng` or `--source hifly` explicitly.
211
+ - **Network**: verify connectivity and `MM_API_BASE_URL`.