ccusage 18.0.10 → 18.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{data-loader-B58Zt4YE.js → data-loader-9ESMosno.js} +35 -89
- package/dist/data-loader.js +2 -2
- package/dist/{debug-0PxspX9a.js → debug-DvI5DUKR.js} +2 -2
- package/dist/debug.js +3 -3
- package/dist/index.js +3 -3
- package/dist/{logger-TGVysPie.js → logger-D9FuoYJ7.js} +1 -1
- package/dist/logger.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as object, B as getTotalTokens, C as boolean, F as safeParse, I as string, M as parse$2, N as picklist, S as array, _ as requestIdSchema, a as createDailyDate, b as versionSchema, c as createSessionId, f as isoTimestampSchema, g as projectPathSchema, h as monthlyDateSchema, i as createBucket, j as optional, k as number, l as createWeeklyDate, m as modelNameSchema, o as createMonthlyDate, p as messageIdSchema, r as activityDateSchema, s as createProjectPath, u as dailyDateSchema, v as sessionIdSchema, x as weeklyDateSchema, z as union } from "./_types-DY3gqCWm.js";
|
|
2
|
-
import { n as logger } from "./logger-
|
|
2
|
+
import { n as logger } from "./logger-D9FuoYJ7.js";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import * as nativeFs from "node:fs";
|
|
5
5
|
import b, { createReadStream } from "node:fs";
|
|
@@ -4909,11 +4909,16 @@ const PREFETCHED_CLAUDE_PRICING = {
|
|
|
4909
4909
|
"cache_read_input_token_cost": 5e-7,
|
|
4910
4910
|
"max_tokens": 128e3,
|
|
4911
4911
|
"max_input_tokens": 1e6,
|
|
4912
|
-
"max_output_tokens": 128e3
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
"
|
|
4916
|
-
"
|
|
4912
|
+
"max_output_tokens": 128e3
|
|
4913
|
+
},
|
|
4914
|
+
"anthropic.claude-opus-4-7": {
|
|
4915
|
+
"input_cost_per_token": 5e-6,
|
|
4916
|
+
"output_cost_per_token": 25e-6,
|
|
4917
|
+
"cache_creation_input_token_cost": 625e-8,
|
|
4918
|
+
"cache_read_input_token_cost": 5e-7,
|
|
4919
|
+
"max_tokens": 128e3,
|
|
4920
|
+
"max_input_tokens": 1e6,
|
|
4921
|
+
"max_output_tokens": 128e3
|
|
4917
4922
|
},
|
|
4918
4923
|
"anthropic.claude-sonnet-4-6": {
|
|
4919
4924
|
"input_cost_per_token": 3e-6,
|
|
@@ -4921,12 +4926,8 @@ const PREFETCHED_CLAUDE_PRICING = {
|
|
|
4921
4926
|
"cache_creation_input_token_cost": 375e-8,
|
|
4922
4927
|
"cache_read_input_token_cost": 3e-7,
|
|
4923
4928
|
"max_tokens": 64e3,
|
|
4924
|
-
"max_input_tokens":
|
|
4925
|
-
"max_output_tokens": 64e3
|
|
4926
|
-
"input_cost_per_token_above_200k_tokens": 6e-6,
|
|
4927
|
-
"output_cost_per_token_above_200k_tokens": 225e-7,
|
|
4928
|
-
"cache_creation_input_token_cost_above_200k_tokens": 75e-7,
|
|
4929
|
-
"cache_read_input_token_cost_above_200k_tokens": 6e-7
|
|
4929
|
+
"max_input_tokens": 1e6,
|
|
4930
|
+
"max_output_tokens": 64e3
|
|
4930
4931
|
},
|
|
4931
4932
|
"anthropic.claude-sonnet-4-20250514-v1:0": {
|
|
4932
4933
|
"input_cost_per_token": 3e-6,
|
|
@@ -4968,24 +4969,6 @@ const PREFETCHED_CLAUDE_PRICING = {
|
|
|
4968
4969
|
"max_input_tokens": 1e5,
|
|
4969
4970
|
"max_output_tokens": 8191
|
|
4970
4971
|
},
|
|
4971
|
-
"claude-3-5-haiku-20241022": {
|
|
4972
|
-
"input_cost_per_token": 8e-7,
|
|
4973
|
-
"output_cost_per_token": 4e-6,
|
|
4974
|
-
"cache_creation_input_token_cost": 1e-6,
|
|
4975
|
-
"cache_read_input_token_cost": 8e-8,
|
|
4976
|
-
"max_tokens": 8192,
|
|
4977
|
-
"max_input_tokens": 2e5,
|
|
4978
|
-
"max_output_tokens": 8192
|
|
4979
|
-
},
|
|
4980
|
-
"claude-3-5-haiku-latest": {
|
|
4981
|
-
"input_cost_per_token": 1e-6,
|
|
4982
|
-
"output_cost_per_token": 5e-6,
|
|
4983
|
-
"cache_creation_input_token_cost": 125e-8,
|
|
4984
|
-
"cache_read_input_token_cost": 1e-7,
|
|
4985
|
-
"max_tokens": 8192,
|
|
4986
|
-
"max_input_tokens": 2e5,
|
|
4987
|
-
"max_output_tokens": 8192
|
|
4988
|
-
},
|
|
4989
4972
|
"claude-haiku-4-5-20251001": {
|
|
4990
4973
|
"input_cost_per_token": 1e-6,
|
|
4991
4974
|
"output_cost_per_token": 5e-6,
|
|
@@ -5004,33 +4987,6 @@ const PREFETCHED_CLAUDE_PRICING = {
|
|
|
5004
4987
|
"max_input_tokens": 2e5,
|
|
5005
4988
|
"max_output_tokens": 64e3
|
|
5006
4989
|
},
|
|
5007
|
-
"claude-3-5-sonnet-20240620": {
|
|
5008
|
-
"input_cost_per_token": 3e-6,
|
|
5009
|
-
"output_cost_per_token": 15e-6,
|
|
5010
|
-
"cache_creation_input_token_cost": 375e-8,
|
|
5011
|
-
"cache_read_input_token_cost": 3e-7,
|
|
5012
|
-
"max_tokens": 8192,
|
|
5013
|
-
"max_input_tokens": 2e5,
|
|
5014
|
-
"max_output_tokens": 8192
|
|
5015
|
-
},
|
|
5016
|
-
"claude-3-5-sonnet-20241022": {
|
|
5017
|
-
"input_cost_per_token": 3e-6,
|
|
5018
|
-
"output_cost_per_token": 15e-6,
|
|
5019
|
-
"cache_creation_input_token_cost": 375e-8,
|
|
5020
|
-
"cache_read_input_token_cost": 3e-7,
|
|
5021
|
-
"max_tokens": 8192,
|
|
5022
|
-
"max_input_tokens": 2e5,
|
|
5023
|
-
"max_output_tokens": 8192
|
|
5024
|
-
},
|
|
5025
|
-
"claude-3-5-sonnet-latest": {
|
|
5026
|
-
"input_cost_per_token": 3e-6,
|
|
5027
|
-
"output_cost_per_token": 15e-6,
|
|
5028
|
-
"cache_creation_input_token_cost": 375e-8,
|
|
5029
|
-
"cache_read_input_token_cost": 3e-7,
|
|
5030
|
-
"max_tokens": 8192,
|
|
5031
|
-
"max_input_tokens": 2e5,
|
|
5032
|
-
"max_output_tokens": 8192
|
|
5033
|
-
},
|
|
5034
4990
|
"claude-3-7-sonnet-20250219": {
|
|
5035
4991
|
"input_cost_per_token": 3e-6,
|
|
5036
4992
|
"output_cost_per_token": 15e-6,
|
|
@@ -5040,15 +4996,6 @@ const PREFETCHED_CLAUDE_PRICING = {
|
|
|
5040
4996
|
"max_input_tokens": 2e5,
|
|
5041
4997
|
"max_output_tokens": 64e3
|
|
5042
4998
|
},
|
|
5043
|
-
"claude-3-7-sonnet-latest": {
|
|
5044
|
-
"input_cost_per_token": 3e-6,
|
|
5045
|
-
"output_cost_per_token": 15e-6,
|
|
5046
|
-
"cache_creation_input_token_cost": 375e-8,
|
|
5047
|
-
"cache_read_input_token_cost": 3e-7,
|
|
5048
|
-
"max_tokens": 64e3,
|
|
5049
|
-
"max_input_tokens": 2e5,
|
|
5050
|
-
"max_output_tokens": 64e3
|
|
5051
|
-
},
|
|
5052
4999
|
"claude-3-haiku-20240307": {
|
|
5053
5000
|
"input_cost_per_token": 25e-8,
|
|
5054
5001
|
"output_cost_per_token": 125e-8,
|
|
@@ -5067,15 +5014,6 @@ const PREFETCHED_CLAUDE_PRICING = {
|
|
|
5067
5014
|
"max_input_tokens": 2e5,
|
|
5068
5015
|
"max_output_tokens": 4096
|
|
5069
5016
|
},
|
|
5070
|
-
"claude-3-opus-latest": {
|
|
5071
|
-
"input_cost_per_token": 15e-6,
|
|
5072
|
-
"output_cost_per_token": 75e-6,
|
|
5073
|
-
"cache_creation_input_token_cost": 1875e-8,
|
|
5074
|
-
"cache_read_input_token_cost": 15e-7,
|
|
5075
|
-
"max_tokens": 4096,
|
|
5076
|
-
"max_input_tokens": 2e5,
|
|
5077
|
-
"max_output_tokens": 4096
|
|
5078
|
-
},
|
|
5079
5017
|
"claude-4-opus-20250514": {
|
|
5080
5018
|
"input_cost_per_token": 15e-6,
|
|
5081
5019
|
"output_cost_per_token": 75e-6,
|
|
@@ -5130,12 +5068,8 @@ const PREFETCHED_CLAUDE_PRICING = {
|
|
|
5130
5068
|
"cache_creation_input_token_cost": 375e-8,
|
|
5131
5069
|
"cache_read_input_token_cost": 3e-7,
|
|
5132
5070
|
"max_tokens": 64e3,
|
|
5133
|
-
"max_input_tokens":
|
|
5134
|
-
"max_output_tokens": 64e3
|
|
5135
|
-
"input_cost_per_token_above_200k_tokens": 6e-6,
|
|
5136
|
-
"output_cost_per_token_above_200k_tokens": 225e-7,
|
|
5137
|
-
"cache_creation_input_token_cost_above_200k_tokens": 75e-7,
|
|
5138
|
-
"cache_read_input_token_cost_above_200k_tokens": 6e-7
|
|
5071
|
+
"max_input_tokens": 1e6,
|
|
5072
|
+
"max_output_tokens": 64e3
|
|
5139
5073
|
},
|
|
5140
5074
|
"claude-sonnet-4-5-20250929-v1:0": {
|
|
5141
5075
|
"input_cost_per_token": 3e-6,
|
|
@@ -5203,10 +5137,6 @@ const PREFETCHED_CLAUDE_PRICING = {
|
|
|
5203
5137
|
"max_tokens": 128e3,
|
|
5204
5138
|
"max_input_tokens": 1e6,
|
|
5205
5139
|
"max_output_tokens": 128e3,
|
|
5206
|
-
"input_cost_per_token_above_200k_tokens": 1e-5,
|
|
5207
|
-
"output_cost_per_token_above_200k_tokens": 375e-7,
|
|
5208
|
-
"cache_creation_input_token_cost_above_200k_tokens": 125e-7,
|
|
5209
|
-
"cache_read_input_token_cost_above_200k_tokens": 1e-6,
|
|
5210
5140
|
"provider_specific_entry": { "fast": 6 }
|
|
5211
5141
|
},
|
|
5212
5142
|
"claude-opus-4-6-20260205": {
|
|
@@ -5217,10 +5147,26 @@ const PREFETCHED_CLAUDE_PRICING = {
|
|
|
5217
5147
|
"max_tokens": 128e3,
|
|
5218
5148
|
"max_input_tokens": 1e6,
|
|
5219
5149
|
"max_output_tokens": 128e3,
|
|
5220
|
-
"
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
"
|
|
5150
|
+
"provider_specific_entry": { "fast": 6 }
|
|
5151
|
+
},
|
|
5152
|
+
"claude-opus-4-7": {
|
|
5153
|
+
"input_cost_per_token": 5e-6,
|
|
5154
|
+
"output_cost_per_token": 25e-6,
|
|
5155
|
+
"cache_creation_input_token_cost": 625e-8,
|
|
5156
|
+
"cache_read_input_token_cost": 5e-7,
|
|
5157
|
+
"max_tokens": 128e3,
|
|
5158
|
+
"max_input_tokens": 1e6,
|
|
5159
|
+
"max_output_tokens": 128e3,
|
|
5160
|
+
"provider_specific_entry": { "fast": 6 }
|
|
5161
|
+
},
|
|
5162
|
+
"claude-opus-4-7-20260416": {
|
|
5163
|
+
"input_cost_per_token": 5e-6,
|
|
5164
|
+
"output_cost_per_token": 25e-6,
|
|
5165
|
+
"cache_creation_input_token_cost": 625e-8,
|
|
5166
|
+
"cache_read_input_token_cost": 5e-7,
|
|
5167
|
+
"max_tokens": 128e3,
|
|
5168
|
+
"max_input_tokens": 1e6,
|
|
5169
|
+
"max_output_tokens": 128e3,
|
|
5224
5170
|
"provider_specific_entry": { "fast": 6 }
|
|
5225
5171
|
},
|
|
5226
5172
|
"claude-sonnet-4-20250514": {
|
package/dist/data-loader.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as transcriptUsageSchema, S as transcriptMessageSchema, T as weeklyUsageSchema, _ as loadWeeklyUsageData, a as dailyUsageSchema, b as sessionUsageSchema, c as getEarliestTimestamp, d as loadBucketUsageData, f as loadDailyUsageData, g as loadSessionUsageById, h as loadSessionData, i as createUniqueHash, l as getUsageLimitResetTime, m as loadSessionBlockData, n as calculateContextTokens, o as extractProjectFromPath, p as loadMonthlyUsageData, r as calculateCostForEntry, s as getClaudePaths, t as bucketUsageSchema, u as globUsageFiles, v as modelBreakdownSchema, w as usageDataSchema, x as sortFilesByTimestamp, y as monthlyUsageSchema } from "./data-loader-
|
|
1
|
+
import { C as transcriptUsageSchema, S as transcriptMessageSchema, T as weeklyUsageSchema, _ as loadWeeklyUsageData, a as dailyUsageSchema, b as sessionUsageSchema, c as getEarliestTimestamp, d as loadBucketUsageData, f as loadDailyUsageData, g as loadSessionUsageById, h as loadSessionData, i as createUniqueHash, l as getUsageLimitResetTime, m as loadSessionBlockData, n as calculateContextTokens, o as extractProjectFromPath, p as loadMonthlyUsageData, r as calculateCostForEntry, s as getClaudePaths, t as bucketUsageSchema, u as globUsageFiles, v as modelBreakdownSchema, w as usageDataSchema, x as sortFilesByTimestamp, y as monthlyUsageSchema } from "./data-loader-9ESMosno.js";
|
|
2
2
|
import "./_types-DY3gqCWm.js";
|
|
3
|
-
import "./logger-
|
|
3
|
+
import "./logger-D9FuoYJ7.js";
|
|
4
4
|
export { bucketUsageSchema, calculateContextTokens, calculateCostForEntry, createUniqueHash, dailyUsageSchema, extractProjectFromPath, getClaudePaths, getEarliestTimestamp, getUsageLimitResetTime, globUsageFiles, loadBucketUsageData, loadDailyUsageData, loadMonthlyUsageData, loadSessionBlockData, loadSessionData, loadSessionUsageById, loadWeeklyUsageData, modelBreakdownSchema, monthlyUsageSchema, sessionUsageSchema, sortFilesByTimestamp, transcriptMessageSchema, transcriptUsageSchema, usageDataSchema, weeklyUsageSchema };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as PricingFetcher, J as CLAUDE_PROJECTS_DIR_NAME, W as _usingCtx, X as DEBUG_MATCH_THRESHOLD_PERCENT, at as try_, ft as isFailure, it as unwrap, rt as glob, s as getClaudePaths, tt as USAGE_DATA_GLOB_PATTERN, w as usageDataSchema } from "./data-loader-
|
|
1
|
+
import { A as PricingFetcher, J as CLAUDE_PROJECTS_DIR_NAME, W as _usingCtx, X as DEBUG_MATCH_THRESHOLD_PERCENT, at as try_, ft as isFailure, it as unwrap, rt as glob, s as getClaudePaths, tt as USAGE_DATA_GLOB_PATTERN, w as usageDataSchema } from "./data-loader-9ESMosno.js";
|
|
2
2
|
import { F as safeParse } from "./_types-DY3gqCWm.js";
|
|
3
|
-
import { n as logger } from "./logger-
|
|
3
|
+
import { n as logger } from "./logger-D9FuoYJ7.js";
|
|
4
4
|
import { readFile } from "node:fs/promises";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
async function detectMismatches(claudePath) {
|
package/dist/debug.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./data-loader-
|
|
1
|
+
import "./data-loader-9ESMosno.js";
|
|
2
2
|
import "./_types-DY3gqCWm.js";
|
|
3
|
-
import "./logger-
|
|
4
|
-
import { n as printMismatchReport, t as detectMismatches } from "./debug-
|
|
3
|
+
import "./logger-D9FuoYJ7.js";
|
|
4
|
+
import { n as printMismatchReport, t as detectMismatches } from "./debug-DvI5DUKR.js";
|
|
5
5
|
export { detectMismatches, printMismatchReport };
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as DEFAULT_RECENT_DAYS, B as pushBreakdownRows, D as calculateBurnRate, E as DEFAULT_SESSION_DURATION_HOURS, F as formatDateCompact, G as BLOCKS_COMPACT_WIDTH_THRESHOLD, H as getFileModifiedTime, I as formatModelsDisplayMultiline, K as BLOCKS_DEFAULT_TERMINAL_WIDTH, L as formatNumber, M as addEmptySeparatorRow, N as createUsageReportTable, O as filterRecentBlocks, P as formatCurrency, Q as DEFAULT_LOCALE, R as formatTotalsRow, U as unreachable, V as require_picocolors, W as _usingCtx, Y as CONFIG_FILE_NAME, Z as DEFAULT_CONTEXT_USAGE_THRESHOLDS, _ as loadWeeklyUsageData, at as try_, ct as inspectError, dt as isSuccess, et as DEFAULT_REFRESH_INTERVAL_SECONDS, f as loadDailyUsageData, ft as isFailure, g as loadSessionUsageById, h as loadSessionData, it as unwrap, j as ResponsiveTable, k as projectBlockUsage, lt as inspect, m as loadSessionBlockData, mt as __toESM, n as calculateContextTokens, nt as WEEK_DAYS, ot as pipe, p as loadMonthlyUsageData, pt as toArray, q as BLOCKS_WARNING_THRESHOLD, s as getClaudePaths, st as map$1, ut as succeed, z as formatUsageDataRow } from "./data-loader-
|
|
2
|
+
import { $ as DEFAULT_RECENT_DAYS, B as pushBreakdownRows, D as calculateBurnRate, E as DEFAULT_SESSION_DURATION_HOURS, F as formatDateCompact, G as BLOCKS_COMPACT_WIDTH_THRESHOLD, H as getFileModifiedTime, I as formatModelsDisplayMultiline, K as BLOCKS_DEFAULT_TERMINAL_WIDTH, L as formatNumber, M as addEmptySeparatorRow, N as createUsageReportTable, O as filterRecentBlocks, P as formatCurrency, Q as DEFAULT_LOCALE, R as formatTotalsRow, U as unreachable, V as require_picocolors, W as _usingCtx, Y as CONFIG_FILE_NAME, Z as DEFAULT_CONTEXT_USAGE_THRESHOLDS, _ as loadWeeklyUsageData, at as try_, ct as inspectError, dt as isSuccess, et as DEFAULT_REFRESH_INTERVAL_SECONDS, f as loadDailyUsageData, ft as isFailure, g as loadSessionUsageById, h as loadSessionData, it as unwrap, j as ResponsiveTable, k as projectBlockUsage, lt as inspect, m as loadSessionBlockData, mt as __toESM, n as calculateContextTokens, nt as WEEK_DAYS, ot as pipe, p as loadMonthlyUsageData, pt as toArray, q as BLOCKS_WARNING_THRESHOLD, s as getClaudePaths, st as map$1, ut as succeed, z as formatUsageDataRow } from "./data-loader-9ESMosno.js";
|
|
3
3
|
import { B as getTotalTokens, D as maxValue, E as integer$1, F as safeParse, I as string, L as transform, M as parse$1, O as minValue, P as pipe$1, R as trim, T as flatten, d as filterDateSchema, k as number, n as SortOrders, t as CostModes, w as check, y as statuslineHookJsonSchema, z as union } from "./_types-DY3gqCWm.js";
|
|
4
4
|
import { n as createTotalsObject, t as calculateTotals } from "./calculate-cost-DWGfKMSD.js";
|
|
5
|
-
import { a as version, i as name, n as logger, r as description, t as log } from "./logger-
|
|
6
|
-
import { n as printMismatchReport, t as detectMismatches } from "./debug-
|
|
5
|
+
import { a as version, i as name, n as logger, r as description, t as log } from "./logger-D9FuoYJ7.js";
|
|
6
|
+
import { n as printMismatchReport, t as detectMismatches } from "./debug-DvI5DUKR.js";
|
|
7
7
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
8
8
|
import a from "node:fs/promises";
|
|
9
9
|
import path, { join } from "node:path";
|
|
@@ -866,7 +866,7 @@ function createLogger(name$1) {
|
|
|
866
866
|
}
|
|
867
867
|
const log = console.log;
|
|
868
868
|
var name = "ccusage";
|
|
869
|
-
var version = "18.0.
|
|
869
|
+
var version = "18.0.11";
|
|
870
870
|
var description = "Usage analysis tool for Claude Code";
|
|
871
871
|
const logger = createLogger(name);
|
|
872
872
|
const log$1 = log;
|
package/dist/logger.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as logger, t as log } from "./logger-
|
|
1
|
+
import { n as logger, t as log } from "./logger-D9FuoYJ7.js";
|
|
2
2
|
export { log, logger };
|