diff --git a/src/cli.ts b/src/cli.ts index 54d2a20..f2f3c22 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -13,6 +13,7 @@ import { CATEGORY_LABELS, type DateRange, type ProjectSummary, type TaskCategory import { renderDashboard } from './dashboard.js' import { parseDateRangeFlags } from './cli-date.js' import { runOptimize, scanAndDetect } from './optimize.js' +import { renderCompare } from './compare.js' import { getAllProviders } from './providers/index.js' import { readConfig, saveConfig, getConfigFilePath } from './config.js' import { createRequire } from 'node:module' @@ -649,4 +650,15 @@ program await runOptimize(projects, label, range) }) +program + .command('compare') + .description('Compare two AI models side-by-side') + .option('-p, --period ', 'Analysis period: today, week, 30days, month, all', 'all') + .option('--provider ', 'Filter by provider: all, claude, codex, cursor', 'all') + .action(async (opts) => { + await loadPricing() + const { range } = getDateRange(opts.period) + await renderCompare(range, opts.provider) + }) + program.parse()