mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-04-25 16:36:22 +02:00
update: added export capability
This commit is contained in:
parent
58fa1b91c3
commit
c562248850
3 changed files with 638 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env node
|
||||
import yargs from 'yargs';
|
||||
import { hideBin } from 'yargs/helpers';
|
||||
import { app, modelConfig, updateState, importExample, listExamples } from '../dist/app.js';
|
||||
import { app, modelConfig, updateState, importExample, listExamples, exportWorkflow } from '../dist/app.js';
|
||||
|
||||
yargs(hideBin(process.argv))
|
||||
|
||||
|
|
@ -90,6 +90,24 @@ yargs(hideBin(process.argv))
|
|||
}
|
||||
}
|
||||
)
|
||||
.command(
|
||||
"export",
|
||||
"Export a workflow with all dependencies (outputs to stdout)",
|
||||
(y) => y
|
||||
.option("agent", {
|
||||
type: "string",
|
||||
description: "Entry agent name to export",
|
||||
demandOption: true,
|
||||
}),
|
||||
async (argv) => {
|
||||
try {
|
||||
await exportWorkflow(String(argv.agent).trim());
|
||||
} catch (error) {
|
||||
console.error("Error:", error?.message ?? error);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
)
|
||||
.command(
|
||||
"model-config",
|
||||
"Select model",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue