@rupayan10/aios-cli 0.1.2 → 0.1.4

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.
Files changed (2) hide show
  1. package/dist/cli.js +48 -2
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -3518,7 +3518,7 @@ var init_package = __esm({
3518
3518
  "package.json"() {
3519
3519
  package_default = {
3520
3520
  name: "@rupayan10/aios-cli",
3521
- version: "0.1.2",
3521
+ version: "0.1.4",
3522
3522
  description: "FlowScale AIOS command-line interface",
3523
3523
  license: "AGPL-3.0-only",
3524
3524
  bin: {
@@ -5541,6 +5541,10 @@ var init_render = __esm({
5541
5541
  // src/commands/gpu.ts
5542
5542
  function registerGpu(program2) {
5543
5543
  const gpu = program2.command("gpu").description("GPU management");
5544
+ gpu.addHelpText("after", `
5545
+ Examples:
5546
+ $ aios gpu list
5547
+ $ aios gpu detect --json force re-detection (clears the cache)`);
5544
5548
  function printGpus(gpus, json) {
5545
5549
  if (json) {
5546
5550
  process.stdout.write(renderJson(gpus) + "\n");
@@ -5793,7 +5797,7 @@ function upsertModels(comfyPort, models) {
5793
5797
  writeTxn((db2) => {
5794
5798
  db2.prepare("DELETE FROM models WHERE comfy_port = ?").run(comfyPort);
5795
5799
  const ins = db2.prepare(`INSERT INTO models (id, filename, path, type, size_bytes, comfy_port, scanned_at) VALUES (?, ?, ?, ?, ?, ?, ?)
5796
- ON CONFLICT(id) DO UPDATE SET filename = excluded.filename, scanned_at = excluded.scanned_at`);
5800
+ ON CONFLICT(path) DO UPDATE SET filename = excluded.filename, type = excluded.type, size_bytes = excluded.size_bytes, comfy_port = excluded.comfy_port, scanned_at = excluded.scanned_at`);
5797
5801
  for (const m of models) ins.run(m.id, m.filename, m.path, m.type, m.sizeBytes, m.comfyPort, m.scannedAt);
5798
5802
  });
5799
5803
  }
@@ -10123,6 +10127,16 @@ function collectInput(val, acc) {
10123
10127
  }
10124
10128
  function registerTools(program2) {
10125
10129
  const tools = program2.command("tools").description("Tool management");
10130
+ tools.addHelpText("after", `
10131
+ Examples:
10132
+ $ aios tools build flux.json --name "Flux Dev" --instance auto
10133
+ $ aios tools build wf.json --inputs 6__text --outputs 9__images keep only a subset
10134
+ $ aios tools list --json
10135
+ $ aios tools run <id> --input 6__text="a cat" --input 4__image=@cat.png --instance auto
10136
+ $ aios tools show <executionId>
10137
+
10138
+ ComfyUI inputs are keyed <nodeId>__<paramName> (e.g. 6__text); plugin inputs use api__<paramName>.
10139
+ Prefix a value with @ to upload a local file (e.g. --input 4__image=@photo.png).`);
10126
10140
  const build = tools.command("build").description("Create a tool from a ComfyUI workflow JSON file").argument("<workflow.json>", "path to a ComfyUI workflow JSON file").option("--name <name>", "tool name (defaults to the filename)").option("--instance <id>", "a running instance to resolve widget names via /object_info").option("--inputs <keys>", "comma-separated nodeId__param input keys to keep (default: all)").option("--outputs <keys>", "comma-separated output keys to keep (default: all)").option("--json", "machine-readable JSON output");
10127
10141
  build.action(async (file) => {
10128
10142
  const o2 = build.opts();
@@ -10669,6 +10683,13 @@ var init_comfy_logs = __esm({
10669
10683
  // src/commands/comfy.ts
10670
10684
  function registerComfy(program2) {
10671
10685
  const comfy = program2.command("comfy").description("ComfyUI instance management");
10686
+ comfy.addHelpText("after", `
10687
+ Examples:
10688
+ $ aios comfy detect generate instance configs from detected GPUs
10689
+ $ aios comfy status which instances are alive
10690
+ $ aios comfy start gpu-0 start one instance (omit id to start all)
10691
+ $ aios comfy logs gpu-0 -n 100
10692
+ $ aios comfy stop gpu-0`);
10672
10693
  const status = comfy.command("status").description("Show ComfyUI instance status").option("--json", "machine-readable JSON output");
10673
10694
  status.action(() => {
10674
10695
  const json = Boolean(status.opts().json);
@@ -10803,6 +10824,10 @@ var init_model_scanner = __esm({
10803
10824
  // src/commands/models.ts
10804
10825
  function registerModels(program2) {
10805
10826
  const models = program2.command("models").description("Local model management");
10827
+ models.addHelpText("after", `
10828
+ Examples:
10829
+ $ aios models scan --instance auto HTTP-scan a running instance
10830
+ $ aios models list --type checkpoint --json`);
10806
10831
  const scan = models.command("scan").description("Scan a running ComfyUI instance for models").requiredOption("--instance <id>", 'instance id or "auto"').option("--json", "machine-readable JSON output");
10807
10832
  scan.action(async () => {
10808
10833
  const o2 = scan.opts();
@@ -10851,6 +10876,12 @@ var init_models = __esm({
10851
10876
  // src/commands/plugins.ts
10852
10877
  function registerPlugins(program2) {
10853
10878
  const plugins = program2.command("plugins").description("API-engine tool plugin management");
10879
+ plugins.addHelpText("after", `
10880
+ Examples:
10881
+ $ aios plugins install flux1-lora-trainer from the FlowScale registry
10882
+ $ aios plugins import ./my-plugin local dir or a GitHub URL
10883
+ $ aios plugins start flux1-lora-trainer
10884
+ $ aios tools run flux1-lora-trainer-builtin --input api__prompt="a cat" --start`);
10854
10885
  const list = plugins.command("list").description("List locally installed tool plugins").option("--json", "machine-readable JSON output");
10855
10886
  list.action(() => {
10856
10887
  const o2 = list.opts();
@@ -11033,6 +11064,11 @@ var init_open_file = __esm({
11033
11064
  // src/commands/assets.ts
11034
11065
  function registerAssets(program2) {
11035
11066
  const assets = program2.command("assets").description("Saved execution outputs (assets)");
11067
+ assets.addHelpText("after", `
11068
+ Examples:
11069
+ $ aios assets list --tool <id> --json
11070
+ $ aios assets show <executionId>
11071
+ $ aios assets open <executionId> open the first output in your viewer`);
11036
11072
  const list = assets.command("list").description("List completed execution outputs resolved to disk").option("--tool <id>", "filter by tool id").option("--json", "machine-readable JSON output");
11037
11073
  list.action(() => {
11038
11074
  const o2 = list.opts();
@@ -12254,6 +12290,16 @@ function buildProgram() {
12254
12290
  registerModels(program2);
12255
12291
  registerPlugins(program2);
12256
12292
  registerAssets(program2);
12293
+ program2.addHelpText("after", `
12294
+ Examples:
12295
+ $ aios interactive menu (in a TTY)
12296
+ $ aios gpu list show detected GPUs
12297
+ $ aios comfy detect && aios comfy start gpu-0 configure + launch an instance
12298
+ $ aios tools build workflow.json --instance auto build a tool from a workflow
12299
+ $ aios tools run <toolId> --input 6__text="a cat" --instance auto
12300
+ $ aios assets open <executionId> open the rendered output
12301
+
12302
+ Add --json to most commands for scripting. Run \`aios help <command>\` for per-command examples.`);
12257
12303
  return program2;
12258
12304
  }
12259
12305
  async function main(argv) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rupayan10/aios-cli",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "FlowScale AIOS command-line interface",
5
5
  "license": "AGPL-3.0-only",
6
6
  "bin": {