pomljs
Version:
Prompt Orchestration Markup Language
25 lines (22 loc) • 1.57 kB
JavaScript
#!/usr/bin/env node
'use strict';
var yargs = require('yargs/yargs');
var helpers = require('yargs/helpers');
var index = require('./index.cjs');
const args = yargs(helpers.hideBin(process.argv)).options({
input: { type: 'string', alias: 'i', description: 'Input string' },
file: { type: 'string', alias: 'f', description: 'Path to input file' },
output: { type: 'string', alias: 'o', description: 'Path to output file' },
context: { type: 'string', array: true, alias: 'c', description: 'Context variables' },
contextFile: { type: 'string', alias: 'context-file', description: 'Path to context JSON file' },
stylesheet: { type: 'string', alias: 's', description: 'Path to stylesheet file' },
stylesheetFile: { type: 'string', alias: 'stylesheet-file', description: 'Path to stylesheet JSON file' },
trim: { type: 'boolean', alias: 't', description: 'Trim whitespace between elements when parsing the input', default: true },
speakerMode: { type: 'boolean', alias: 'chat', description: 'Output in speaker mode (JSON)', default: true },
prettyPrint: { type: 'boolean', alias: 'p', description: 'Pretty print the output', default: false },
strict: { type: 'boolean', description: 'Strict mode', default: true },
cwd: { type: 'string', description: 'Working directory (defaults to file location if file is specified, otherwise current directory)' },
traceDir: { type: 'string', description: 'Enable tracing and dump files to this directory' },
}).parseSync();
index.commandLine(args);
//# sourceMappingURL=cli.cjs.map