// ─── CLI Entry Point ──────────────────────────────────────────────────────── import { Command } from 'commander'; import { chatCommand } from './commands/chat.js'; import { runCommand } from './commands/run.js'; import { providersCommand } from './commands/providers.js'; import { toolsCommand } from './commands/tools.js'; import { skillsCommand } from './commands/skills.js'; import { configCommand } from './commands/config.js'; import { renderBanner } from './renderers/index.js'; const program = new Command(); program .name('harness') .description('Production-grade, model-agnostic AI agent CLI') .version('0.1.0'); program .command('chat') .description('Interactive chat with the AI agent') .option('-p, --provider ', 'Provider to use', 'anthropic') .option('-m, --model ', 'Model to use') .option('-s, --skills ', 'Skills to load', ['coding']) .option('--verbose', 'Show detailed event information') .option('--compact', 'Minimal output mode') .action(chatCommand); program .command('run ') .description('Run an autonomous task with the given goal') .option('-p, --provider ', 'Provider to use', 'anthropic') .option('-m, --model ', 'Model to use') .option('-s, --skills ', 'Skills to load', ['coding']) .option('--max-turns ', 'Maximum turns', '20') .option('--budget-tokens ', 'Token budget') .option('--budget-cost ', 'Cost budget in USD') .option('--approval ', 'Approval mode', 'confirm-writes') .option('--verbose', 'Show detailed event information') .option('--compact', 'Minimal output mode') .action(runCommand); program .command('providers') .description('List available providers and models') .action(providersCommand); program .command('tools') .description('List available tools') .action(toolsCommand); program .command('skills') .description('List available skills') .action(skillsCommand); program .command('config') .description('Show or edit configuration') .option('--show', 'Show current config') .action(configCommand); // Show banner and parse renderBanner(); program.parse();