@vibeframe/cli 0.27.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 (420) hide show
  1. package/.turbo/turbo-build.log +4 -0
  2. package/.turbo/turbo-lint.log +21 -0
  3. package/.turbo/turbo-test.log +689 -0
  4. package/dist/agent/adapters/claude.d.ts +15 -0
  5. package/dist/agent/adapters/claude.d.ts.map +1 -0
  6. package/dist/agent/adapters/claude.js +119 -0
  7. package/dist/agent/adapters/claude.js.map +1 -0
  8. package/dist/agent/adapters/gemini.d.ts +15 -0
  9. package/dist/agent/adapters/gemini.d.ts.map +1 -0
  10. package/dist/agent/adapters/gemini.js +132 -0
  11. package/dist/agent/adapters/gemini.js.map +1 -0
  12. package/dist/agent/adapters/index.d.ts +27 -0
  13. package/dist/agent/adapters/index.d.ts.map +1 -0
  14. package/dist/agent/adapters/index.js +38 -0
  15. package/dist/agent/adapters/index.js.map +1 -0
  16. package/dist/agent/adapters/ollama.d.ts +20 -0
  17. package/dist/agent/adapters/ollama.d.ts.map +1 -0
  18. package/dist/agent/adapters/ollama.js +186 -0
  19. package/dist/agent/adapters/ollama.js.map +1 -0
  20. package/dist/agent/adapters/openai.d.ts +15 -0
  21. package/dist/agent/adapters/openai.d.ts.map +1 -0
  22. package/dist/agent/adapters/openai.js +92 -0
  23. package/dist/agent/adapters/openai.js.map +1 -0
  24. package/dist/agent/adapters/xai.d.ts +15 -0
  25. package/dist/agent/adapters/xai.d.ts.map +1 -0
  26. package/dist/agent/adapters/xai.js +95 -0
  27. package/dist/agent/adapters/xai.js.map +1 -0
  28. package/dist/agent/index.d.ts +69 -0
  29. package/dist/agent/index.d.ts.map +1 -0
  30. package/dist/agent/index.js +180 -0
  31. package/dist/agent/index.js.map +1 -0
  32. package/dist/agent/memory/index.d.ts +70 -0
  33. package/dist/agent/memory/index.d.ts.map +1 -0
  34. package/dist/agent/memory/index.js +132 -0
  35. package/dist/agent/memory/index.js.map +1 -0
  36. package/dist/agent/prompts/system.d.ts +6 -0
  37. package/dist/agent/prompts/system.d.ts.map +1 -0
  38. package/dist/agent/prompts/system.js +103 -0
  39. package/dist/agent/prompts/system.js.map +1 -0
  40. package/dist/agent/tools/ai-editing.d.ts +15 -0
  41. package/dist/agent/tools/ai-editing.d.ts.map +1 -0
  42. package/dist/agent/tools/ai-editing.js +763 -0
  43. package/dist/agent/tools/ai-editing.js.map +1 -0
  44. package/dist/agent/tools/ai-generation.d.ts +13 -0
  45. package/dist/agent/tools/ai-generation.d.ts.map +1 -0
  46. package/dist/agent/tools/ai-generation.js +973 -0
  47. package/dist/agent/tools/ai-generation.js.map +1 -0
  48. package/dist/agent/tools/ai-pipeline.d.ts +14 -0
  49. package/dist/agent/tools/ai-pipeline.d.ts.map +1 -0
  50. package/dist/agent/tools/ai-pipeline.js +961 -0
  51. package/dist/agent/tools/ai-pipeline.js.map +1 -0
  52. package/dist/agent/tools/ai.d.ts +13 -0
  53. package/dist/agent/tools/ai.d.ts.map +1 -0
  54. package/dist/agent/tools/ai.js +19 -0
  55. package/dist/agent/tools/ai.js.map +1 -0
  56. package/dist/agent/tools/batch.d.ts +6 -0
  57. package/dist/agent/tools/batch.d.ts.map +1 -0
  58. package/dist/agent/tools/batch.js +383 -0
  59. package/dist/agent/tools/batch.js.map +1 -0
  60. package/dist/agent/tools/e2e.test.d.ts +26 -0
  61. package/dist/agent/tools/e2e.test.d.ts.map +1 -0
  62. package/dist/agent/tools/e2e.test.js +397 -0
  63. package/dist/agent/tools/e2e.test.js.map +1 -0
  64. package/dist/agent/tools/export.d.ts +6 -0
  65. package/dist/agent/tools/export.d.ts.map +1 -0
  66. package/dist/agent/tools/export.js +171 -0
  67. package/dist/agent/tools/export.js.map +1 -0
  68. package/dist/agent/tools/filesystem.d.ts +6 -0
  69. package/dist/agent/tools/filesystem.d.ts.map +1 -0
  70. package/dist/agent/tools/filesystem.js +212 -0
  71. package/dist/agent/tools/filesystem.js.map +1 -0
  72. package/dist/agent/tools/index.d.ts +65 -0
  73. package/dist/agent/tools/index.d.ts.map +1 -0
  74. package/dist/agent/tools/index.js +120 -0
  75. package/dist/agent/tools/index.js.map +1 -0
  76. package/dist/agent/tools/integration.test.d.ts +11 -0
  77. package/dist/agent/tools/integration.test.d.ts.map +1 -0
  78. package/dist/agent/tools/integration.test.js +659 -0
  79. package/dist/agent/tools/integration.test.js.map +1 -0
  80. package/dist/agent/tools/media.d.ts +6 -0
  81. package/dist/agent/tools/media.d.ts.map +1 -0
  82. package/dist/agent/tools/media.js +616 -0
  83. package/dist/agent/tools/media.js.map +1 -0
  84. package/dist/agent/tools/project.d.ts +6 -0
  85. package/dist/agent/tools/project.d.ts.map +1 -0
  86. package/dist/agent/tools/project.js +284 -0
  87. package/dist/agent/tools/project.js.map +1 -0
  88. package/dist/agent/tools/timeline.d.ts +6 -0
  89. package/dist/agent/tools/timeline.d.ts.map +1 -0
  90. package/dist/agent/tools/timeline.js +873 -0
  91. package/dist/agent/tools/timeline.js.map +1 -0
  92. package/dist/agent/types.d.ts +59 -0
  93. package/dist/agent/types.d.ts.map +1 -0
  94. package/dist/agent/types.js +5 -0
  95. package/dist/agent/types.js.map +1 -0
  96. package/dist/commands/agent.d.ts +21 -0
  97. package/dist/commands/agent.d.ts.map +1 -0
  98. package/dist/commands/agent.js +290 -0
  99. package/dist/commands/agent.js.map +1 -0
  100. package/dist/commands/ai-analyze.d.ts +106 -0
  101. package/dist/commands/ai-analyze.d.ts.map +1 -0
  102. package/dist/commands/ai-analyze.js +327 -0
  103. package/dist/commands/ai-analyze.js.map +1 -0
  104. package/dist/commands/ai-animated-caption.d.ts +64 -0
  105. package/dist/commands/ai-animated-caption.d.ts.map +1 -0
  106. package/dist/commands/ai-animated-caption.js +272 -0
  107. package/dist/commands/ai-animated-caption.js.map +1 -0
  108. package/dist/commands/ai-audio.d.ts +20 -0
  109. package/dist/commands/ai-audio.d.ts.map +1 -0
  110. package/dist/commands/ai-audio.js +808 -0
  111. package/dist/commands/ai-audio.js.map +1 -0
  112. package/dist/commands/ai-broll.d.ts +15 -0
  113. package/dist/commands/ai-broll.d.ts.map +1 -0
  114. package/dist/commands/ai-broll.js +406 -0
  115. package/dist/commands/ai-broll.js.map +1 -0
  116. package/dist/commands/ai-edit-cli.d.ts +14 -0
  117. package/dist/commands/ai-edit-cli.d.ts.map +1 -0
  118. package/dist/commands/ai-edit-cli.js +579 -0
  119. package/dist/commands/ai-edit-cli.js.map +1 -0
  120. package/dist/commands/ai-edit.d.ts +398 -0
  121. package/dist/commands/ai-edit.d.ts.map +1 -0
  122. package/dist/commands/ai-edit.js +1019 -0
  123. package/dist/commands/ai-edit.js.map +1 -0
  124. package/dist/commands/ai-fill-gaps.d.ts +14 -0
  125. package/dist/commands/ai-fill-gaps.d.ts.map +1 -0
  126. package/dist/commands/ai-fill-gaps.js +451 -0
  127. package/dist/commands/ai-fill-gaps.js.map +1 -0
  128. package/dist/commands/ai-helpers.d.ts +20 -0
  129. package/dist/commands/ai-helpers.d.ts.map +1 -0
  130. package/dist/commands/ai-helpers.js +59 -0
  131. package/dist/commands/ai-helpers.js.map +1 -0
  132. package/dist/commands/ai-highlights.d.ts +127 -0
  133. package/dist/commands/ai-highlights.d.ts.map +1 -0
  134. package/dist/commands/ai-highlights.js +1026 -0
  135. package/dist/commands/ai-highlights.js.map +1 -0
  136. package/dist/commands/ai-image.d.ts +34 -0
  137. package/dist/commands/ai-image.d.ts.map +1 -0
  138. package/dist/commands/ai-image.js +653 -0
  139. package/dist/commands/ai-image.js.map +1 -0
  140. package/dist/commands/ai-motion.d.ts +50 -0
  141. package/dist/commands/ai-motion.d.ts.map +1 -0
  142. package/dist/commands/ai-motion.js +271 -0
  143. package/dist/commands/ai-motion.js.map +1 -0
  144. package/dist/commands/ai-narrate.d.ts +66 -0
  145. package/dist/commands/ai-narrate.d.ts.map +1 -0
  146. package/dist/commands/ai-narrate.js +329 -0
  147. package/dist/commands/ai-narrate.js.map +1 -0
  148. package/dist/commands/ai-review.d.ts +57 -0
  149. package/dist/commands/ai-review.d.ts.map +1 -0
  150. package/dist/commands/ai-review.js +251 -0
  151. package/dist/commands/ai-review.js.map +1 -0
  152. package/dist/commands/ai-script-pipeline-cli.d.ts +9 -0
  153. package/dist/commands/ai-script-pipeline-cli.d.ts.map +1 -0
  154. package/dist/commands/ai-script-pipeline-cli.js +1494 -0
  155. package/dist/commands/ai-script-pipeline-cli.js.map +1 -0
  156. package/dist/commands/ai-script-pipeline.d.ts +259 -0
  157. package/dist/commands/ai-script-pipeline.d.ts.map +1 -0
  158. package/dist/commands/ai-script-pipeline.js +1027 -0
  159. package/dist/commands/ai-script-pipeline.js.map +1 -0
  160. package/dist/commands/ai-suggest-edit.d.ts +14 -0
  161. package/dist/commands/ai-suggest-edit.d.ts.map +1 -0
  162. package/dist/commands/ai-suggest-edit.js +220 -0
  163. package/dist/commands/ai-suggest-edit.js.map +1 -0
  164. package/dist/commands/ai-video-fx.d.ts +14 -0
  165. package/dist/commands/ai-video-fx.d.ts.map +1 -0
  166. package/dist/commands/ai-video-fx.js +395 -0
  167. package/dist/commands/ai-video-fx.js.map +1 -0
  168. package/dist/commands/ai-video.d.ts +15 -0
  169. package/dist/commands/ai-video.d.ts.map +1 -0
  170. package/dist/commands/ai-video.js +785 -0
  171. package/dist/commands/ai-video.js.map +1 -0
  172. package/dist/commands/ai-viral.d.ts +15 -0
  173. package/dist/commands/ai-viral.d.ts.map +1 -0
  174. package/dist/commands/ai-viral.js +519 -0
  175. package/dist/commands/ai-viral.js.map +1 -0
  176. package/dist/commands/ai-visual-fx.d.ts +14 -0
  177. package/dist/commands/ai-visual-fx.d.ts.map +1 -0
  178. package/dist/commands/ai-visual-fx.js +505 -0
  179. package/dist/commands/ai-visual-fx.js.map +1 -0
  180. package/dist/commands/ai.d.ts +38 -0
  181. package/dist/commands/ai.d.ts.map +1 -0
  182. package/dist/commands/ai.js +225 -0
  183. package/dist/commands/ai.js.map +1 -0
  184. package/dist/commands/ai.test.d.ts +2 -0
  185. package/dist/commands/ai.test.d.ts.map +1 -0
  186. package/dist/commands/ai.test.js +554 -0
  187. package/dist/commands/ai.test.js.map +1 -0
  188. package/dist/commands/analyze.d.ts +16 -0
  189. package/dist/commands/analyze.d.ts.map +1 -0
  190. package/dist/commands/analyze.js +247 -0
  191. package/dist/commands/analyze.js.map +1 -0
  192. package/dist/commands/audio.d.ts +18 -0
  193. package/dist/commands/audio.d.ts.map +1 -0
  194. package/dist/commands/audio.js +539 -0
  195. package/dist/commands/audio.js.map +1 -0
  196. package/dist/commands/batch.d.ts +3 -0
  197. package/dist/commands/batch.d.ts.map +1 -0
  198. package/dist/commands/batch.js +366 -0
  199. package/dist/commands/batch.js.map +1 -0
  200. package/dist/commands/batch.test.d.ts +2 -0
  201. package/dist/commands/batch.test.d.ts.map +1 -0
  202. package/dist/commands/batch.test.js +203 -0
  203. package/dist/commands/batch.test.js.map +1 -0
  204. package/dist/commands/detect.d.ts +3 -0
  205. package/dist/commands/detect.d.ts.map +1 -0
  206. package/dist/commands/detect.js +273 -0
  207. package/dist/commands/detect.js.map +1 -0
  208. package/dist/commands/doctor.d.ts +6 -0
  209. package/dist/commands/doctor.d.ts.map +1 -0
  210. package/dist/commands/doctor.js +191 -0
  211. package/dist/commands/doctor.js.map +1 -0
  212. package/dist/commands/edit-cmd.d.ts +26 -0
  213. package/dist/commands/edit-cmd.d.ts.map +1 -0
  214. package/dist/commands/edit-cmd.js +870 -0
  215. package/dist/commands/edit-cmd.js.map +1 -0
  216. package/dist/commands/export.d.ts +39 -0
  217. package/dist/commands/export.d.ts.map +1 -0
  218. package/dist/commands/export.js +730 -0
  219. package/dist/commands/export.js.map +1 -0
  220. package/dist/commands/generate.d.ts +25 -0
  221. package/dist/commands/generate.d.ts.map +1 -0
  222. package/dist/commands/generate.js +1885 -0
  223. package/dist/commands/generate.js.map +1 -0
  224. package/dist/commands/media.d.ts +3 -0
  225. package/dist/commands/media.d.ts.map +1 -0
  226. package/dist/commands/media.js +165 -0
  227. package/dist/commands/media.js.map +1 -0
  228. package/dist/commands/output.d.ts +45 -0
  229. package/dist/commands/output.d.ts.map +1 -0
  230. package/dist/commands/output.js +122 -0
  231. package/dist/commands/output.js.map +1 -0
  232. package/dist/commands/pipeline.d.ts +19 -0
  233. package/dist/commands/pipeline.d.ts.map +1 -0
  234. package/dist/commands/pipeline.js +345 -0
  235. package/dist/commands/pipeline.js.map +1 -0
  236. package/dist/commands/project.d.ts +3 -0
  237. package/dist/commands/project.d.ts.map +1 -0
  238. package/dist/commands/project.js +139 -0
  239. package/dist/commands/project.js.map +1 -0
  240. package/dist/commands/project.test.d.ts +2 -0
  241. package/dist/commands/project.test.d.ts.map +1 -0
  242. package/dist/commands/project.test.js +105 -0
  243. package/dist/commands/project.test.js.map +1 -0
  244. package/dist/commands/sanitize.d.ts +21 -0
  245. package/dist/commands/sanitize.d.ts.map +1 -0
  246. package/dist/commands/sanitize.js +56 -0
  247. package/dist/commands/sanitize.js.map +1 -0
  248. package/dist/commands/schema.d.ts +11 -0
  249. package/dist/commands/schema.d.ts.map +1 -0
  250. package/dist/commands/schema.js +101 -0
  251. package/dist/commands/schema.js.map +1 -0
  252. package/dist/commands/setup.d.ts +6 -0
  253. package/dist/commands/setup.d.ts.map +1 -0
  254. package/dist/commands/setup.js +440 -0
  255. package/dist/commands/setup.js.map +1 -0
  256. package/dist/commands/timeline.d.ts +3 -0
  257. package/dist/commands/timeline.d.ts.map +1 -0
  258. package/dist/commands/timeline.js +469 -0
  259. package/dist/commands/timeline.js.map +1 -0
  260. package/dist/commands/timeline.test.d.ts +2 -0
  261. package/dist/commands/timeline.test.d.ts.map +1 -0
  262. package/dist/commands/timeline.test.js +320 -0
  263. package/dist/commands/timeline.test.js.map +1 -0
  264. package/dist/commands/validate.d.ts +32 -0
  265. package/dist/commands/validate.d.ts.map +1 -0
  266. package/dist/commands/validate.js +63 -0
  267. package/dist/commands/validate.js.map +1 -0
  268. package/dist/config/config.test.d.ts +2 -0
  269. package/dist/config/config.test.d.ts.map +1 -0
  270. package/dist/config/config.test.js +164 -0
  271. package/dist/config/config.test.js.map +1 -0
  272. package/dist/config/index.d.ts +35 -0
  273. package/dist/config/index.d.ts.map +1 -0
  274. package/dist/config/index.js +101 -0
  275. package/dist/config/index.js.map +1 -0
  276. package/dist/config/schema.d.ts +43 -0
  277. package/dist/config/schema.d.ts.map +1 -0
  278. package/dist/config/schema.js +42 -0
  279. package/dist/config/schema.js.map +1 -0
  280. package/dist/engine/index.d.ts +3 -0
  281. package/dist/engine/index.d.ts.map +1 -0
  282. package/dist/engine/index.js +2 -0
  283. package/dist/engine/index.js.map +1 -0
  284. package/dist/engine/project.d.ts +84 -0
  285. package/dist/engine/project.d.ts.map +1 -0
  286. package/dist/engine/project.js +355 -0
  287. package/dist/engine/project.js.map +1 -0
  288. package/dist/engine/project.test.d.ts +2 -0
  289. package/dist/engine/project.test.d.ts.map +1 -0
  290. package/dist/engine/project.test.js +599 -0
  291. package/dist/engine/project.test.js.map +1 -0
  292. package/dist/index.d.ts +7 -0
  293. package/dist/index.d.ts.map +1 -0
  294. package/dist/index.js +131 -0
  295. package/dist/index.js.map +1 -0
  296. package/dist/utils/api-key.d.ts +36 -0
  297. package/dist/utils/api-key.d.ts.map +1 -0
  298. package/dist/utils/api-key.js +211 -0
  299. package/dist/utils/api-key.js.map +1 -0
  300. package/dist/utils/api-key.test.d.ts +2 -0
  301. package/dist/utils/api-key.test.d.ts.map +1 -0
  302. package/dist/utils/api-key.test.js +35 -0
  303. package/dist/utils/api-key.test.js.map +1 -0
  304. package/dist/utils/audio.d.ts +23 -0
  305. package/dist/utils/audio.d.ts.map +1 -0
  306. package/dist/utils/audio.js +79 -0
  307. package/dist/utils/audio.js.map +1 -0
  308. package/dist/utils/exec-safe.d.ts +22 -0
  309. package/dist/utils/exec-safe.d.ts.map +1 -0
  310. package/dist/utils/exec-safe.js +62 -0
  311. package/dist/utils/exec-safe.js.map +1 -0
  312. package/dist/utils/first-run.d.ts +13 -0
  313. package/dist/utils/first-run.d.ts.map +1 -0
  314. package/dist/utils/first-run.js +48 -0
  315. package/dist/utils/first-run.js.map +1 -0
  316. package/dist/utils/provider-resolver.d.ts +15 -0
  317. package/dist/utils/provider-resolver.d.ts.map +1 -0
  318. package/dist/utils/provider-resolver.js +42 -0
  319. package/dist/utils/provider-resolver.js.map +1 -0
  320. package/dist/utils/remotion.d.ts +210 -0
  321. package/dist/utils/remotion.d.ts.map +1 -0
  322. package/dist/utils/remotion.js +731 -0
  323. package/dist/utils/remotion.js.map +1 -0
  324. package/dist/utils/subtitle.d.ts +65 -0
  325. package/dist/utils/subtitle.d.ts.map +1 -0
  326. package/dist/utils/subtitle.js +135 -0
  327. package/dist/utils/subtitle.js.map +1 -0
  328. package/dist/utils/subtitle.test.d.ts +2 -0
  329. package/dist/utils/subtitle.test.d.ts.map +1 -0
  330. package/dist/utils/subtitle.test.js +175 -0
  331. package/dist/utils/subtitle.test.js.map +1 -0
  332. package/dist/utils/tty.d.ts +45 -0
  333. package/dist/utils/tty.d.ts.map +1 -0
  334. package/dist/utils/tty.js +172 -0
  335. package/dist/utils/tty.js.map +1 -0
  336. package/package.json +102 -0
  337. package/src/agent/adapters/claude.ts +143 -0
  338. package/src/agent/adapters/gemini.ts +159 -0
  339. package/src/agent/adapters/index.ts +61 -0
  340. package/src/agent/adapters/ollama.ts +231 -0
  341. package/src/agent/adapters/openai.ts +116 -0
  342. package/src/agent/adapters/xai.ts +119 -0
  343. package/src/agent/index.ts +251 -0
  344. package/src/agent/memory/index.ts +151 -0
  345. package/src/agent/prompts/system.ts +106 -0
  346. package/src/agent/tools/ai-editing.ts +845 -0
  347. package/src/agent/tools/ai-generation.ts +1073 -0
  348. package/src/agent/tools/ai-pipeline.ts +1055 -0
  349. package/src/agent/tools/ai.ts +21 -0
  350. package/src/agent/tools/batch.ts +429 -0
  351. package/src/agent/tools/e2e.test.ts +545 -0
  352. package/src/agent/tools/export.ts +184 -0
  353. package/src/agent/tools/filesystem.ts +237 -0
  354. package/src/agent/tools/index.ts +150 -0
  355. package/src/agent/tools/integration.test.ts +775 -0
  356. package/src/agent/tools/media.ts +697 -0
  357. package/src/agent/tools/project.ts +313 -0
  358. package/src/agent/tools/timeline.ts +951 -0
  359. package/src/agent/types.ts +68 -0
  360. package/src/commands/agent.ts +340 -0
  361. package/src/commands/ai-analyze.ts +429 -0
  362. package/src/commands/ai-animated-caption.ts +390 -0
  363. package/src/commands/ai-audio.ts +941 -0
  364. package/src/commands/ai-broll.ts +490 -0
  365. package/src/commands/ai-edit-cli.ts +658 -0
  366. package/src/commands/ai-edit.ts +1542 -0
  367. package/src/commands/ai-fill-gaps.ts +566 -0
  368. package/src/commands/ai-helpers.ts +65 -0
  369. package/src/commands/ai-highlights.ts +1303 -0
  370. package/src/commands/ai-image.ts +761 -0
  371. package/src/commands/ai-motion.ts +347 -0
  372. package/src/commands/ai-narrate.ts +451 -0
  373. package/src/commands/ai-review.ts +309 -0
  374. package/src/commands/ai-script-pipeline-cli.ts +1710 -0
  375. package/src/commands/ai-script-pipeline.ts +1365 -0
  376. package/src/commands/ai-suggest-edit.ts +264 -0
  377. package/src/commands/ai-video-fx.ts +445 -0
  378. package/src/commands/ai-video.ts +915 -0
  379. package/src/commands/ai-viral.ts +595 -0
  380. package/src/commands/ai-visual-fx.ts +601 -0
  381. package/src/commands/ai.test.ts +627 -0
  382. package/src/commands/ai.ts +307 -0
  383. package/src/commands/analyze.ts +282 -0
  384. package/src/commands/audio.ts +644 -0
  385. package/src/commands/batch.test.ts +279 -0
  386. package/src/commands/batch.ts +440 -0
  387. package/src/commands/detect.ts +329 -0
  388. package/src/commands/doctor.ts +237 -0
  389. package/src/commands/edit-cmd.ts +1014 -0
  390. package/src/commands/export.ts +918 -0
  391. package/src/commands/generate.ts +2146 -0
  392. package/src/commands/media.ts +177 -0
  393. package/src/commands/output.ts +142 -0
  394. package/src/commands/pipeline.ts +398 -0
  395. package/src/commands/project.test.ts +127 -0
  396. package/src/commands/project.ts +149 -0
  397. package/src/commands/sanitize.ts +60 -0
  398. package/src/commands/schema.ts +130 -0
  399. package/src/commands/setup.ts +509 -0
  400. package/src/commands/timeline.test.ts +499 -0
  401. package/src/commands/timeline.ts +529 -0
  402. package/src/commands/validate.ts +77 -0
  403. package/src/config/config.test.ts +197 -0
  404. package/src/config/index.ts +125 -0
  405. package/src/config/schema.ts +82 -0
  406. package/src/engine/index.ts +2 -0
  407. package/src/engine/project.test.ts +702 -0
  408. package/src/engine/project.ts +439 -0
  409. package/src/index.ts +146 -0
  410. package/src/utils/api-key.test.ts +41 -0
  411. package/src/utils/api-key.ts +247 -0
  412. package/src/utils/audio.ts +83 -0
  413. package/src/utils/exec-safe.ts +75 -0
  414. package/src/utils/first-run.ts +52 -0
  415. package/src/utils/provider-resolver.ts +56 -0
  416. package/src/utils/remotion.ts +951 -0
  417. package/src/utils/subtitle.test.ts +227 -0
  418. package/src/utils/subtitle.ts +169 -0
  419. package/src/utils/tty.ts +196 -0
  420. package/tsconfig.json +20 -0
@@ -0,0 +1,627 @@
1
+ import { describe, it, expect } from "vitest";
2
+ import { execSync } from "child_process";
3
+ import { resolve } from "path";
4
+ import { detectFillerRanges, DEFAULT_FILLER_WORDS } from "./ai-edit.js";
5
+
6
+ const CLI = `npx tsx ${resolve(__dirname, "../index.ts")}`;
7
+
8
+ describe("CLI command groups", () => {
9
+ describe("audio transcribe", () => {
10
+ it("fails without API key", () => {
11
+ expect(() => {
12
+ execSync(`${CLI} audio transcribe /tmp/nonexistent.mp3`, {
13
+ cwd: process.cwd(),
14
+ encoding: "utf-8",
15
+ env: { ...process.env, OPENAI_API_KEY: undefined },
16
+ });
17
+ }).toThrow();
18
+ });
19
+ });
20
+
21
+ describe("analyze suggest", () => {
22
+ it("fails without API key", () => {
23
+ expect(() => {
24
+ execSync(`${CLI} analyze suggest /tmp/nonexistent.json "trim clip"`, {
25
+ cwd: process.cwd(),
26
+ encoding: "utf-8",
27
+ env: { ...process.env, GOOGLE_API_KEY: undefined },
28
+ });
29
+ }).toThrow();
30
+ });
31
+ });
32
+
33
+ describe("pipeline highlights", () => {
34
+ it("shows help", () => {
35
+ const output = execSync(`${CLI} pipeline highlights --help`, {
36
+ cwd: process.cwd(),
37
+ encoding: "utf-8",
38
+ });
39
+
40
+ expect(output).toContain("Extract highlights");
41
+ expect(output).toContain("--threshold");
42
+ expect(output).toContain("--criteria");
43
+ expect(output).toContain("--duration");
44
+ expect(output).toContain("--count");
45
+ expect(output).toContain("--output");
46
+ expect(output).toContain("--project");
47
+ });
48
+
49
+ it("fails without API keys", () => {
50
+ expect(() => {
51
+ execSync(`${CLI} pipeline highlights /tmp/nonexistent.mp4`, {
52
+ cwd: process.cwd(),
53
+ encoding: "utf-8",
54
+ env: { ...process.env, OPENAI_API_KEY: undefined, ANTHROPIC_API_KEY: undefined },
55
+ });
56
+ }).toThrow();
57
+ });
58
+
59
+ it("fails with nonexistent file", () => {
60
+ expect(() => {
61
+ execSync(`${CLI} pipeline highlights /tmp/nonexistent_video_12345.mp4`, {
62
+ cwd: process.cwd(),
63
+ encoding: "utf-8",
64
+ env: { ...process.env, OPENAI_API_KEY: "test", ANTHROPIC_API_KEY: "test" },
65
+ });
66
+ }).toThrow();
67
+ });
68
+ });
69
+
70
+ describe("pipeline b-roll", () => {
71
+ it("shows help", () => {
72
+ const output = execSync(`${CLI} pipeline b-roll --help`, {
73
+ cwd: process.cwd(),
74
+ encoding: "utf-8",
75
+ });
76
+
77
+ expect(output).toContain("Match B-roll footage");
78
+ expect(output).toContain("--threshold");
79
+ expect(output).toContain("--broll");
80
+ expect(output).toContain("--broll-dir");
81
+ expect(output).toContain("--output");
82
+ expect(output).toContain("--analyze-only");
83
+ expect(output).toContain("--language");
84
+ });
85
+
86
+ it("fails without B-roll files", () => {
87
+ expect(() => {
88
+ execSync(`${CLI} pipeline b-roll "test narration"`, {
89
+ cwd: process.cwd(),
90
+ encoding: "utf-8",
91
+ env: { ...process.env, OPENAI_API_KEY: "test", ANTHROPIC_API_KEY: "test" },
92
+ });
93
+ }).toThrow();
94
+ });
95
+
96
+ it("fails without API keys", () => {
97
+ expect(() => {
98
+ execSync(`${CLI} pipeline b-roll test.mp3 -b clip.mp4`, {
99
+ cwd: process.cwd(),
100
+ encoding: "utf-8",
101
+ env: { ...process.env, OPENAI_API_KEY: undefined, ANTHROPIC_API_KEY: undefined },
102
+ });
103
+ }).toThrow();
104
+ });
105
+ });
106
+
107
+ describe("pipeline viral", () => {
108
+ it("shows help", () => {
109
+ const output = execSync(`${CLI} pipeline viral --help`, {
110
+ cwd: process.cwd(),
111
+ encoding: "utf-8",
112
+ });
113
+
114
+ expect(output).toContain("Optimize video for viral potential");
115
+ expect(output).toContain("--platforms");
116
+ expect(output).toContain("--output-dir");
117
+ expect(output).toContain("--analyze-only");
118
+ expect(output).toContain("--skip-captions");
119
+ expect(output).toContain("--caption-style");
120
+ expect(output).toContain("--hook-duration");
121
+ });
122
+
123
+ it("validates platform names", () => {
124
+ expect(() => {
125
+ execSync(`${CLI} pipeline viral /tmp/test.vibe.json --platforms invalid-platform`, {
126
+ cwd: process.cwd(),
127
+ encoding: "utf-8",
128
+ env: { ...process.env, OPENAI_API_KEY: "test", ANTHROPIC_API_KEY: "test" },
129
+ });
130
+ }).toThrow();
131
+ });
132
+
133
+ it("fails without API keys", () => {
134
+ expect(() => {
135
+ execSync(`${CLI} pipeline viral /tmp/test.vibe.json`, {
136
+ cwd: process.cwd(),
137
+ encoding: "utf-8",
138
+ env: { ...process.env, OPENAI_API_KEY: undefined, ANTHROPIC_API_KEY: undefined },
139
+ });
140
+ }).toThrow();
141
+ });
142
+
143
+ it("fails with nonexistent project", () => {
144
+ expect(() => {
145
+ execSync(`${CLI} pipeline viral /tmp/nonexistent_project_12345.vibe.json`, {
146
+ cwd: process.cwd(),
147
+ encoding: "utf-8",
148
+ env: { ...process.env, OPENAI_API_KEY: "test", ANTHROPIC_API_KEY: "test" },
149
+ });
150
+ }).toThrow();
151
+ });
152
+ });
153
+
154
+ describe("generate video-extend", () => {
155
+ it("shows help", () => {
156
+ const output = execSync(`${CLI} generate video-extend --help`, {
157
+ cwd: process.cwd(),
158
+ encoding: "utf-8",
159
+ });
160
+
161
+ expect(output).toContain("Extend video duration");
162
+ expect(output).toContain("--output");
163
+ expect(output).toContain("--prompt");
164
+ expect(output).toContain("--duration");
165
+ expect(output).toContain("--negative");
166
+ });
167
+
168
+ it("fails without API key", () => {
169
+ expect(() => {
170
+ execSync(`${CLI} generate video-extend /tmp/video.mp4`, {
171
+ cwd: process.cwd(),
172
+ encoding: "utf-8",
173
+ env: { ...process.env, KLING_API_KEY: undefined },
174
+ });
175
+ }).toThrow();
176
+ });
177
+ });
178
+
179
+ describe("edit upscale-video", () => {
180
+ it("shows help", () => {
181
+ const output = execSync(`${CLI} edit upscale-video --help`, {
182
+ cwd: process.cwd(),
183
+ encoding: "utf-8",
184
+ });
185
+
186
+ expect(output).toContain("Upscale video resolution");
187
+ expect(output).toContain("--output");
188
+ expect(output).toContain("--scale");
189
+ expect(output).toContain("--model");
190
+ expect(output).toContain("--ffmpeg");
191
+ });
192
+
193
+ it("validates scale option", () => {
194
+ expect(() => {
195
+ execSync(`${CLI} edit upscale-video /tmp/video.mp4 --scale 3 --ffmpeg`, {
196
+ cwd: process.cwd(),
197
+ encoding: "utf-8",
198
+ });
199
+ }).toThrow();
200
+ });
201
+ });
202
+
203
+ describe("edit interpolate", () => {
204
+ it("shows help", () => {
205
+ const output = execSync(`${CLI} edit interpolate --help`, {
206
+ cwd: process.cwd(),
207
+ encoding: "utf-8",
208
+ });
209
+
210
+ expect(output).toContain("slow motion");
211
+ expect(output).toContain("--output");
212
+ expect(output).toContain("--factor");
213
+ expect(output).toContain("--fps");
214
+ expect(output).toContain("--quality");
215
+ });
216
+
217
+ it("validates factor option", () => {
218
+ expect(() => {
219
+ execSync(`${CLI} edit interpolate /tmp/video.mp4 --factor 3`, {
220
+ cwd: process.cwd(),
221
+ encoding: "utf-8",
222
+ });
223
+ }).toThrow();
224
+ });
225
+ });
226
+
227
+ // Voice & Audio Features
228
+ describe("audio voice-clone", () => {
229
+ it("shows help", () => {
230
+ const output = execSync(`${CLI} audio voice-clone --help`, {
231
+ cwd: process.cwd(),
232
+ encoding: "utf-8",
233
+ });
234
+
235
+ expect(output).toContain("Clone a voice");
236
+ expect(output).toContain("--name");
237
+ expect(output).toContain("--description");
238
+ expect(output).toContain("--labels");
239
+ expect(output).toContain("--remove-noise");
240
+ expect(output).toContain("--list");
241
+ });
242
+
243
+ it("requires name option when cloning", () => {
244
+ expect(() => {
245
+ execSync(`${CLI} audio voice-clone sample.mp3`, {
246
+ cwd: process.cwd(),
247
+ encoding: "utf-8",
248
+ env: { ...process.env, ELEVENLABS_API_KEY: "test" },
249
+ });
250
+ }).toThrow();
251
+ });
252
+
253
+ it("fails without API key", () => {
254
+ expect(() => {
255
+ execSync(`${CLI} audio voice-clone sample.mp3 --name "TestVoice"`, {
256
+ cwd: process.cwd(),
257
+ encoding: "utf-8",
258
+ env: { ...process.env, ELEVENLABS_API_KEY: undefined },
259
+ });
260
+ }).toThrow();
261
+ });
262
+ });
263
+
264
+ describe("generate music", () => {
265
+ it("shows help", () => {
266
+ const output = execSync(`${CLI} generate music --help`, {
267
+ cwd: process.cwd(),
268
+ encoding: "utf-8",
269
+ });
270
+
271
+ expect(output).toContain("Generate background music");
272
+ expect(output).toContain("--duration");
273
+ expect(output).toContain("--melody");
274
+ expect(output).toContain("--model");
275
+ expect(output).toContain("--output");
276
+ expect(output).toContain("--no-wait");
277
+ });
278
+
279
+ it("requires API key or shows error", () => {
280
+ try {
281
+ const output = execSync(`${CLI} generate music "upbeat electronic" --no-wait`, {
282
+ cwd: process.cwd(),
283
+ encoding: "utf-8",
284
+ env: { ...process.env, REPLICATE_API_TOKEN: undefined },
285
+ timeout: 10000,
286
+ });
287
+ expect(output).toBeTruthy();
288
+ } catch (error: unknown) {
289
+ const execError = error as { stderr?: string; stdout?: string };
290
+ const errorOutput = execError.stderr || execError.stdout || "";
291
+ expect(errorOutput.toLowerCase()).toMatch(/api|key|token|replicate/i);
292
+ }
293
+ });
294
+ });
295
+
296
+ describe("generate music-status", () => {
297
+ it("shows help", () => {
298
+ const output = execSync(`${CLI} generate music-status --help`, {
299
+ cwd: process.cwd(),
300
+ encoding: "utf-8",
301
+ });
302
+
303
+ expect(output).toContain("Check music generation status");
304
+ expect(output).toContain("task-id");
305
+ });
306
+
307
+ it("requires API key or shows error", () => {
308
+ try {
309
+ const output = execSync(`${CLI} generate music-status test-task-id`, {
310
+ cwd: process.cwd(),
311
+ encoding: "utf-8",
312
+ env: { ...process.env, REPLICATE_API_TOKEN: undefined },
313
+ timeout: 10000,
314
+ });
315
+ expect(output).toBeTruthy();
316
+ } catch (error: unknown) {
317
+ const execError = error as { stderr?: string; stdout?: string };
318
+ const errorOutput = execError.stderr || execError.stdout || "";
319
+ expect(errorOutput.toLowerCase()).toMatch(/api|key|token|replicate|task|invalid/i);
320
+ }
321
+ });
322
+ });
323
+
324
+ describe("audio dub", () => {
325
+ it("shows help", () => {
326
+ const output = execSync(`${CLI} audio dub --help`, {
327
+ cwd: process.cwd(),
328
+ encoding: "utf-8",
329
+ });
330
+
331
+ expect(output).toContain("Dub audio/video");
332
+ expect(output).toContain("--language");
333
+ expect(output).toContain("--source");
334
+ expect(output).toContain("--voice");
335
+ expect(output).toContain("--analyze-only");
336
+ expect(output).toContain("--output");
337
+ });
338
+
339
+ it("requires language option", () => {
340
+ expect(() => {
341
+ execSync(`${CLI} audio dub /tmp/video.mp4`, {
342
+ cwd: process.cwd(),
343
+ encoding: "utf-8",
344
+ env: { ...process.env, OPENAI_API_KEY: "test", ANTHROPIC_API_KEY: "test" },
345
+ });
346
+ }).toThrow();
347
+ });
348
+
349
+ it("fails without API keys", () => {
350
+ expect(() => {
351
+ execSync(`${CLI} audio dub /tmp/video.mp4 -l es`, {
352
+ cwd: process.cwd(),
353
+ encoding: "utf-8",
354
+ env: { ...process.env, OPENAI_API_KEY: undefined, ANTHROPIC_API_KEY: undefined },
355
+ });
356
+ }).toThrow();
357
+ });
358
+
359
+ it("fails with nonexistent file", () => {
360
+ expect(() => {
361
+ execSync(`${CLI} audio dub /tmp/nonexistent_video_12345.mp4 -l es`, {
362
+ cwd: process.cwd(),
363
+ encoding: "utf-8",
364
+ env: { ...process.env, OPENAI_API_KEY: "test", ANTHROPIC_API_KEY: "test", ELEVENLABS_API_KEY: "test" },
365
+ });
366
+ }).toThrow();
367
+ });
368
+ });
369
+
370
+ describe("edit jump-cut", () => {
371
+ it("shows help", () => {
372
+ const output = execSync(`${CLI} edit jump-cut --help`, {
373
+ cwd: process.cwd(),
374
+ encoding: "utf-8",
375
+ });
376
+
377
+ expect(output).toContain("Remove filler words");
378
+ expect(output).toContain("--fillers");
379
+ expect(output).toContain("--padding");
380
+ expect(output).toContain("--analyze-only");
381
+ expect(output).toContain("--language");
382
+ expect(output).toContain("--api-key");
383
+ expect(output).toContain("--output");
384
+ });
385
+
386
+ it("fails with nonexistent file", () => {
387
+ expect(() => {
388
+ execSync(`${CLI} edit jump-cut /tmp/nonexistent_video_12345.mp4`, {
389
+ cwd: process.cwd(),
390
+ encoding: "utf-8",
391
+ env: { ...process.env, OPENAI_API_KEY: "test" },
392
+ });
393
+ }).toThrow();
394
+ });
395
+
396
+ it("fails without API key", () => {
397
+ expect(() => {
398
+ execSync(`${CLI} edit jump-cut /tmp/nonexistent.mp4`, {
399
+ cwd: process.cwd(),
400
+ encoding: "utf-8",
401
+ env: { ...process.env, OPENAI_API_KEY: undefined },
402
+ });
403
+ }).toThrow();
404
+ });
405
+ });
406
+
407
+ describe("detectFillerRanges", () => {
408
+ const words = [
409
+ { word: "Hello", start: 0.0, end: 0.5 },
410
+ { word: "um", start: 0.6, end: 0.9 },
411
+ { word: "I", start: 1.0, end: 1.1 },
412
+ { word: "think", start: 1.2, end: 1.5 },
413
+ { word: "like", start: 1.6, end: 1.9 },
414
+ { word: "this", start: 2.0, end: 2.3 },
415
+ { word: "is", start: 2.4, end: 2.6 },
416
+ { word: "basically", start: 2.7, end: 3.2 },
417
+ { word: "great", start: 3.3, end: 3.6 },
418
+ ];
419
+
420
+ it("detects filler words with default list", () => {
421
+ const result = detectFillerRanges(words, DEFAULT_FILLER_WORDS, 0.05);
422
+
423
+ expect(result.length).toBe(3);
424
+ expect(result[0].word).toBe("um");
425
+ expect(result[1].word).toBe("like");
426
+ expect(result[2].word).toBe("basically");
427
+ });
428
+
429
+ it("detects fillers case-insensitively", () => {
430
+ const mixedCase = [
431
+ { word: "UM", start: 0.0, end: 0.3 },
432
+ { word: "Like", start: 1.0, end: 1.3 },
433
+ ];
434
+ const result = detectFillerRanges(mixedCase, DEFAULT_FILLER_WORDS, 0.05);
435
+
436
+ expect(result.length).toBe(2);
437
+ });
438
+
439
+ it("strips punctuation before matching", () => {
440
+ const punctuated = [
441
+ { word: "um,", start: 0.0, end: 0.3 },
442
+ { word: "like.", start: 1.0, end: 1.3 },
443
+ { word: "right?", start: 2.0, end: 2.3 },
444
+ ];
445
+ const result = detectFillerRanges(punctuated, DEFAULT_FILLER_WORDS, 0.05);
446
+
447
+ expect(result.length).toBe(3);
448
+ });
449
+
450
+ it("merges adjacent filler ranges within padding distance", () => {
451
+ const adjacent = [
452
+ { word: "um", start: 1.0, end: 1.3 },
453
+ { word: "uh", start: 1.35, end: 1.6 },
454
+ ];
455
+ const result = detectFillerRanges(adjacent, DEFAULT_FILLER_WORDS, 0.05);
456
+
457
+ expect(result.length).toBe(1);
458
+ expect(result[0].start).toBe(1.0);
459
+ expect(result[0].end).toBe(1.6);
460
+ expect(result[0].word).toContain("um");
461
+ expect(result[0].word).toContain("uh");
462
+ });
463
+
464
+ it("does not merge distant filler ranges", () => {
465
+ const distant = [
466
+ { word: "um", start: 1.0, end: 1.3 },
467
+ { word: "uh", start: 5.0, end: 5.3 },
468
+ ];
469
+ const result = detectFillerRanges(distant, DEFAULT_FILLER_WORDS, 0.05);
470
+
471
+ expect(result.length).toBe(2);
472
+ });
473
+
474
+ it("returns empty array when no fillers found", () => {
475
+ const clean = [
476
+ { word: "This", start: 0.0, end: 0.3 },
477
+ { word: "is", start: 0.4, end: 0.5 },
478
+ { word: "great", start: 0.6, end: 0.9 },
479
+ ];
480
+ const result = detectFillerRanges(clean, DEFAULT_FILLER_WORDS, 0.05);
481
+
482
+ expect(result.length).toBe(0);
483
+ });
484
+
485
+ it("respects custom filler list", () => {
486
+ const customFillers = ["hello", "great"];
487
+ const result = detectFillerRanges(words, customFillers, 0.05);
488
+
489
+ expect(result.length).toBe(2);
490
+ expect(result[0].word).toBe("Hello");
491
+ expect(result[1].word).toBe("great");
492
+ });
493
+
494
+ it("handles empty word array", () => {
495
+ const result = detectFillerRanges([], DEFAULT_FILLER_WORDS, 0.05);
496
+
497
+ expect(result.length).toBe(0);
498
+ });
499
+ });
500
+
501
+ describe("DEFAULT_FILLER_WORDS", () => {
502
+ it("contains expected common fillers", () => {
503
+ expect(DEFAULT_FILLER_WORDS).toContain("um");
504
+ expect(DEFAULT_FILLER_WORDS).toContain("uh");
505
+ expect(DEFAULT_FILLER_WORDS).toContain("like");
506
+ expect(DEFAULT_FILLER_WORDS).toContain("you know");
507
+ expect(DEFAULT_FILLER_WORDS).toContain("basically");
508
+ expect(DEFAULT_FILLER_WORDS).toContain("literally");
509
+ expect(DEFAULT_FILLER_WORDS).toContain("i mean");
510
+ expect(DEFAULT_FILLER_WORDS).toContain("actually");
511
+ });
512
+
513
+ it("has all words in lowercase", () => {
514
+ for (const word of DEFAULT_FILLER_WORDS) {
515
+ expect(word).toBe(word.toLowerCase());
516
+ }
517
+ });
518
+ });
519
+
520
+ describe("edit noise-reduce", () => {
521
+ it("shows help", () => {
522
+ const output = execSync(`${CLI} edit noise-reduce --help`, {
523
+ cwd: process.cwd(),
524
+ encoding: "utf-8",
525
+ });
526
+
527
+ expect(output).toContain("Remove background noise");
528
+ expect(output).toContain("--strength");
529
+ expect(output).toContain("--noise-floor");
530
+ expect(output).toContain("--output");
531
+ });
532
+
533
+ it("fails with nonexistent file", () => {
534
+ expect(() => {
535
+ execSync(`${CLI} edit noise-reduce /tmp/nonexistent_audio_12345.mp4`, {
536
+ cwd: process.cwd(),
537
+ encoding: "utf-8",
538
+ });
539
+ }).toThrow();
540
+ });
541
+ });
542
+
543
+ describe("edit fade", () => {
544
+ it("shows help", () => {
545
+ const output = execSync(`${CLI} edit fade --help`, {
546
+ cwd: process.cwd(),
547
+ encoding: "utf-8",
548
+ });
549
+
550
+ expect(output).toContain("Apply fade in/out");
551
+ expect(output).toContain("--fade-in");
552
+ expect(output).toContain("--fade-out");
553
+ expect(output).toContain("--audio-only");
554
+ expect(output).toContain("--video-only");
555
+ expect(output).toContain("--output");
556
+ });
557
+
558
+ it("fails with nonexistent file", () => {
559
+ expect(() => {
560
+ execSync(`${CLI} edit fade /tmp/nonexistent_video_12345.mp4`, {
561
+ cwd: process.cwd(),
562
+ encoding: "utf-8",
563
+ });
564
+ }).toThrow();
565
+ });
566
+ });
567
+
568
+ describe("generate thumbnail --best-frame", () => {
569
+ it("shows help with best-frame option", () => {
570
+ const output = execSync(`${CLI} generate thumbnail --help`, {
571
+ cwd: process.cwd(),
572
+ encoding: "utf-8",
573
+ });
574
+
575
+ expect(output).toContain("--best-frame");
576
+ expect(output).toContain("--prompt");
577
+ expect(output).toContain("--model");
578
+ expect(output).toContain("--output");
579
+ });
580
+
581
+ it("fails with nonexistent video for best-frame", () => {
582
+ expect(() => {
583
+ execSync(`${CLI} generate thumbnail --best-frame /tmp/nonexistent_video_12345.mp4`, {
584
+ cwd: process.cwd(),
585
+ encoding: "utf-8",
586
+ env: { ...process.env, GOOGLE_API_KEY: "test" },
587
+ });
588
+ }).toThrow();
589
+ });
590
+ });
591
+
592
+ describe("edit translate-srt", () => {
593
+ it("shows help", () => {
594
+ const output = execSync(`${CLI} edit translate-srt --help`, {
595
+ cwd: process.cwd(),
596
+ encoding: "utf-8",
597
+ });
598
+
599
+ expect(output).toContain("Translate SRT");
600
+ expect(output).toContain("--target");
601
+ expect(output).toContain("--provider");
602
+ expect(output).toContain("--source");
603
+ expect(output).toContain("--output");
604
+ expect(output).toContain("--api-key");
605
+ });
606
+
607
+ it("fails without target language", () => {
608
+ expect(() => {
609
+ execSync(`${CLI} edit translate-srt /tmp/test.srt`, {
610
+ cwd: process.cwd(),
611
+ encoding: "utf-8",
612
+ env: { ...process.env, ANTHROPIC_API_KEY: "test" },
613
+ });
614
+ }).toThrow();
615
+ });
616
+
617
+ it("fails with nonexistent file", () => {
618
+ expect(() => {
619
+ execSync(`${CLI} edit translate-srt /tmp/nonexistent_12345.srt -t ko`, {
620
+ cwd: process.cwd(),
621
+ encoding: "utf-8",
622
+ env: { ...process.env, ANTHROPIC_API_KEY: "test" },
623
+ });
624
+ }).toThrow();
625
+ });
626
+ });
627
+ });