reelforge 0.5.0 → 0.5.2
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/commands/models.js +36 -0
- package/dist/commands/tts.js +38 -7
- package/dist/index.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { get } from "../client.js";
|
|
2
|
+
import { table } from "../utils/output.js";
|
|
3
|
+
export function registerModels(program) {
|
|
4
|
+
program
|
|
5
|
+
.command("models")
|
|
6
|
+
.description("List the live RelayX model catalog (LLM / TTS / image / ASR) with pricing")
|
|
7
|
+
.helpOption("-h, --help", "show help")
|
|
8
|
+
.option("--modality <m>", "filter by modality: llm | tts | image | asr")
|
|
9
|
+
.option("--refresh", "bypass the 5-minute server-side cache")
|
|
10
|
+
.addHelpText("after", [
|
|
11
|
+
"",
|
|
12
|
+
"Examples:",
|
|
13
|
+
" reelforge models # all modalities",
|
|
14
|
+
" reelforge models --modality llm # only chat models",
|
|
15
|
+
" reelforge models --modality tts # only TTS models",
|
|
16
|
+
" reelforge models --refresh # force a re-fetch",
|
|
17
|
+
].join("\n"))
|
|
18
|
+
.action(async (opts) => {
|
|
19
|
+
const qs = new URLSearchParams();
|
|
20
|
+
if (opts.modality)
|
|
21
|
+
qs.set("modality", opts.modality);
|
|
22
|
+
if (opts.refresh)
|
|
23
|
+
qs.set("refresh", "1");
|
|
24
|
+
const path = `/api/v1/models${qs.toString() ? `?${qs.toString()}` : ""}`;
|
|
25
|
+
const r = await get(path);
|
|
26
|
+
table(r.models.map((m) => ({
|
|
27
|
+
id: m.id,
|
|
28
|
+
modality: m.modality,
|
|
29
|
+
owned_by: m.owned_by,
|
|
30
|
+
context: m.context_length ?? "",
|
|
31
|
+
input_per_1m: m.pricing.input_per_1m ?? "",
|
|
32
|
+
output_per_1m: m.pricing.output_per_1m ?? "",
|
|
33
|
+
per_1m_chars: m.pricing.per_1m_chars ?? "",
|
|
34
|
+
})));
|
|
35
|
+
});
|
|
36
|
+
}
|
package/dist/commands/tts.js
CHANGED
|
@@ -67,14 +67,45 @@ export function registerTts(program) {
|
|
|
67
67
|
});
|
|
68
68
|
tts
|
|
69
69
|
.command("voices")
|
|
70
|
-
.description("List
|
|
70
|
+
.description("List TTS voices: Edge (built-in 25) or RelayX (live, per-model)")
|
|
71
71
|
.helpOption("-h, --help", "show help")
|
|
72
|
-
.option("--
|
|
72
|
+
.option("--provider <p>", "edge (default) | relayx", "edge")
|
|
73
|
+
.option("--model <id>", "RelayX TTS model id (required when --provider=relayx), e.g. vox/index-tts-2")
|
|
74
|
+
.option("--locale <prefix>", "Edge only: filter by locale prefix, e.g. zh, en-US")
|
|
75
|
+
.option("--refresh", "RelayX only: bypass the 5-minute server-side cache")
|
|
76
|
+
.addHelpText("after", [
|
|
77
|
+
"",
|
|
78
|
+
"Examples:",
|
|
79
|
+
" reelforge tts voices # Edge 25 built-in",
|
|
80
|
+
" reelforge tts voices --locale zh # Edge filtered",
|
|
81
|
+
" reelforge tts voices --provider relayx --model vox/index-tts-2 # 149 vox voices",
|
|
82
|
+
" reelforge tts voices --provider relayx --model minimax/speech-2.6-hd",
|
|
83
|
+
].join("\n"))
|
|
73
84
|
.action(async (opts) => {
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
voices = voices
|
|
78
|
-
|
|
85
|
+
const provider = opts.provider || "edge";
|
|
86
|
+
if (provider === "edge") {
|
|
87
|
+
const r = await get("/api/v1/tts/voices?provider=edge");
|
|
88
|
+
let voices = r.voices;
|
|
89
|
+
if (opts.locale)
|
|
90
|
+
voices = voices.filter((v) => v.locale.startsWith(opts.locale));
|
|
91
|
+
table(voices);
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
if (provider === "relayx") {
|
|
95
|
+
if (!opts.model)
|
|
96
|
+
throw new Error("--model is required when --provider=relayx (e.g. vox/index-tts-2)");
|
|
97
|
+
const qs = new URLSearchParams({ provider: "relayx", model: opts.model });
|
|
98
|
+
if (opts.refresh)
|
|
99
|
+
qs.set("refresh", "1");
|
|
100
|
+
const r = await get(`/api/v1/tts/voices?${qs.toString()}`);
|
|
101
|
+
table(r.voices.map((v) => ({
|
|
102
|
+
id: v.id,
|
|
103
|
+
label: v.label,
|
|
104
|
+
featured: v.featured ? "★" : "",
|
|
105
|
+
demo_url: v.demo_url ?? "",
|
|
106
|
+
})));
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
throw new Error(`Unknown --provider: ${provider} (expected "edge" or "relayx")`);
|
|
79
110
|
});
|
|
80
111
|
}
|
package/dist/index.js
CHANGED
|
@@ -15,6 +15,7 @@ const pkgVersion = JSON.parse(readFileSync(pkgPath, "utf-8")).version;
|
|
|
15
15
|
import { registerAuth } from "./commands/auth.js";
|
|
16
16
|
import { registerCreate } from "./commands/create.js";
|
|
17
17
|
import { registerLlm } from "./commands/llm.js";
|
|
18
|
+
import { registerModels } from "./commands/models.js";
|
|
18
19
|
import { registerTts } from "./commands/tts.js";
|
|
19
20
|
import { registerImages } from "./commands/images.js";
|
|
20
21
|
import { registerContent } from "./commands/content.js";
|
|
@@ -76,6 +77,7 @@ program.addHelpText("afterAll", [
|
|
|
76
77
|
registerAuth(program);
|
|
77
78
|
registerCreate(program);
|
|
78
79
|
registerLlm(program);
|
|
80
|
+
registerModels(program);
|
|
79
81
|
registerTts(program);
|
|
80
82
|
registerImages(program);
|
|
81
83
|
registerContent(program);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reelforge",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "CLI for ReelForge Studio — AI video engine. Installs as both `reelforge` and the short alias `rf`. Every REST API exposed as a command, with --help on every level.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|