claude-usage-tracker
Version:
Advanced analytics for Claude Code usage with cost optimization, conversation length analysis, and rate limit tracking
49 lines • 1.42 kB
TypeScript
import type { UsageEntry } from "./types.js";
export interface ExportOptions {
format: "csv" | "json" | "summary";
output?: string;
startDate?: string;
endDate?: string;
project?: string;
template?: "billing" | "efficiency" | "analytics" | "raw";
groupBy?: "day" | "week" | "month" | "project" | "conversation";
}
export interface ExportSummary {
totalEntries: number;
dateRange: {
start: string;
end: string;
};
totalCost: number;
totalTokens: number;
projects: string[];
exportedAt: string;
fileSize: string;
}
export declare class ExportManager {
private entries;
constructor(entries: UsageEntry[]);
export(options: ExportOptions): ExportSummary;
private validateExportOptions;
private isValidDate;
private filterEntries;
private generateFilename;
private exportCSV;
private exportJSON;
private exportSummary;
private generateCSVData;
private generateBillingCSV;
private generateEfficiencyCSV;
private generateAnalyticsCSV;
private generateRawCSV;
private generateJSONData;
private generateBillingData;
private generateAnalyticsData;
private generateSummaryReport;
private generateDailyBreakdown;
private generateTopConversations;
private getDateRange;
private createSummary;
private formatFileSize;
}
//# sourceMappingURL=export-manager.d.ts.map