@nodaro/cli 1.8.1 → 1.9.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/README.md CHANGED
@@ -107,9 +107,24 @@ nodaro nodes get <type> # full input schema
107
107
  nodaro nodes run <type> --param prompt="…" --param provider=flux [--watch]
108
108
  nodaro nodes run <type> --params-file body.json [--watch] [--poll-interval 1000]
109
109
 
110
+ # Models — browse the model catalog (capability sheets, credit pricing, prompt tips)
111
+ nodaro models list [--kind video] [--mode i2v] [--family Google] [--featured]
112
+
110
113
  # Pickers — valid values for parameter-picker nodes (setting, mood, person, …)
111
114
  nodaro pickers list # all picker node types + option counts
112
115
  nodaro pickers get <nodeType> [--full] [--category <c>] [--field <f>] # one picker's valid ids
116
+ nodaro pickers analyze "<text>" [--target setting,mood] # AI Fill: pick values from a description (credit-billed)
117
+
118
+ # Shots — Cine share → remix records
119
+ nodaro shots get <id> | create [--file shot.json] | update <id> --visibility public | delete <id>
120
+
121
+ # Recast — regenerate an analyzed video with your own cast + authored-script import (Cloud)
122
+ nodaro recast skill # the authoring guide (markdown, free)
123
+ nodaro recast validate --file script.json # free; exit 1 while invalid
124
+ nodaro recast import --file script.json --rights-attested
125
+ nodaro recast estimate --analysis-job <id> # quote credits before creating
126
+ nodaro recast create --workflow <id> --analysis-job <id> # BUYS THE PLAN
127
+ nodaro recast start <recastId> && nodaro recast status <recastId>
113
128
 
114
129
  nodaro executions get <id>
115
130
  nodaro executions get <id> --watch
@@ -143,8 +158,20 @@ nodaro audio fx --audio <url> --preset hall --mix 35 --watch
143
158
  nodaro audio mix --audio <url> --audio <url> --volumes 100,60 --watch
144
159
  nodaro audio adjust-volume --audio <url> --normalize --watch
145
160
  nodaro audio combine --segment <url> --segment "<url>@12-95" --watch
161
+
162
+ # Also available (full syntax in the CLI reference):
163
+ # video-pro — stop / continue Generate Video Pro runs
164
+ # characters — Character Studio CRUD, portraits, assets, motion
165
+ # locations / objects — Location & Object Studio CRUD + motion
166
+ # prompt — the prompt wizard (analyze / generate / wizard)
167
+ # presets — node presets (factory + your own)
168
+ # community — shared characters/locations/objects: browse, clone, favorites
146
169
  ```
147
170
 
171
+ The authoritative per-flag reference for every command group is the
172
+ [CLI reference](https://nodaroai.github.io/app.nodaro.ai/cli.html) — this README
173
+ shows the shape, not every option.
174
+
148
175
  ### Three ways to run something
149
176
 
150
177
  | Want | Command |
package/dist/index.js CHANGED
@@ -29,7 +29,7 @@ var require_package = __commonJS({
29
29
  "package.json"(exports$1, module) {
30
30
  module.exports = {
31
31
  name: "@nodaro/cli",
32
- version: "1.8.1",
32
+ version: "1.9.0",
33
33
  description: "Command-line interface for Nodaro \u2014 list and run workflows, inspect jobs and executions, manage projects from the terminal.",
34
34
  type: "module",
35
35
  license: "Apache-2.0",
@@ -70,11 +70,11 @@ var require_package = __commonJS({
70
70
  "@inquirer/confirm": "^6.0.12",
71
71
  "@inquirer/input": "^5.0.12",
72
72
  "@inquirer/select": "^5.1.4",
73
- "@nodaro/sdk": "^1.13.1",
74
- "@nodaro/shared": "^2.0.0",
73
+ "@nodaro/sdk": "^1.17.0",
74
+ "@nodaro/shared": "^2.6.0",
75
75
  commander: "^12.1.0",
76
76
  picocolors: "^1.1.1",
77
- "@nodaro/prompts": "^1.5.0"
77
+ "@nodaro/prompts": "^1.7.1"
78
78
  },
79
79
  devDependencies: {
80
80
  tsup: "^8.5.0",
@@ -373,7 +373,7 @@ function maskToken(token) {
373
373
  if (token.length <= 12) return "****";
374
374
  return token.slice(0, 8) + "\u2026" + token.slice(-4);
375
375
  }
376
- var CLI_VERSION = "1.8.1" ;
376
+ var CLI_VERSION = "1.9.0" ;
377
377
  function buildClient(profileName) {
378
378
  const { name, profile } = getProfile(profileName);
379
379
  if (!profile) {
@@ -2752,6 +2752,31 @@ function pickerCatalogsCommand() {
2752
2752
  handleError(err);
2753
2753
  }
2754
2754
  });
2755
+ cmd.command("analyze <text>").description("AI Fill: choose picker values from a free-text description (credit-billed LLM call)").option("--target <types>", "comma-separated picker node types to fill (default: all analyzable)").option("--instructions <text>", "extra guidance for the analyzer").option("--model <id>", "LLM model override").option("--effort <level>", "reasoning effort override").option("--profile <name>").option("--json").addHelpText(
2756
+ "after",
2757
+ `
2758
+ Examples:
2759
+ $ nodaro pickers analyze "rainy neon alley at night, low tracking shot"
2760
+ $ nodaro pickers analyze "sunlit kitchen, warm morning" --target setting,mood`
2761
+ ).action(
2762
+ async (text, opts) => {
2763
+ try {
2764
+ const client = buildClient(opts.profile);
2765
+ const result = await client.pickerCatalogs.analyzeText({
2766
+ text,
2767
+ targetPickers: opts.target?.split(",").map((t) => t.trim()).filter(Boolean),
2768
+ instructions: opts.instructions,
2769
+ origin: "cli",
2770
+ llmModel: opts.model,
2771
+ reasoningEffort: opts.effort
2772
+ });
2773
+ if (opts.json) emit(result, opts);
2774
+ else detail(result.pickerJson);
2775
+ } catch (err) {
2776
+ handleError(err);
2777
+ }
2778
+ }
2779
+ );
2755
2780
  cmd.command("get <nodeType>").description("show one picker's catalog of valid values").option("--full", "include description + the prompt fragment each id injects").option("--category <name>", "single-dim pickers: filter to one category").option("--field <name>", "multi-dim pickers (person/styling/framing): only this dimension").option("--profile <name>").option("--json").addHelpText(
2756
2781
  "after",
2757
2782
  `
@@ -2778,6 +2803,249 @@ Examples:
2778
2803
  );
2779
2804
  return cmd;
2780
2805
  }
2806
+ function modelsCommand() {
2807
+ const cmd = new Command("models").description(
2808
+ "browse the model catalog \u2014 capability sheets, per-variant credit pricing, prompt tips"
2809
+ );
2810
+ cmd.command("list").description("list available models (grouped by kind and family)").option("--kind <kind>", "image | video | audio").option("--mode <mode>", 'operation filter, e.g. "t2v", "i2v", "t2i", "tts"').option("--family <name>", 'vendor / lab name, e.g. "Google", "Bytedance"').option("--featured", "featured models only").option("--profile <name>").option("--json").addHelpText(
2811
+ "after",
2812
+ `
2813
+ Examples:
2814
+ $ nodaro models list --kind video --mode i2v
2815
+ $ nodaro models list --family Google --json`
2816
+ ).action(
2817
+ async (opts) => {
2818
+ try {
2819
+ const client = buildClient(opts.profile);
2820
+ const result = await client.models.list({
2821
+ kind: opts.kind,
2822
+ mode: opts.mode,
2823
+ family: opts.family,
2824
+ featuredOnly: opts.featured
2825
+ });
2826
+ if (opts.json) {
2827
+ emit(result, opts);
2828
+ return;
2829
+ }
2830
+ const rows = result.sections.flatMap(
2831
+ (section) => section.families.flatMap(
2832
+ (group) => group.models.map((m) => ({
2833
+ id: m.id,
2834
+ kind: section.kind,
2835
+ family: group.family,
2836
+ modes: m.modes.join(","),
2837
+ credits: (m.pricing ?? []).map((p) => p.credits).join("/") || "-",
2838
+ featured: m.featured ? "\u2605" : "",
2839
+ doctrine: m.doctrineCovered ? "\u2713" : ""
2840
+ }))
2841
+ )
2842
+ );
2843
+ table(rows, ["id", "kind", "family", "modes", "credits", "featured", "doctrine"]);
2844
+ } catch (err) {
2845
+ handleError(err);
2846
+ }
2847
+ }
2848
+ );
2849
+ return cmd;
2850
+ }
2851
+ function readJsonObject2(path, flag) {
2852
+ let raw;
2853
+ try {
2854
+ raw = readFileSync(path, "utf8");
2855
+ } catch {
2856
+ throw new Error(`${flag}: cannot read ${path}`);
2857
+ }
2858
+ const parsed = JSON.parse(raw);
2859
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
2860
+ throw new Error(`${flag}: expected a JSON object`);
2861
+ }
2862
+ return parsed;
2863
+ }
2864
+ function shotsCommand() {
2865
+ const cmd = new Command("shots").description(
2866
+ "Cine share \u2192 remix records \u2014 create, inspect, toggle visibility, delete"
2867
+ );
2868
+ cmd.command("get <id>").description("read a shot (public shots resolve for anyone holding the id)").option("--profile <name>").option("--json").action(async (id, opts) => {
2869
+ try {
2870
+ const client = buildClient(opts.profile);
2871
+ const result = await client.shots.get(id);
2872
+ if (opts.json) emit(result.shot, opts);
2873
+ else detail(result.shot);
2874
+ } catch (err) {
2875
+ handleError(err);
2876
+ }
2877
+ });
2878
+ cmd.command("create").description("create a shot record from a JSON file (CreateShotInput shape)").option("--file <jsonPath>", "path to a JSON file with the shot fields").option("--visibility <v>", "private | public (default private)").option("--profile <name>").option("--json").addHelpText(
2879
+ "after",
2880
+ `
2881
+ Examples:
2882
+ $ nodaro shots create --file shot.json
2883
+ $ nodaro shots create --file shot.json --visibility public`
2884
+ ).action(async (opts) => {
2885
+ try {
2886
+ const input2 = opts.file ? readJsonObject2(opts.file, "--file") : {};
2887
+ if (opts.visibility) input2.visibility = opts.visibility;
2888
+ const client = buildClient(opts.profile);
2889
+ const result = await client.shots.create(input2);
2890
+ if (opts.json) emit(result, opts);
2891
+ else success(`created shot ${result.id}`);
2892
+ } catch (err) {
2893
+ handleError(err);
2894
+ }
2895
+ });
2896
+ cmd.command("update <id>").description("update an owned shot (any subset of fields, e.g. a visibility toggle)").option("--file <jsonPath>", "path to a JSON file with the fields to change").option("--visibility <v>", "private | public").option("--profile <name>").option("--json").action(async (id, opts) => {
2897
+ try {
2898
+ const input2 = opts.file ? readJsonObject2(opts.file, "--file") : {};
2899
+ if (opts.visibility) input2.visibility = opts.visibility;
2900
+ if (Object.keys(input2).length === 0) {
2901
+ throw new Error("nothing to update \u2014 pass --visibility and/or --file");
2902
+ }
2903
+ const client = buildClient(opts.profile);
2904
+ const result = await client.shots.update(id, input2);
2905
+ if (opts.json) emit(result.shot, opts);
2906
+ else detail(result.shot);
2907
+ } catch (err) {
2908
+ handleError(err);
2909
+ }
2910
+ });
2911
+ cmd.command("delete <id>").description("delete an owned shot").option("--profile <name>").action(async (id, opts) => {
2912
+ try {
2913
+ const client = buildClient(opts.profile);
2914
+ await client.shots.delete(id);
2915
+ success(`deleted shot ${id}`);
2916
+ } catch (err) {
2917
+ handleError(err);
2918
+ }
2919
+ });
2920
+ return cmd;
2921
+ }
2922
+ function readScript(path) {
2923
+ let raw;
2924
+ try {
2925
+ raw = readFileSync(path, "utf8");
2926
+ } catch {
2927
+ throw new Error(`--file: cannot read ${path}`);
2928
+ }
2929
+ const parsed = JSON.parse(raw);
2930
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
2931
+ throw new Error("--file: expected a JSON object (the authored script document)");
2932
+ }
2933
+ return parsed;
2934
+ }
2935
+ function recastCommand() {
2936
+ const cmd = new Command("recast").description(
2937
+ "recast runs + authored-script import (movie as JSON) \u2014 Cloud edition"
2938
+ );
2939
+ cmd.command("skill").description("print the authoring guide for writing a script (markdown, free)").option("--profile <name>").action(async (opts) => {
2940
+ try {
2941
+ const client = buildClient(opts.profile);
2942
+ process.stdout.write(await client.recast.authoringSkill());
2943
+ } catch (err) {
2944
+ handleError(err);
2945
+ }
2946
+ });
2947
+ cmd.command("validate").description("validate an authored script JSON (free; loop until valid)").requiredOption("--file <jsonPath>", "path to the authored script document").option("--profile <name>").option("--json").action(async (opts) => {
2948
+ try {
2949
+ const client = buildClient(opts.profile);
2950
+ const result = await client.recast.validateScript(readScript(opts.file));
2951
+ if (opts.json) {
2952
+ emit(result, opts);
2953
+ return;
2954
+ }
2955
+ if (result.valid) success("valid");
2956
+ else {
2957
+ warn(`invalid \u2014 ${result.errors.length} error(s)`);
2958
+ for (const e of result.errors) {
2959
+ console.log(` ${e.path}: ${e.message}${e.hint ? ` (hint: ${e.hint})` : ""}`);
2960
+ }
2961
+ }
2962
+ for (const w of result.warnings) warn(w);
2963
+ if (!result.valid) process.exitCode = 1;
2964
+ } catch (err) {
2965
+ handleError(err);
2966
+ }
2967
+ });
2968
+ cmd.command("import").description("import a VALIDATED authored script as a completed analysis (free)").requiredOption("--file <jsonPath>", "path to the authored script document").option(
2969
+ "--rights-attested",
2970
+ "assert the script is your own work (required \u2014 authored recasts render Faithful, exactly as written)"
2971
+ ).option("--profile <name>").option("--json").action(async (opts) => {
2972
+ try {
2973
+ if (!opts.rightsAttested) {
2974
+ throw new Error(
2975
+ "authored imports require --rights-attested: confirm the script is your own work (it renders exactly as written)"
2976
+ );
2977
+ }
2978
+ const client = buildClient(opts.profile);
2979
+ const result = await client.recast.importScript(readScript(opts.file), {
2980
+ rightsAttested: true
2981
+ });
2982
+ if (opts.json) emit(result, opts);
2983
+ else {
2984
+ success(`${result.created ? "imported" : "already imported"} \u2014 analysis job ${result.jobId}`);
2985
+ for (const w of result.warnings) warn(w);
2986
+ }
2987
+ } catch (err) {
2988
+ handleError(err);
2989
+ }
2990
+ });
2991
+ cmd.command("estimate").description("quote a run in credits before creating it").requiredOption("--analysis-job <id>", "the source analysis job id").option("--fidelity <f>", "render fidelity", "faithful").option("--resolution <r>").option("--segment-sec <n>", "segment length in seconds", parseFloat).option("--profile <name>").option("--json").action(
2992
+ async (opts) => {
2993
+ try {
2994
+ const client = buildClient(opts.profile);
2995
+ const result = await client.recast.estimate({
2996
+ analysisJobId: opts.analysisJob,
2997
+ fidelity: opts.fidelity,
2998
+ resolution: opts.resolution,
2999
+ segmentSec: opts.segmentSec
3000
+ });
3001
+ if (opts.json) emit(result, opts);
3002
+ else detail(result);
3003
+ } catch (err) {
3004
+ handleError(err);
3005
+ }
3006
+ }
3007
+ );
3008
+ cmd.command("create").description("create a run \u2014 BUYS THE PLAN (credits); run `estimate` first").requiredOption("--workflow <id>", "workflow the run attaches to").requiredOption("--analysis-job <id>", "the source analysis job id").option("--fidelity <f>", "render fidelity", "faithful").option("--rights-attested", "required for faithful renders of authored scripts").option("--resolution <r>").option("--segment-sec <n>", "segment length in seconds", parseFloat).option("--profile <name>").option("--json").action(
3009
+ async (opts) => {
3010
+ try {
3011
+ const client = buildClient(opts.profile);
3012
+ const result = await client.recast.create({
3013
+ workflowId: opts.workflow,
3014
+ analysisJobId: opts.analysisJob,
3015
+ fidelity: opts.fidelity,
3016
+ rightsAttested: opts.rightsAttested,
3017
+ resolution: opts.resolution,
3018
+ segmentSec: opts.segmentSec
3019
+ });
3020
+ if (opts.json) emit(result, opts);
3021
+ else success(`run ${result.recastId} created (planning) \u2014 poll: nodaro recast status ${result.recastId}`);
3022
+ } catch (err) {
3023
+ handleError(err);
3024
+ }
3025
+ }
3026
+ );
3027
+ cmd.command("start <recastId>").description("start rendering a planned run (idempotent)").option("--segment-sec <n>", "segment length in seconds", parseFloat).option("--profile <name>").option("--json").action(async (recastId, opts) => {
3028
+ try {
3029
+ const client = buildClient(opts.profile);
3030
+ const result = await client.recast.start(recastId, { segmentSec: opts.segmentSec });
3031
+ if (opts.json) emit(result, opts);
3032
+ else success(`rendering${result.gvpJobId ? ` \u2014 gvp job ${result.gvpJobId}` : ""}`);
3033
+ } catch (err) {
3034
+ handleError(err);
3035
+ }
3036
+ });
3037
+ cmd.command("status <recastId>").description("poll a run \u2014 status plus any pending interactive step").option("--profile <name>").option("--json").action(async (recastId, opts) => {
3038
+ try {
3039
+ const client = buildClient(opts.profile);
3040
+ const result = await client.recast.get(recastId);
3041
+ if (opts.json) emit(result, opts);
3042
+ else detail(result);
3043
+ } catch (err) {
3044
+ handleError(err);
3045
+ }
3046
+ });
3047
+ return cmd;
3048
+ }
2781
3049
  var ASSET_TYPE_TO_COLUMN = {
2782
3050
  timeOfDay: "time_of_day",
2783
3051
  weather: "weather",
@@ -3485,6 +3753,9 @@ program.addCommand(audioCommand());
3485
3753
  program.addCommand(presetsCommand());
3486
3754
  program.addCommand(communityCommand());
3487
3755
  program.addCommand(pickerCatalogsCommand());
3756
+ program.addCommand(modelsCommand());
3757
+ program.addCommand(shotsCommand());
3758
+ program.addCommand(recastCommand());
3488
3759
  registerLocationsCommands(program);
3489
3760
  registerObjectsCommands(program);
3490
3761
  program.parseAsync().catch((err) => {