@vibeframe/cli 0.27.0 → 0.30.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 (118) hide show
  1. package/LICENSE +21 -0
  2. package/dist/agent/adapters/index.d.ts +1 -0
  3. package/dist/agent/adapters/index.d.ts.map +1 -1
  4. package/dist/agent/adapters/index.js +5 -0
  5. package/dist/agent/adapters/index.js.map +1 -1
  6. package/dist/agent/adapters/openrouter.d.ts +16 -0
  7. package/dist/agent/adapters/openrouter.d.ts.map +1 -0
  8. package/dist/agent/adapters/openrouter.js +100 -0
  9. package/dist/agent/adapters/openrouter.js.map +1 -0
  10. package/dist/agent/types.d.ts +1 -1
  11. package/dist/agent/types.d.ts.map +1 -1
  12. package/dist/commands/agent.d.ts.map +1 -1
  13. package/dist/commands/agent.js +3 -1
  14. package/dist/commands/agent.js.map +1 -1
  15. package/dist/commands/ai-edit-cli.d.ts.map +1 -1
  16. package/dist/commands/ai-edit-cli.js +18 -0
  17. package/dist/commands/ai-edit-cli.js.map +1 -1
  18. package/dist/commands/generate.js +14 -0
  19. package/dist/commands/generate.js.map +1 -1
  20. package/dist/commands/schema.d.ts +1 -0
  21. package/dist/commands/schema.d.ts.map +1 -1
  22. package/dist/commands/schema.js +122 -21
  23. package/dist/commands/schema.js.map +1 -1
  24. package/dist/commands/setup.js +5 -2
  25. package/dist/commands/setup.js.map +1 -1
  26. package/dist/config/schema.d.ts +2 -1
  27. package/dist/config/schema.d.ts.map +1 -1
  28. package/dist/config/schema.js +2 -0
  29. package/dist/config/schema.js.map +1 -1
  30. package/dist/index.js +0 -0
  31. package/package.json +16 -12
  32. package/.turbo/turbo-build.log +0 -4
  33. package/.turbo/turbo-lint.log +0 -21
  34. package/.turbo/turbo-test.log +0 -689
  35. package/src/agent/adapters/claude.ts +0 -143
  36. package/src/agent/adapters/gemini.ts +0 -159
  37. package/src/agent/adapters/index.ts +0 -61
  38. package/src/agent/adapters/ollama.ts +0 -231
  39. package/src/agent/adapters/openai.ts +0 -116
  40. package/src/agent/adapters/xai.ts +0 -119
  41. package/src/agent/index.ts +0 -251
  42. package/src/agent/memory/index.ts +0 -151
  43. package/src/agent/prompts/system.ts +0 -106
  44. package/src/agent/tools/ai-editing.ts +0 -845
  45. package/src/agent/tools/ai-generation.ts +0 -1073
  46. package/src/agent/tools/ai-pipeline.ts +0 -1055
  47. package/src/agent/tools/ai.ts +0 -21
  48. package/src/agent/tools/batch.ts +0 -429
  49. package/src/agent/tools/e2e.test.ts +0 -545
  50. package/src/agent/tools/export.ts +0 -184
  51. package/src/agent/tools/filesystem.ts +0 -237
  52. package/src/agent/tools/index.ts +0 -150
  53. package/src/agent/tools/integration.test.ts +0 -775
  54. package/src/agent/tools/media.ts +0 -697
  55. package/src/agent/tools/project.ts +0 -313
  56. package/src/agent/tools/timeline.ts +0 -951
  57. package/src/agent/types.ts +0 -68
  58. package/src/commands/agent.ts +0 -340
  59. package/src/commands/ai-analyze.ts +0 -429
  60. package/src/commands/ai-animated-caption.ts +0 -390
  61. package/src/commands/ai-audio.ts +0 -941
  62. package/src/commands/ai-broll.ts +0 -490
  63. package/src/commands/ai-edit-cli.ts +0 -658
  64. package/src/commands/ai-edit.ts +0 -1542
  65. package/src/commands/ai-fill-gaps.ts +0 -566
  66. package/src/commands/ai-helpers.ts +0 -65
  67. package/src/commands/ai-highlights.ts +0 -1303
  68. package/src/commands/ai-image.ts +0 -761
  69. package/src/commands/ai-motion.ts +0 -347
  70. package/src/commands/ai-narrate.ts +0 -451
  71. package/src/commands/ai-review.ts +0 -309
  72. package/src/commands/ai-script-pipeline-cli.ts +0 -1710
  73. package/src/commands/ai-script-pipeline.ts +0 -1365
  74. package/src/commands/ai-suggest-edit.ts +0 -264
  75. package/src/commands/ai-video-fx.ts +0 -445
  76. package/src/commands/ai-video.ts +0 -915
  77. package/src/commands/ai-viral.ts +0 -595
  78. package/src/commands/ai-visual-fx.ts +0 -601
  79. package/src/commands/ai.test.ts +0 -627
  80. package/src/commands/ai.ts +0 -307
  81. package/src/commands/analyze.ts +0 -282
  82. package/src/commands/audio.ts +0 -644
  83. package/src/commands/batch.test.ts +0 -279
  84. package/src/commands/batch.ts +0 -440
  85. package/src/commands/detect.ts +0 -329
  86. package/src/commands/doctor.ts +0 -237
  87. package/src/commands/edit-cmd.ts +0 -1014
  88. package/src/commands/export.ts +0 -918
  89. package/src/commands/generate.ts +0 -2146
  90. package/src/commands/media.ts +0 -177
  91. package/src/commands/output.ts +0 -142
  92. package/src/commands/pipeline.ts +0 -398
  93. package/src/commands/project.test.ts +0 -127
  94. package/src/commands/project.ts +0 -149
  95. package/src/commands/sanitize.ts +0 -60
  96. package/src/commands/schema.ts +0 -130
  97. package/src/commands/setup.ts +0 -509
  98. package/src/commands/timeline.test.ts +0 -499
  99. package/src/commands/timeline.ts +0 -529
  100. package/src/commands/validate.ts +0 -77
  101. package/src/config/config.test.ts +0 -197
  102. package/src/config/index.ts +0 -125
  103. package/src/config/schema.ts +0 -82
  104. package/src/engine/index.ts +0 -2
  105. package/src/engine/project.test.ts +0 -702
  106. package/src/engine/project.ts +0 -439
  107. package/src/index.ts +0 -146
  108. package/src/utils/api-key.test.ts +0 -41
  109. package/src/utils/api-key.ts +0 -247
  110. package/src/utils/audio.ts +0 -83
  111. package/src/utils/exec-safe.ts +0 -75
  112. package/src/utils/first-run.ts +0 -52
  113. package/src/utils/provider-resolver.ts +0 -56
  114. package/src/utils/remotion.ts +0 -951
  115. package/src/utils/subtitle.test.ts +0 -227
  116. package/src/utils/subtitle.ts +0 -169
  117. package/src/utils/tty.ts +0 -196
  118. package/tsconfig.json +0 -20
@@ -1,279 +0,0 @@
1
- import { describe, it, expect, beforeEach, afterEach } from "vitest";
2
- import { execSync } from "child_process";
3
- import {
4
- readFileSync,
5
- writeFileSync,
6
- mkdtempSync,
7
- mkdirSync,
8
- rmSync,
9
- } from "fs";
10
- import { join, resolve } from "path";
11
- import { tmpdir } from "os";
12
-
13
- const CLI = `npx tsx ${resolve(__dirname, "../index.ts")}`;
14
-
15
- describe("batch commands", () => {
16
- let tempDir: string;
17
- let projectFile: string;
18
- let mediaDir: string;
19
-
20
- beforeEach(() => {
21
- tempDir = mkdtempSync(join(tmpdir(), "vibe-batch-test-"));
22
- projectFile = join(tempDir, "test.vibe.json");
23
- mediaDir = join(tempDir, "media");
24
- mkdirSync(mediaDir);
25
-
26
- // Create project
27
- execSync(`${CLI} project create "Batch Test" -o "${projectFile}"`, {
28
- cwd: process.cwd(),
29
- encoding: "utf-8",
30
- });
31
-
32
- // Create dummy media files
33
- writeFileSync(join(mediaDir, "clip1.mp4"), "dummy video 1");
34
- writeFileSync(join(mediaDir, "clip2.mp4"), "dummy video 2");
35
- writeFileSync(join(mediaDir, "clip3.mp4"), "dummy video 3");
36
- writeFileSync(join(mediaDir, "audio.mp3"), "dummy audio");
37
- writeFileSync(join(mediaDir, "image.jpg"), "dummy image");
38
- });
39
-
40
- afterEach(() => {
41
- rmSync(tempDir, { recursive: true, force: true });
42
- });
43
-
44
- describe("batch import", () => {
45
- it("imports all media files from directory", () => {
46
- execSync(`${CLI} batch import "${projectFile}" "${mediaDir}"`, {
47
- cwd: process.cwd(),
48
- encoding: "utf-8",
49
- });
50
-
51
- const content = JSON.parse(readFileSync(projectFile, "utf-8"));
52
- expect(content.state.sources).toHaveLength(5);
53
- });
54
-
55
- it("filters files by extension", () => {
56
- execSync(
57
- `${CLI} batch import "${projectFile}" "${mediaDir}" --filter ".mp4"`,
58
- { cwd: process.cwd(), encoding: "utf-8" }
59
- );
60
-
61
- const content = JSON.parse(readFileSync(projectFile, "utf-8"));
62
- expect(content.state.sources).toHaveLength(3);
63
- expect(content.state.sources.every((s: any) => s.name.endsWith(".mp4"))).toBe(
64
- true
65
- );
66
- });
67
-
68
- it("imports recursively", () => {
69
- // Create subdirectory with media
70
- const subDir = join(mediaDir, "subdir");
71
- mkdirSync(subDir);
72
- writeFileSync(join(subDir, "nested.mp4"), "nested video");
73
-
74
- execSync(`${CLI} batch import "${projectFile}" "${mediaDir}" -r`, {
75
- cwd: process.cwd(),
76
- encoding: "utf-8",
77
- });
78
-
79
- const content = JSON.parse(readFileSync(projectFile, "utf-8"));
80
- expect(content.state.sources).toHaveLength(6);
81
- });
82
- });
83
-
84
- describe("batch concat", () => {
85
- beforeEach(() => {
86
- // Import media first
87
- execSync(
88
- `${CLI} batch import "${projectFile}" "${mediaDir}" --filter ".mp4"`,
89
- { cwd: process.cwd(), encoding: "utf-8" }
90
- );
91
-
92
- // Set durations for sources
93
- const content = JSON.parse(readFileSync(projectFile, "utf-8"));
94
- content.state.sources.forEach((s: any, i: number) => {
95
- s.duration = 5 + i; // 5, 6, 7 seconds
96
- });
97
- writeFileSync(projectFile, JSON.stringify(content, null, 2), "utf-8");
98
- });
99
-
100
- it("concatenates all sources", () => {
101
- execSync(`${CLI} batch concat "${projectFile}" --all`, {
102
- cwd: process.cwd(),
103
- encoding: "utf-8",
104
- });
105
-
106
- const content = JSON.parse(readFileSync(projectFile, "utf-8"));
107
- expect(content.state.clips).toHaveLength(3);
108
-
109
- // Check sequential positioning
110
- const clips = content.state.clips;
111
- expect(clips[0].startTime).toBe(0);
112
- expect(clips[1].startTime).toBe(clips[0].duration);
113
- expect(clips[2].startTime).toBe(clips[0].duration + clips[1].duration);
114
- });
115
-
116
- it("concatenates with gap between clips", () => {
117
- execSync(`${CLI} batch concat "${projectFile}" --all --gap 2`, {
118
- cwd: process.cwd(),
119
- encoding: "utf-8",
120
- });
121
-
122
- const content = JSON.parse(readFileSync(projectFile, "utf-8"));
123
- const clips = content.state.clips;
124
-
125
- expect(clips[1].startTime).toBe(clips[0].duration + 2);
126
- });
127
-
128
- it("concatenates from specific start time", () => {
129
- execSync(`${CLI} batch concat "${projectFile}" --all --start 10`, {
130
- cwd: process.cwd(),
131
- encoding: "utf-8",
132
- });
133
-
134
- const content = JSON.parse(readFileSync(projectFile, "utf-8"));
135
- expect(content.state.clips[0].startTime).toBe(10);
136
- });
137
- });
138
-
139
- describe("batch apply-effect", () => {
140
- let clipIds: string[];
141
-
142
- beforeEach(() => {
143
- // Import and concat
144
- execSync(
145
- `${CLI} batch import "${projectFile}" "${mediaDir}" --filter ".mp4"`,
146
- { cwd: process.cwd(), encoding: "utf-8" }
147
- );
148
-
149
- let content = JSON.parse(readFileSync(projectFile, "utf-8"));
150
- content.state.sources.forEach((s: any) => {
151
- s.duration = 5;
152
- });
153
- writeFileSync(projectFile, JSON.stringify(content, null, 2), "utf-8");
154
-
155
- execSync(`${CLI} batch concat "${projectFile}" --all`, {
156
- cwd: process.cwd(),
157
- encoding: "utf-8",
158
- });
159
-
160
- content = JSON.parse(readFileSync(projectFile, "utf-8"));
161
- clipIds = content.state.clips.map((c: any) => c.id);
162
- });
163
-
164
- it("applies effect to all clips", () => {
165
- execSync(`${CLI} batch apply-effect "${projectFile}" fadeIn --all`, {
166
- cwd: process.cwd(),
167
- encoding: "utf-8",
168
- });
169
-
170
- const content = JSON.parse(readFileSync(projectFile, "utf-8"));
171
- expect(content.state.clips[0].effects).toHaveLength(1);
172
- expect(content.state.clips[1].effects).toHaveLength(1);
173
- expect(content.state.clips[2].effects).toHaveLength(1);
174
- expect(content.state.clips[0].effects[0].type).toBe("fadeIn");
175
- });
176
-
177
- it("applies effect with custom duration", () => {
178
- execSync(
179
- `${CLI} batch apply-effect "${projectFile}" fadeOut --all -d 2`,
180
- { cwd: process.cwd(), encoding: "utf-8" }
181
- );
182
-
183
- const content = JSON.parse(readFileSync(projectFile, "utf-8"));
184
- expect(content.state.clips[0].effects[0].duration).toBe(2);
185
- });
186
-
187
- it("applies effect to specific clips", () => {
188
- execSync(
189
- `${CLI} batch apply-effect "${projectFile}" blur ${clipIds[0]} ${clipIds[2]}`,
190
- { cwd: process.cwd(), encoding: "utf-8" }
191
- );
192
-
193
- const content = JSON.parse(readFileSync(projectFile, "utf-8"));
194
- expect(content.state.clips[0].effects).toHaveLength(1);
195
- expect(content.state.clips[1].effects).toHaveLength(0);
196
- expect(content.state.clips[2].effects).toHaveLength(1);
197
- });
198
- });
199
-
200
- describe("batch remove-clips", () => {
201
- beforeEach(() => {
202
- // Import and concat
203
- execSync(
204
- `${CLI} batch import "${projectFile}" "${mediaDir}" --filter ".mp4"`,
205
- { cwd: process.cwd(), encoding: "utf-8" }
206
- );
207
-
208
- const content = JSON.parse(readFileSync(projectFile, "utf-8"));
209
- content.state.sources.forEach((s: any) => {
210
- s.duration = 5;
211
- });
212
- writeFileSync(projectFile, JSON.stringify(content, null, 2), "utf-8");
213
-
214
- execSync(`${CLI} batch concat "${projectFile}" --all`, {
215
- cwd: process.cwd(),
216
- encoding: "utf-8",
217
- });
218
- });
219
-
220
- it("removes all clips", () => {
221
- const before = JSON.parse(readFileSync(projectFile, "utf-8"));
222
- expect(before.state.clips).toHaveLength(3);
223
-
224
- execSync(`${CLI} batch remove-clips "${projectFile}" --all`, {
225
- cwd: process.cwd(),
226
- encoding: "utf-8",
227
- });
228
-
229
- const content = JSON.parse(readFileSync(projectFile, "utf-8"));
230
- expect(content.state.clips).toHaveLength(0);
231
- });
232
-
233
- it("removes specific clips", () => {
234
- const before = JSON.parse(readFileSync(projectFile, "utf-8"));
235
- const clipId = before.state.clips[0].id;
236
-
237
- execSync(`${CLI} batch remove-clips "${projectFile}" ${clipId}`, {
238
- cwd: process.cwd(),
239
- encoding: "utf-8",
240
- });
241
-
242
- const content = JSON.parse(readFileSync(projectFile, "utf-8"));
243
- expect(content.state.clips).toHaveLength(2);
244
- });
245
- });
246
-
247
- describe("batch info", () => {
248
- beforeEach(() => {
249
- // Import and concat
250
- execSync(
251
- `${CLI} batch import "${projectFile}" "${mediaDir}" --filter ".mp4"`,
252
- { cwd: process.cwd(), encoding: "utf-8" }
253
- );
254
-
255
- const content = JSON.parse(readFileSync(projectFile, "utf-8"));
256
- content.state.sources.forEach((s: any) => {
257
- s.duration = 5;
258
- });
259
- writeFileSync(projectFile, JSON.stringify(content, null, 2), "utf-8");
260
-
261
- execSync(`${CLI} batch concat "${projectFile}" --all`, {
262
- cwd: process.cwd(),
263
- encoding: "utf-8",
264
- });
265
- });
266
-
267
- it("shows project statistics", () => {
268
- const output = execSync(`${CLI} batch info "${projectFile}"`, {
269
- cwd: process.cwd(),
270
- encoding: "utf-8",
271
- });
272
-
273
- expect(output).toContain("Sources:");
274
- expect(output).toContain("Clips:");
275
- expect(output).toContain("Timeline:");
276
- expect(output).toContain("3"); // 3 sources/clips
277
- });
278
- });
279
- });