UNPKG

@meldscience/meld

Version:

pipeable one-shot prompt scripting toolkit

28 lines 1.01 kB
#!/usr/bin/env node "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const commander_1 = require("commander"); const prompt_script_1 = require("../src/prompt-script"); const program = new commander_1.Command(); program .name('meld') .description('Process a markdown file containing embedded commands') .argument('<input>', 'Input .ps.md file') .option('-o, --outfile <path>', 'Output file path') .option('--dry-run', 'Print commands that would be executed without running them') .action(async (input, options) => { try { const ps = new prompt_script_1.PromptScript({ inputFile: input, outputFile: options.outfile || input.replace('.ps.md', '.ps.generated.md'), dryRun: options.dryRun || false }); await ps.process(); } catch (error) { console.error('Error:', error.message || 'Unknown error'); process.exit(1); } }); program.parse(); //# sourceMappingURL=ps.js.map