reelforge 0.5.0 → 0.5.1

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.
@@ -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/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.0",
3
+ "version": "0.5.1",
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",