#!/usr/bin/env node import { Command } from 'commander'; import { ingestAndRun } from './commands/ingest-run.js'; import { login } from './commands/login.js'; const program = new Command(); program .name('findall') .description('CLI tool for Parallel FindAll API') .version('0.1.0'); program .command('login') .description('Authenticate with Parallel using OAuth and save API key') .action(login); program .command('run') .argument('', 'Output directory for results') .argument('', 'Natural language objective for the search') .description('Ingest objective, preview schema, configure, and run FindAll') .option('-k, --api-key ', 'Parallel API key (or set PARALLEL_API_KEY env var)') .option('-g, --generator ', 'Generator tier (base|core|pro|preview)', 'core') .option('-l, --limit ', 'Initial match limit', '50') .option('--skip-preview', 'Skip schema preview and confirmation') .option('--auto-approve', 'Automatically approve schema without editing') .action(ingestAndRun); program.parse();