@devinilabs/reelstack 1.2.0 → 1.3.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.
package/NOTICE ADDED
@@ -0,0 +1,32 @@
1
+ ReelStack
2
+ Copyright (c) Devini Labs
3
+
4
+ This product includes companion Claude Code skills redistributed under the
5
+ terms of the MIT License. The bundled companion skills are:
6
+
7
+ - gsap-core skill/companions/gsap-core/SKILL.md (MIT)
8
+ - gsap-timeline skill/companions/gsap-timeline/SKILL.md (MIT)
9
+
10
+ The reel-capture companion skill (skill/companions/reel-capture/SKILL.md)
11
+ is original work by Devini Labs.
12
+
13
+ MIT License
14
+ -----------
15
+
16
+ Permission is hereby granted, free of charge, to any person obtaining a copy
17
+ of this software and associated documentation files (the "Software"), to deal
18
+ in the Software without restriction, including without limitation the rights
19
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
20
+ copies of the Software, and to permit persons to whom the Software is
21
+ furnished to do so, subject to the following conditions:
22
+
23
+ The above copyright notice and this permission notice shall be included in all
24
+ copies or substantial portions of the Software.
25
+
26
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
27
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
29
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
30
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
31
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
32
+ SOFTWARE.
package/cli/init.js CHANGED
@@ -14,6 +14,7 @@
14
14
  */
15
15
  const fs = require("node:fs");
16
16
  const path = require("node:path");
17
+ const { spawnSync } = require("node:child_process");
17
18
  const {
18
19
  banner, info, success, fail, warn, c, askYesNo, ensureDir, which,
19
20
  REELSTACK_HOME, CLAUDE_SKILLS_HOME, CLAUDE_COMMANDS_HOME,
@@ -149,6 +150,113 @@ async function ensureWhisper() {
149
150
  return false;
150
151
  }
151
152
 
153
+ async function ensureBetterIcons() {
154
+ if (which("better-icons")) {
155
+ success("better-icons found");
156
+ saveState({ betterIcons: "ok" });
157
+ return true;
158
+ }
159
+
160
+ warn("better-icons not found (only required for /reelstack-icons).");
161
+ const yes = await askYesNo("Run `npm install -g better-icons`?");
162
+ if (!yes) {
163
+ warn("Skipped. /reelstack-icons will be unavailable until you install better-icons globally.");
164
+ saveState({ betterIcons: "missing" });
165
+ return false;
166
+ }
167
+
168
+ let result;
169
+ try {
170
+ result = spawnSync("npm", ["install", "-g", "better-icons"], { stdio: "inherit" });
171
+ } catch (err) {
172
+ warn(`Failed to spawn npm: ${err.message}. /reelstack-icons will be unavailable.`);
173
+ saveState({ betterIcons: "missing" });
174
+ return false;
175
+ }
176
+ if (result.error) {
177
+ // ENOENT here means npm itself isn't on PATH.
178
+ warn(`npm not available (${result.error.code || result.error.message}). Install Node.js + npm, then re-run \`reelstack init\`. /reelstack-icons will be unavailable.`);
179
+ saveState({ betterIcons: "missing" });
180
+ return false;
181
+ }
182
+ if (result.status !== 0) {
183
+ warn(`better-icons install exited non-zero (status ${result.status}). /reelstack-icons will be unavailable.`);
184
+ saveState({ betterIcons: "missing" });
185
+ return false;
186
+ }
187
+ if (!which("better-icons")) {
188
+ warn("better-icons install completed but binary not on PATH. /reelstack-icons will be unavailable.");
189
+ saveState({ betterIcons: "missing" });
190
+ return false;
191
+ }
192
+ success("better-icons installed");
193
+ saveState({ betterIcons: "ok" });
194
+ return true;
195
+ }
196
+
197
+ function installCompanionSkills() {
198
+ const companionsDir = path.join(REELSTACK_PKG, "skill", "companions");
199
+ if (!fs.existsSync(companionsDir)) return { installed: [], skipped: [] };
200
+
201
+ const installed = [];
202
+ const skipped = [];
203
+ for (const entry of fs.readdirSync(companionsDir, { withFileTypes: true })) {
204
+ if (!entry.isDirectory()) continue;
205
+ const src = path.join(companionsDir, entry.name);
206
+ const dst = path.join(CLAUDE_SKILLS_HOME, entry.name);
207
+ if (fs.existsSync(dst)) {
208
+ skipped.push(entry.name);
209
+ continue;
210
+ }
211
+ copyTree(src, dst);
212
+ installed.push(entry.name);
213
+ }
214
+ return { installed, skipped };
215
+ }
216
+
217
+ function printStatusTable({ tier3, betterIconsOk, companionResult }) {
218
+ const pad = (label) => label.padEnd(28);
219
+ const ok = (label, detail) => ` ${c.green("✓")} ${pad(label)} ${c.gray(detail || "")}`;
220
+ const warnRow = (label, detail) => ` ${c.yellow("⚠")} ${pad(label)} ${c.gray(detail || "")}`;
221
+ const failRow = (label, detail) => ` ${c.red("✗")} ${pad(label)} ${c.gray(detail || "")}`;
222
+
223
+ const rows = [];
224
+ rows.push(ok("Node", `v${process.versions.node}`));
225
+ rows.push(ok("ReelStack runtime", REELSTACK_HOME));
226
+ rows.push(ok("Claude skill", path.join(CLAUDE_SKILLS_HOME, "reelstack")));
227
+ rows.push(ok("Slash commands", CLAUDE_COMMANDS_HOME));
228
+
229
+ if (tier3.skipped) {
230
+ rows.push(warnRow("Remotion project", "skipped — scaffold one to unlock /reelstack-*"));
231
+ rows.push(warnRow("@devinilabs/reelstack dep", "n/a (no project)"));
232
+ } else {
233
+ rows.push(ok("Remotion project", tier3.projectDir));
234
+ rows.push(ok("@devinilabs/reelstack dep", "installed"));
235
+ }
236
+
237
+ const ffmpegPath = which("ffmpeg");
238
+ rows.push(ffmpegPath ? ok("ffmpeg", ffmpegPath) : failRow("ffmpeg", "missing"));
239
+
240
+ const whisperPath = which("whisper-cli") || which("whisper-cpp");
241
+ rows.push(whisperPath ? ok("whisper-cli", whisperPath) : warnRow("whisper-cli", "missing — /reelstack-beats unavailable"));
242
+
243
+ const biPath = which("better-icons");
244
+ rows.push(betterIconsOk && biPath
245
+ ? ok("better-icons", biPath)
246
+ : warnRow("better-icons", "missing — /reelstack-icons unavailable"));
247
+
248
+ const companionLabel = companionResult.installed.length > 0
249
+ ? `${companionResult.installed.length} installed (${companionResult.installed.join(", ")})`
250
+ : `0 new (${companionResult.skipped.length} already present: ${companionResult.skipped.join(", ") || "—"})`;
251
+ rows.push(ok("Companion skills", companionLabel));
252
+
253
+ console.log("");
254
+ console.log(c.bold(" ReelStack status"));
255
+ console.log("");
256
+ for (const row of rows) console.log(row);
257
+ console.log("");
258
+ }
259
+
152
260
  async function run(argv) {
153
261
  const flags = parseFlags(argv || []);
154
262
  banner();
@@ -170,6 +278,7 @@ async function run(argv) {
170
278
  // 3. Tier 2 — System binaries (exits on ffmpeg miss + decline)
171
279
  await ensureFfmpeg();
172
280
  await ensureWhisper();
281
+ const betterIconsOk = await ensureBetterIcons();
173
282
 
174
283
  // 4. Install ~/.reelstack runtime (preserved from original init)
175
284
  console.log("");
@@ -199,6 +308,18 @@ async function run(argv) {
199
308
  }
200
309
  success(`${cmdFiles.length} slash commands installed.`);
201
310
 
311
+ // 5b. Companion skills (gsap-core, gsap-timeline, reel-capture)
312
+ // Bundled with ReelStack so /reelstack-* commands work out of the box.
313
+ // Skip individual skills if the buyer already has them installed at the
314
+ // destination (preserves symlinks / personal customizations).
315
+ const companionResult = installCompanionSkills();
316
+ if (companionResult.installed.length > 0) {
317
+ success(`${companionResult.installed.length} companion skill(s) installed: ${companionResult.installed.join(", ")}.`);
318
+ }
319
+ if (companionResult.skipped.length > 0) {
320
+ info(`${companionResult.skipped.length} companion skill(s) already present, skipped: ${companionResult.skipped.join(", ")}.`);
321
+ }
322
+
202
323
  // 6. Tier 3 — Remotion project bootstrap
203
324
  console.log("");
204
325
  const tier3 = await bootstrap.run({
@@ -226,7 +347,10 @@ async function run(argv) {
226
347
 
227
348
  saveState({ lastInitAt: new Date().toISOString() });
228
349
 
229
- // 8. Success banner
350
+ // 8. Status table — single pre-exit summary of everything detected/installed.
351
+ printStatusTable({ tier3, betterIconsOk, companionResult });
352
+
353
+ // 9. Success banner
230
354
  console.log("");
231
355
  if (tier3.skipped) {
232
356
  success("ReelStack CLI installed. Bootstrap a Remotion project to unlock /reelstack-* commands.");