UNPKG

cost-claude

Version:

Claude Code cost monitoring, analytics, and optimization toolkit

33 lines 1.73 kB
import chalk from 'chalk'; import ora from 'ora'; import { logger } from '../../utils/logger.js'; import { createSeparator } from '../../utils/format.js'; export async function statsCommand(options) { const spinner = ora('Calculating statistics...').start(); try { spinner.succeed('Statistics feature coming soon!'); console.log(chalk.bold.blue('\n📊 Claude Code Statistics')); console.log(createSeparator(50)); console.log(chalk.gray('\nRequested Analysis:')); console.log(` Period: ${chalk.cyan(options.period)}`); console.log(` Group by: ${chalk.cyan(options.groupBy)}`); console.log(` Top: ${chalk.cyan(options.top)}`); console.log(` Format: ${chalk.cyan(options.format)}`); console.log(chalk.yellow('\n⚠️ This feature is under development')); console.log(chalk.gray('The following analytics will be available soon:')); console.log(' • Daily cost trends and patterns'); console.log(' • Session-based analysis with efficiency metrics'); console.log(' • Hourly usage patterns'); console.log(' • Cost projections and budgeting'); console.log(' • Interactive charts and visualizations'); console.log(chalk.gray('\nFor now, use the "analyze" command for basic statistics:')); console.log(chalk.cyan(' cost-claude analyze --from 2025-05-01 --to 2025-05-31')); } catch (error) { spinner.fail('Statistics calculation failed'); logger.error('Stats command error:', error); console.error(chalk.red('Error:'), error instanceof Error ? error.message : error); process.exit(1); } } //# sourceMappingURL=stats.js.map