@vibeframe/cli 0.87.0 → 0.89.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/dist/index.js +326 -72
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -26435,6 +26435,45 @@ var init_scene_project = __esm({
|
|
|
26435
26435
|
}
|
|
26436
26436
|
});
|
|
26437
26437
|
|
|
26438
|
+
// src/commands/_shared/cost-tier.ts
|
|
26439
|
+
function applyTier(cmd, tier) {
|
|
26440
|
+
cmd[COST_TIER_KEY] = tier;
|
|
26441
|
+
const colored = TIER_COLOR[tier](`Cost: ${tier} (${TIER_DESCRIPTION[tier]})`);
|
|
26442
|
+
cmd.addHelpText("after", `
|
|
26443
|
+
${colored}
|
|
26444
|
+
`);
|
|
26445
|
+
return cmd;
|
|
26446
|
+
}
|
|
26447
|
+
function getCostTier(cmd) {
|
|
26448
|
+
return cmd[COST_TIER_KEY];
|
|
26449
|
+
}
|
|
26450
|
+
function applyTiers(parent, tiers) {
|
|
26451
|
+
for (const cmd of parent.commands) {
|
|
26452
|
+
const tier = tiers[cmd.name()];
|
|
26453
|
+
if (tier) applyTier(cmd, tier);
|
|
26454
|
+
}
|
|
26455
|
+
}
|
|
26456
|
+
var TIER_DESCRIPTION, TIER_COLOR, COST_TIER_KEY;
|
|
26457
|
+
var init_cost_tier = __esm({
|
|
26458
|
+
"src/commands/_shared/cost-tier.ts"() {
|
|
26459
|
+
"use strict";
|
|
26460
|
+
init_source();
|
|
26461
|
+
TIER_DESCRIPTION = {
|
|
26462
|
+
"free": "FFmpeg only, no API call",
|
|
26463
|
+
"low": "$0.01\u2013$0.10 per call",
|
|
26464
|
+
"high": "$1\u2013$5 per call",
|
|
26465
|
+
"very-high": "$5\u2013$50+ per call"
|
|
26466
|
+
};
|
|
26467
|
+
TIER_COLOR = {
|
|
26468
|
+
"free": source_default.green,
|
|
26469
|
+
"low": source_default.cyan,
|
|
26470
|
+
"high": source_default.yellow,
|
|
26471
|
+
"very-high": source_default.red
|
|
26472
|
+
};
|
|
26473
|
+
COST_TIER_KEY = Symbol.for("@vibeframe/cli.costTier");
|
|
26474
|
+
}
|
|
26475
|
+
});
|
|
26476
|
+
|
|
26438
26477
|
// src/commands/_shared/visual-styles.ts
|
|
26439
26478
|
function listVisualStyles() {
|
|
26440
26479
|
return STYLES;
|
|
@@ -29468,6 +29507,7 @@ var init_scene = __esm({
|
|
|
29468
29507
|
init_dist2();
|
|
29469
29508
|
init_tts_resolve();
|
|
29470
29509
|
init_scene_project();
|
|
29510
|
+
init_cost_tier();
|
|
29471
29511
|
init_visual_styles();
|
|
29472
29512
|
init_scene_html_emit();
|
|
29473
29513
|
init_scene_lint();
|
|
@@ -29833,6 +29873,13 @@ Run 'vibe schema scene.<command>' for structured parameter info.`);
|
|
|
29833
29873
|
}
|
|
29834
29874
|
if (!result.ok) process.exitCode = 1;
|
|
29835
29875
|
});
|
|
29876
|
+
applyTiers(sceneCommand, {
|
|
29877
|
+
"add": "free",
|
|
29878
|
+
"compose-prompts": "free",
|
|
29879
|
+
"install-skill": "free",
|
|
29880
|
+
"lint": "free",
|
|
29881
|
+
"list-styles": "free"
|
|
29882
|
+
});
|
|
29836
29883
|
}
|
|
29837
29884
|
});
|
|
29838
29885
|
|
|
@@ -35862,45 +35909,6 @@ var init_video = __esm({
|
|
|
35862
35909
|
}
|
|
35863
35910
|
});
|
|
35864
35911
|
|
|
35865
|
-
// src/commands/_shared/cost-tier.ts
|
|
35866
|
-
function applyTier(cmd, tier) {
|
|
35867
|
-
cmd[COST_TIER_KEY] = tier;
|
|
35868
|
-
const colored = TIER_COLOR[tier](`Cost: ${tier} (${TIER_DESCRIPTION[tier]})`);
|
|
35869
|
-
cmd.addHelpText("after", `
|
|
35870
|
-
${colored}
|
|
35871
|
-
`);
|
|
35872
|
-
return cmd;
|
|
35873
|
-
}
|
|
35874
|
-
function getCostTier(cmd) {
|
|
35875
|
-
return cmd[COST_TIER_KEY];
|
|
35876
|
-
}
|
|
35877
|
-
function applyTiers(parent, tiers) {
|
|
35878
|
-
for (const cmd of parent.commands) {
|
|
35879
|
-
const tier = tiers[cmd.name()];
|
|
35880
|
-
if (tier) applyTier(cmd, tier);
|
|
35881
|
-
}
|
|
35882
|
-
}
|
|
35883
|
-
var TIER_DESCRIPTION, TIER_COLOR, COST_TIER_KEY;
|
|
35884
|
-
var init_cost_tier = __esm({
|
|
35885
|
-
"src/commands/_shared/cost-tier.ts"() {
|
|
35886
|
-
"use strict";
|
|
35887
|
-
init_source();
|
|
35888
|
-
TIER_DESCRIPTION = {
|
|
35889
|
-
"free": "FFmpeg only, no API call",
|
|
35890
|
-
"low": "$0.01\u2013$0.10 per call",
|
|
35891
|
-
"high": "$1\u2013$5 per call",
|
|
35892
|
-
"very-high": "$5\u2013$50+ per call"
|
|
35893
|
-
};
|
|
35894
|
-
TIER_COLOR = {
|
|
35895
|
-
"free": source_default.green,
|
|
35896
|
-
"low": source_default.cyan,
|
|
35897
|
-
"high": source_default.yellow,
|
|
35898
|
-
"very-high": source_default.red
|
|
35899
|
-
};
|
|
35900
|
-
COST_TIER_KEY = Symbol.for("@vibeframe/cli.costTier");
|
|
35901
|
-
}
|
|
35902
|
-
});
|
|
35903
|
-
|
|
35904
35912
|
// src/commands/generate.ts
|
|
35905
35913
|
var generate_exports = {};
|
|
35906
35914
|
__export(generate_exports, {
|
|
@@ -62837,7 +62845,7 @@ init_source();
|
|
|
62837
62845
|
// package.json
|
|
62838
62846
|
var package_default = {
|
|
62839
62847
|
name: "@vibeframe/cli",
|
|
62840
|
-
version: "0.
|
|
62848
|
+
version: "0.89.0",
|
|
62841
62849
|
description: "VibeFrame CLI - natural language video editing from the terminal",
|
|
62842
62850
|
private: false,
|
|
62843
62851
|
license: "MIT",
|
|
@@ -63277,6 +63285,7 @@ init_ora();
|
|
|
63277
63285
|
init_engine();
|
|
63278
63286
|
init_validate();
|
|
63279
63287
|
init_output();
|
|
63288
|
+
init_cost_tier();
|
|
63280
63289
|
init_project_resolver();
|
|
63281
63290
|
import { readFile as readFile9, writeFile as writeFile9 } from "node:fs/promises";
|
|
63282
63291
|
import { existsSync as existsSync8 } from "node:fs";
|
|
@@ -63987,6 +63996,21 @@ function detectMediaType(path2) {
|
|
|
63987
63996
|
if (ext === ".lottie") return "lottie";
|
|
63988
63997
|
return "video";
|
|
63989
63998
|
}
|
|
63999
|
+
applyTiers(timelineCommand, {
|
|
64000
|
+
"create": "free",
|
|
64001
|
+
"info": "free",
|
|
64002
|
+
"set": "free",
|
|
64003
|
+
"list": "free",
|
|
64004
|
+
"add-source": "free",
|
|
64005
|
+
"add-clip": "free",
|
|
64006
|
+
"add-track": "free",
|
|
64007
|
+
"add-effect": "free",
|
|
64008
|
+
"trim-clip": "free",
|
|
64009
|
+
"split-clip": "free",
|
|
64010
|
+
"duplicate-clip": "free",
|
|
64011
|
+
"delete-clip": "free",
|
|
64012
|
+
"move-clip": "free"
|
|
64013
|
+
});
|
|
63990
64014
|
|
|
63991
64015
|
// src/index.ts
|
|
63992
64016
|
init_generate();
|
|
@@ -69218,6 +69242,7 @@ async function parseFile(filePath, options = {}) {
|
|
|
69218
69242
|
|
|
69219
69243
|
// src/commands/media.ts
|
|
69220
69244
|
init_output();
|
|
69245
|
+
init_cost_tier();
|
|
69221
69246
|
var mediaCommand = new Command("media").description("Media file utilities");
|
|
69222
69247
|
mediaCommand.command("info").description("Get media file information").argument("<file>", "Media file path").action(async (file) => {
|
|
69223
69248
|
const spinner2 = ora("Analyzing media...").start();
|
|
@@ -69352,6 +69377,10 @@ function formatBitrate(bps) {
|
|
|
69352
69377
|
}
|
|
69353
69378
|
return `${(bps / 1e3).toFixed(0)} kbps`;
|
|
69354
69379
|
}
|
|
69380
|
+
applyTiers(mediaCommand, {
|
|
69381
|
+
"info": "free",
|
|
69382
|
+
"duration": "free"
|
|
69383
|
+
});
|
|
69355
69384
|
|
|
69356
69385
|
// src/commands/batch.ts
|
|
69357
69386
|
init_esm();
|
|
@@ -69359,6 +69388,7 @@ init_source();
|
|
|
69359
69388
|
init_ora();
|
|
69360
69389
|
init_engine();
|
|
69361
69390
|
init_output();
|
|
69391
|
+
init_cost_tier();
|
|
69362
69392
|
import { readFile as readFile27, writeFile as writeFile35, readdir as readdir2 } from "node:fs/promises";
|
|
69363
69393
|
import { resolve as resolve40, basename as basename13, extname as extname10, join as join10 } from "node:path";
|
|
69364
69394
|
var batchCommand = new Command("batch").description("Batch operations for processing multiple items");
|
|
@@ -69721,6 +69751,13 @@ batchCommand.command("info").description("Show batch processing statistics").arg
|
|
|
69721
69751
|
exitWithError(generalError(`Failed to load project: ${msg}`));
|
|
69722
69752
|
}
|
|
69723
69753
|
});
|
|
69754
|
+
applyTiers(batchCommand, {
|
|
69755
|
+
"import": "free",
|
|
69756
|
+
"concat": "free",
|
|
69757
|
+
"apply-effect": "free",
|
|
69758
|
+
"remove-clips": "free",
|
|
69759
|
+
"info": "free"
|
|
69760
|
+
});
|
|
69724
69761
|
|
|
69725
69762
|
// src/index.ts
|
|
69726
69763
|
init_detect();
|
|
@@ -70243,6 +70280,12 @@ async function showComplete(config2, defaultTryCommand, features = []) {
|
|
|
70243
70280
|
console.log(source_default.dim(" vibe doctor Check system health + available commands"));
|
|
70244
70281
|
console.log(source_default.dim(" vibe schema --list Discover every command"));
|
|
70245
70282
|
console.log(source_default.dim(" vibe setup Re-run user-scope setup anytime"));
|
|
70283
|
+
const shellHint = pickCompletionHint(process.env.SHELL);
|
|
70284
|
+
if (shellHint) {
|
|
70285
|
+
console.log();
|
|
70286
|
+
console.log(source_default.bold(" Tab completion:"));
|
|
70287
|
+
console.log(source_default.dim(` ${shellHint}`));
|
|
70288
|
+
}
|
|
70246
70289
|
const hosts = detectedAgentHosts();
|
|
70247
70290
|
const primary = hosts[0];
|
|
70248
70291
|
if (primary) {
|
|
@@ -70377,6 +70420,20 @@ async function showConfig(opts = { verbose: false }) {
|
|
|
70377
70420
|
console.log();
|
|
70378
70421
|
}
|
|
70379
70422
|
}
|
|
70423
|
+
function pickCompletionHint(shellPath) {
|
|
70424
|
+
if (!shellPath) return void 0;
|
|
70425
|
+
const shell = shellPath.split("/").pop() ?? "";
|
|
70426
|
+
if (shell.includes("zsh")) {
|
|
70427
|
+
return `echo 'eval "$(vibe completion zsh)"' >> ~/.zshrc`;
|
|
70428
|
+
}
|
|
70429
|
+
if (shell.includes("bash")) {
|
|
70430
|
+
return `echo 'eval "$(vibe completion bash)"' >> ~/.bashrc`;
|
|
70431
|
+
}
|
|
70432
|
+
if (shell.includes("fish")) {
|
|
70433
|
+
return `vibe completion fish > ~/.config/fish/completions/vibe.fish`;
|
|
70434
|
+
}
|
|
70435
|
+
return void 0;
|
|
70436
|
+
}
|
|
70380
70437
|
|
|
70381
70438
|
// src/commands/init.ts
|
|
70382
70439
|
init_esm();
|
|
@@ -71664,24 +71721,28 @@ function printReport(results, opts = { verbose: false }) {
|
|
|
71664
71721
|
console.log();
|
|
71665
71722
|
const pct = Math.round(results.readyCount / results.totalCount * 100);
|
|
71666
71723
|
const readyColor = pct >= 80 ? source_default.green : pct >= 40 ? source_default.yellow : source_default.red;
|
|
71724
|
+
let catalogTotal = 0;
|
|
71725
|
+
let tierCounts = { "free": 0, "low": 0, "high": 0, "very-high": 0 };
|
|
71726
|
+
if (program3) {
|
|
71727
|
+
catalogTotal = countCatalog(program3);
|
|
71728
|
+
tierCounts = countCostTiers(program3);
|
|
71729
|
+
}
|
|
71730
|
+
const taggedTotal = tierCounts.free + tierCounts.low + tierCounts.high + tierCounts["very-high"];
|
|
71731
|
+
console.log(source_default.bold(" Catalog"));
|
|
71732
|
+
if (catalogTotal > 0) {
|
|
71733
|
+
console.log(` Total commands ${source_default.bold(catalogTotal)} ${source_default.dim("(see: vibe schema --list)")}`);
|
|
71734
|
+
}
|
|
71667
71735
|
console.log(
|
|
71668
|
-
`
|
|
71669
|
-
);
|
|
71670
|
-
console.log(
|
|
71671
|
-
source_default.dim(` Full command catalog: vibe schema --list`)
|
|
71736
|
+
` Runnable with keys ${readyColor(`${results.readyCount}/${results.totalCount}`)} ${source_default.dim(`(${pct}%)`)}`
|
|
71672
71737
|
);
|
|
71673
|
-
if (
|
|
71674
|
-
const
|
|
71675
|
-
|
|
71676
|
-
|
|
71677
|
-
|
|
71678
|
-
|
|
71679
|
-
|
|
71680
|
-
|
|
71681
|
-
`${TIER_COLOR["very-high"](`${tierCounts["very-high"]} very-high`)}`
|
|
71682
|
-
];
|
|
71683
|
-
console.log(source_default.dim(` Cost mix:`) + ` ${parts.join(source_default.dim(", "))}`);
|
|
71684
|
-
}
|
|
71738
|
+
if (taggedTotal > 0) {
|
|
71739
|
+
const parts = [
|
|
71740
|
+
`${TIER_COLOR.free(`${tierCounts.free} free`)}`,
|
|
71741
|
+
`${TIER_COLOR.low(`${tierCounts.low} low`)}`,
|
|
71742
|
+
`${TIER_COLOR.high(`${tierCounts.high} high`)}`,
|
|
71743
|
+
`${TIER_COLOR["very-high"](`${tierCounts["very-high"]} very-high`)}`
|
|
71744
|
+
];
|
|
71745
|
+
console.log(` Cost-tagged ${source_default.bold(taggedTotal)} ${parts.join(source_default.dim(", "))}`);
|
|
71685
71746
|
}
|
|
71686
71747
|
const nextStep = pickNextStep(results, missing.length > 0);
|
|
71687
71748
|
if (nextStep) {
|
|
@@ -71689,6 +71750,26 @@ function printReport(results, opts = { verbose: false }) {
|
|
|
71689
71750
|
}
|
|
71690
71751
|
console.log();
|
|
71691
71752
|
}
|
|
71753
|
+
function countCatalog(program3) {
|
|
71754
|
+
let count = 0;
|
|
71755
|
+
const skipTopLevel = /* @__PURE__ */ new Set(["help", "schema"]);
|
|
71756
|
+
for (const top of program3.commands) {
|
|
71757
|
+
if (skipTopLevel.has(top.name())) continue;
|
|
71758
|
+
const subCmds = top.commands;
|
|
71759
|
+
if (subCmds.length === 0) {
|
|
71760
|
+
const desc = top.description() || "";
|
|
71761
|
+
if (desc.toLowerCase().includes("deprecated")) continue;
|
|
71762
|
+
count++;
|
|
71763
|
+
continue;
|
|
71764
|
+
}
|
|
71765
|
+
for (const sub of subCmds) {
|
|
71766
|
+
const desc = sub.description() || "";
|
|
71767
|
+
if (desc.toLowerCase().includes("deprecated")) continue;
|
|
71768
|
+
count++;
|
|
71769
|
+
}
|
|
71770
|
+
}
|
|
71771
|
+
return count;
|
|
71772
|
+
}
|
|
71692
71773
|
function countCostTiers(program3) {
|
|
71693
71774
|
const counts = {
|
|
71694
71775
|
"free": 0,
|
|
@@ -72771,7 +72852,14 @@ async function promptConfirm2(toolName, args, cost) {
|
|
|
72771
72852
|
"high": source_default.yellow,
|
|
72772
72853
|
"very-high": source_default.red
|
|
72773
72854
|
};
|
|
72774
|
-
const
|
|
72855
|
+
const tierUsd = {
|
|
72856
|
+
"free": "$0",
|
|
72857
|
+
"low": "~$0.05",
|
|
72858
|
+
"medium": "~$0.50",
|
|
72859
|
+
"high": "~$3",
|
|
72860
|
+
"very-high": "~$25"
|
|
72861
|
+
};
|
|
72862
|
+
const costBadge = cost ? ` ${tierColor[cost](`[${cost.toUpperCase()} ${tierUsd[cost]}]`)}` : "";
|
|
72775
72863
|
console.log();
|
|
72776
72864
|
console.log(source_default.yellow(`Execute ${source_default.bold(toolName)}?${costBadge}`));
|
|
72777
72865
|
console.log(source_default.dim(argsStr));
|
|
@@ -72988,7 +73076,7 @@ async function startAgent(options = {}) {
|
|
|
72988
73076
|
rl.prompt();
|
|
72989
73077
|
});
|
|
72990
73078
|
}
|
|
72991
|
-
var agentCommand = new Command("agent").description("Start the AI agent with natural language interface").option("-p, --provider <provider>", "LLM provider (openai, claude, gemini, ollama, xai, openrouter)", "openai").option("-m, --model <model>", "Model to use (provider-specific)").option("--project <path>", "Timeline file or directory to load").option("-v, --verbose", "Show verbose output including tool calls").option("--max-turns <n>", "Maximum turns per request", "10").option("-i, --input <query>", "Run a single query and exit (non-interactive)").option("-c, --confirm", "Confirm before
|
|
73079
|
+
var agentCommand = new Command("agent").description("Start the AI agent with natural language interface").option("-p, --provider <provider>", "LLM provider (openai, claude, gemini, ollama, xai, openrouter)", "openai").option("-m, --model <model>", "Model to use (provider-specific)").option("--project <path>", "Timeline file or directory to load").option("-v, --verbose", "Show verbose output including tool calls").option("--max-turns <n>", "Maximum turns per request", "10").option("-i, --input <query>", "Run a single query and exit (non-interactive)").option("-c, --confirm", "Confirm before every tool \u2014 broadens the default cost gate (paid only) to all calls").option("--no-confirm", "Disable all confirm prompts including the high/very-high cost gate (CI / automation)").option("--budget-usd <usd>", "Reject tool calls past this cumulative USD ceiling (tier-estimated, conservative)").action(async (options) => {
|
|
72992
73080
|
await startAgent(options);
|
|
72993
73081
|
});
|
|
72994
73082
|
function getEnvVar(provider) {
|
|
@@ -73078,6 +73166,162 @@ var walkthroughCommand = new Command("walkthrough").description("Step-by-step au
|
|
|
73078
73166
|
console.log();
|
|
73079
73167
|
});
|
|
73080
73168
|
|
|
73169
|
+
// src/commands/completion.ts
|
|
73170
|
+
init_esm();
|
|
73171
|
+
init_output();
|
|
73172
|
+
init_cost_tier();
|
|
73173
|
+
var completionCommand = new Command("completion").description("Print a shell completion script for `vibe`").argument("<shell>", "Target shell: zsh | bash | fish").addHelpText(
|
|
73174
|
+
"after",
|
|
73175
|
+
`
|
|
73176
|
+
Examples:
|
|
73177
|
+
$ vibe completion zsh >> ~/.zsh/completions/_vibe # then ensure that dir is in fpath
|
|
73178
|
+
$ echo 'eval "$(vibe completion bash)"' >> ~/.bashrc
|
|
73179
|
+
$ vibe completion fish > ~/.config/fish/completions/vibe.fish
|
|
73180
|
+
|
|
73181
|
+
The output is generated from the live command tree, so it stays in
|
|
73182
|
+
sync with the CLI surface. Re-run after upgrades.
|
|
73183
|
+
`
|
|
73184
|
+
).action((shell) => {
|
|
73185
|
+
const program3 = completionCommand.parent;
|
|
73186
|
+
if (!program3) {
|
|
73187
|
+
exitWithError(usageError("completion: program tree not available"));
|
|
73188
|
+
}
|
|
73189
|
+
const valid = /* @__PURE__ */ new Set(["zsh", "bash", "fish"]);
|
|
73190
|
+
if (!valid.has(shell)) {
|
|
73191
|
+
exitWithError(usageError(`Unknown shell: ${shell}`, "Supported: zsh, bash, fish"));
|
|
73192
|
+
}
|
|
73193
|
+
if (shell === "zsh") console.log(generateZsh(program3));
|
|
73194
|
+
else if (shell === "bash") console.log(generateBash(program3));
|
|
73195
|
+
else console.log(generateFish(program3));
|
|
73196
|
+
});
|
|
73197
|
+
function collectCommandTree(program3) {
|
|
73198
|
+
const skipTopLevel = /* @__PURE__ */ new Set(["help"]);
|
|
73199
|
+
const nodes = [];
|
|
73200
|
+
for (const top of program3.commands) {
|
|
73201
|
+
const name = top.name();
|
|
73202
|
+
if (skipTopLevel.has(name)) continue;
|
|
73203
|
+
const desc = top.description() || "";
|
|
73204
|
+
if (desc.toLowerCase().includes("deprecated")) continue;
|
|
73205
|
+
const subs = top.commands.filter((s) => !(s.description() || "").toLowerCase().includes("deprecated")).map((s) => ({
|
|
73206
|
+
name: s.name(),
|
|
73207
|
+
description: s.description() || "",
|
|
73208
|
+
cost: getCostTier(s)
|
|
73209
|
+
}));
|
|
73210
|
+
nodes.push({ name, description: desc, cost: getCostTier(top), subcommands: subs });
|
|
73211
|
+
}
|
|
73212
|
+
return nodes;
|
|
73213
|
+
}
|
|
73214
|
+
function tierBadge(cost) {
|
|
73215
|
+
if (!cost) return "";
|
|
73216
|
+
return `[${cost.toUpperCase()}] `;
|
|
73217
|
+
}
|
|
73218
|
+
function shellEscape(s) {
|
|
73219
|
+
return s.replace(/\n/g, " ").replace(/\s+/g, " ").trim().replace(/'/g, `'"'"'`);
|
|
73220
|
+
}
|
|
73221
|
+
function generateZsh(program3) {
|
|
73222
|
+
const nodes = collectCommandTree(program3);
|
|
73223
|
+
const topLines = nodes.map((n) => `'${n.name}:${shellEscape(tierBadge(n.cost) + n.description)}'`).join(" \\\n ");
|
|
73224
|
+
const subBlocks = nodes.filter((n) => n.subcommands.length > 0).map((n) => {
|
|
73225
|
+
const subs = n.subcommands.map((s) => `'${s.name}:${shellEscape(tierBadge(s.cost) + s.description)}'`).join(" \\\n ");
|
|
73226
|
+
return ` ${n.name})
|
|
73227
|
+
local -a subcommands
|
|
73228
|
+
subcommands=(
|
|
73229
|
+
${subs}
|
|
73230
|
+
)
|
|
73231
|
+
_describe 'subcommand' subcommands
|
|
73232
|
+
;;`;
|
|
73233
|
+
}).join("\n");
|
|
73234
|
+
return `#compdef vibe
|
|
73235
|
+
# vibe shell completion for zsh \u2014 generated by \`vibe completion zsh\`.
|
|
73236
|
+
# Re-run after upgrades; the script reflects the live command tree.
|
|
73237
|
+
|
|
73238
|
+
_vibe() {
|
|
73239
|
+
local -a commands
|
|
73240
|
+
commands=(
|
|
73241
|
+
${topLines}
|
|
73242
|
+
)
|
|
73243
|
+
|
|
73244
|
+
_arguments -C \\
|
|
73245
|
+
'1: :->cmd' \\
|
|
73246
|
+
'*:: :->args'
|
|
73247
|
+
|
|
73248
|
+
case $state in
|
|
73249
|
+
cmd)
|
|
73250
|
+
_describe 'command' commands
|
|
73251
|
+
;;
|
|
73252
|
+
args)
|
|
73253
|
+
case $words[1] in
|
|
73254
|
+
${subBlocks}
|
|
73255
|
+
esac
|
|
73256
|
+
;;
|
|
73257
|
+
esac
|
|
73258
|
+
}
|
|
73259
|
+
|
|
73260
|
+
_vibe "$@"
|
|
73261
|
+
`;
|
|
73262
|
+
}
|
|
73263
|
+
function generateBash(program3) {
|
|
73264
|
+
const nodes = collectCommandTree(program3);
|
|
73265
|
+
const topNames = nodes.map((n) => n.name).join(" ");
|
|
73266
|
+
const subCases = nodes.filter((n) => n.subcommands.length > 0).map((n) => {
|
|
73267
|
+
const names = n.subcommands.map((s) => s.name).join(" ");
|
|
73268
|
+
return ` ${n.name})
|
|
73269
|
+
COMPREPLY=( $(compgen -W "${names}" -- "$cur") )
|
|
73270
|
+
;;`;
|
|
73271
|
+
}).join("\n");
|
|
73272
|
+
return `# vibe shell completion for bash \u2014 generated by \`vibe completion bash\`.
|
|
73273
|
+
# Re-run after upgrades; the script reflects the live command tree.
|
|
73274
|
+
# Bash completions are word-only \u2014 no description hints \u2014 so consider
|
|
73275
|
+
# zsh or fish for richer feedback.
|
|
73276
|
+
|
|
73277
|
+
_vibe_complete() {
|
|
73278
|
+
local cur prev cmd
|
|
73279
|
+
cur="\${COMP_WORDS[COMP_CWORD]}"
|
|
73280
|
+
prev="\${COMP_WORDS[COMP_CWORD-1]}"
|
|
73281
|
+
cmd="\${COMP_WORDS[1]}"
|
|
73282
|
+
|
|
73283
|
+
if [[ $COMP_CWORD == 1 ]]; then
|
|
73284
|
+
COMPREPLY=( $(compgen -W "${topNames}" -- "$cur") )
|
|
73285
|
+
return 0
|
|
73286
|
+
fi
|
|
73287
|
+
|
|
73288
|
+
case "$cmd" in
|
|
73289
|
+
${subCases}
|
|
73290
|
+
*)
|
|
73291
|
+
COMPREPLY=()
|
|
73292
|
+
;;
|
|
73293
|
+
esac
|
|
73294
|
+
}
|
|
73295
|
+
|
|
73296
|
+
complete -F _vibe_complete vibe
|
|
73297
|
+
`;
|
|
73298
|
+
}
|
|
73299
|
+
function generateFish(program3) {
|
|
73300
|
+
const nodes = collectCommandTree(program3);
|
|
73301
|
+
const lines = [
|
|
73302
|
+
"# vibe shell completion for fish \u2014 generated by `vibe completion fish`.",
|
|
73303
|
+
"# Re-run after upgrades; the script reflects the live command tree.",
|
|
73304
|
+
"",
|
|
73305
|
+
"complete -c vibe -f",
|
|
73306
|
+
""
|
|
73307
|
+
];
|
|
73308
|
+
for (const n of nodes) {
|
|
73309
|
+
const desc = shellEscape(tierBadge(n.cost) + n.description);
|
|
73310
|
+
lines.push(`complete -c vibe -n '__fish_use_subcommand' -a '${n.name}' -d '${desc}'`);
|
|
73311
|
+
}
|
|
73312
|
+
lines.push("");
|
|
73313
|
+
for (const n of nodes) {
|
|
73314
|
+
if (n.subcommands.length === 0) continue;
|
|
73315
|
+
for (const s of n.subcommands) {
|
|
73316
|
+
const desc = shellEscape(tierBadge(s.cost) + s.description);
|
|
73317
|
+
lines.push(
|
|
73318
|
+
`complete -c vibe -n '__fish_seen_subcommand_from ${n.name}' -a '${s.name}' -d '${desc}'`
|
|
73319
|
+
);
|
|
73320
|
+
}
|
|
73321
|
+
}
|
|
73322
|
+
return lines.join("\n") + "\n";
|
|
73323
|
+
}
|
|
73324
|
+
|
|
73081
73325
|
// src/index.ts
|
|
73082
73326
|
init_api_key();
|
|
73083
73327
|
|
|
@@ -73154,10 +73398,29 @@ function rejectControlChars2(value, fieldName = "input") {
|
|
|
73154
73398
|
}
|
|
73155
73399
|
|
|
73156
73400
|
// src/index.ts
|
|
73401
|
+
init_cost_tier();
|
|
73157
73402
|
init_config();
|
|
73158
73403
|
if (process.env.VIBE_DEBUG === "1") {
|
|
73159
73404
|
console.log("[CLI] Script started, loading modules...");
|
|
73160
73405
|
}
|
|
73406
|
+
function renderCostTierFooter(prog) {
|
|
73407
|
+
const buckets = { free: [], low: [], high: [], "very-high": [] };
|
|
73408
|
+
const walk = (cmd, prefix) => {
|
|
73409
|
+
const tier = getCostTier(cmd);
|
|
73410
|
+
if (tier) buckets[tier].push(prefix ? `${prefix}.${cmd.name()}` : cmd.name());
|
|
73411
|
+
for (const child of cmd.commands) walk(child, prefix ? `${prefix}.${cmd.name()}` : cmd.name());
|
|
73412
|
+
};
|
|
73413
|
+
for (const top of prog.commands) walk(top, "");
|
|
73414
|
+
const order = ["free", "low", "high", "very-high"];
|
|
73415
|
+
const lines = ["Cost tiers (`vibe --describe <cmd>` for the per-command tag):"];
|
|
73416
|
+
for (const tier of order) {
|
|
73417
|
+
const examples = buckets[tier].slice(0, 3).join(", ");
|
|
73418
|
+
if (!examples) continue;
|
|
73419
|
+
const label = tier === "very-high" ? "V.High" : tier[0].toUpperCase() + tier.slice(1);
|
|
73420
|
+
lines.push(` ${label.padEnd(7)}${examples.padEnd(50)} ${TIER_DESCRIPTION[tier]}`);
|
|
73421
|
+
}
|
|
73422
|
+
return "\n" + lines.join("\n") + "\n";
|
|
73423
|
+
}
|
|
73161
73424
|
async function readStdin() {
|
|
73162
73425
|
const chunks = [];
|
|
73163
73426
|
for await (const chunk of process.stdin) {
|
|
@@ -73197,10 +73460,6 @@ this section shows the typical entry points by use case):
|
|
|
73197
73460
|
vibe inspect media clip.mp4 "Summarize this"
|
|
73198
73461
|
vibe remix highlights long.mp4 -d 60
|
|
73199
73462
|
|
|
73200
|
-
Authoring:
|
|
73201
|
-
vibe timeline create my-video Low-level timeline JSON
|
|
73202
|
-
vibe scene add intro --headline "Welcome"
|
|
73203
|
-
|
|
73204
73463
|
Automation & agents:
|
|
73205
73464
|
vibe run workflow.yaml Video-as-YAML pipeline
|
|
73206
73465
|
vibe agent Natural-language interface
|
|
@@ -73209,14 +73468,8 @@ this section shows the typical entry points by use case):
|
|
|
73209
73468
|
|
|
73210
73469
|
Common-flag note: most commands accept --dry-run to preview cost/output
|
|
73211
73470
|
before invoking paid providers.
|
|
73212
|
-
|
|
73213
|
-
Cost tiers:
|
|
73214
|
-
Free detect, edit (silence-cut/fade/noise-reduce), timeline
|
|
73215
|
-
Low inspect, audio transcribe, generate image ~$0.01\u2013$0.10
|
|
73216
|
-
High generate video, edit image ~$1\u2013$5
|
|
73217
|
-
V.High remix (regenerate-scene, highlights, auto-shorts) ~$5\u2013$50+
|
|
73218
73471
|
`
|
|
73219
|
-
);
|
|
73472
|
+
).addHelpText("after", () => renderCostTierFooter(program2));
|
|
73220
73473
|
program2.hook("preAction", async (thisCommand, actionCommand) => {
|
|
73221
73474
|
const opts = program2.opts();
|
|
73222
73475
|
if (opts.json || !process.stdout.isTTY && !process.env.VIBE_HUMAN_OUTPUT) {
|
|
@@ -73287,14 +73540,15 @@ program2.addCommand(doctorCommand);
|
|
|
73287
73540
|
program2.addCommand(demoCommand);
|
|
73288
73541
|
program2.addCommand(runCommand);
|
|
73289
73542
|
program2.addCommand(agentCommand);
|
|
73290
|
-
program2.addCommand(projectCommand);
|
|
73291
|
-
program2.addCommand(sceneCommand);
|
|
73292
|
-
program2.addCommand(timelineCommand);
|
|
73543
|
+
program2.addCommand(projectCommand, { hidden: true });
|
|
73544
|
+
program2.addCommand(sceneCommand, { hidden: true });
|
|
73545
|
+
program2.addCommand(timelineCommand, { hidden: true });
|
|
73293
73546
|
program2.addCommand(detectCommand);
|
|
73294
73547
|
program2.addCommand(batchCommand);
|
|
73295
73548
|
program2.addCommand(schemaCommand);
|
|
73296
73549
|
program2.addCommand(contextCommand);
|
|
73297
73550
|
program2.addCommand(walkthroughCommand);
|
|
73551
|
+
program2.addCommand(completionCommand);
|
|
73298
73552
|
program2.addCommand(mediaCommand, { hidden: true });
|
|
73299
73553
|
function propagateErrorHandling(cmd) {
|
|
73300
73554
|
for (const sub of cmd.commands) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibeframe/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.89.0",
|
|
4
4
|
"description": "VibeFrame CLI - natural language video editing from the terminal",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|
|
@@ -183,8 +183,8 @@
|
|
|
183
183
|
"tsx": "^4.21.0",
|
|
184
184
|
"typescript": "^5.3.3",
|
|
185
185
|
"vitest": "^1.2.2",
|
|
186
|
-
"@vibeframe/ai-providers": "0.
|
|
187
|
-
"@vibeframe/core": "0.
|
|
186
|
+
"@vibeframe/ai-providers": "0.89.0",
|
|
187
|
+
"@vibeframe/core": "0.89.0"
|
|
188
188
|
},
|
|
189
189
|
"engines": {
|
|
190
190
|
"node": ">=20"
|