ccusage 12.3.1 → 12.3.2

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/README.md CHANGED
@@ -385,6 +385,26 @@ Or if you have ccusage installed globally:
385
385
 
386
386
  After adding this configuration, restart Claude Desktop. You'll then be able to use the ccusage tools within Claude to analyze your usage data.
387
387
 
388
+ #### Testing MCP Server
389
+
390
+ You can test the MCP server interactively using the MCP Inspector:
391
+
392
+ ```bash
393
+ # Test the MCP server with interactive web UI
394
+ bun run mcp
395
+ # or: npm run mcp
396
+
397
+ # Test specific MCP server command directly
398
+ bunx @modelcontextprotocol/inspector bunx ccusage mcp
399
+ ```
400
+
401
+ The MCP Inspector provides a web-based interface to:
402
+
403
+ - Test individual MCP tools (daily, monthly, session, blocks)
404
+ - Inspect tool schemas and parameters
405
+ - Debug server responses
406
+ - Export server configurations
407
+
388
408
  ## Output Example
389
409
 
390
410
  ### Daily Report
@@ -471,6 +491,8 @@ While the original approach uses DuckDB for analysis, this tool provides a more
471
491
 
472
492
  some projects use `ccusage` internally and provide additional features:
473
493
 
494
+ - [claude-usage-tracker-for-mac](https://github.com/penicillin0/claude-usage-tracker-for-mac) – macOS menu bar app to visualize Claude Code usage costs by [@penicillin0](https://github.com/penicillin0).
495
+
474
496
  ## Acknowledgments
475
497
 
476
498
  Thanks to [@milliondev](https://note.com/milliondev) for the original concept and approach to Claude Code usage analysis.
@@ -1,5 +1,5 @@
1
- import { PricingFetcher, __commonJSMin, __require, __toESM, arrayType, numberType, objectType, require_usingCtx, stringType } from "./pricing-fetcher--SyRxrWB.js";
2
- import { logger } from "./logger-BmTBrpMz.js";
1
+ import { PricingFetcher, __commonJSMin, __require, __toESM, arrayType, numberType, objectType, require_usingCtx, stringType } from "./pricing-fetcher-mFPZYGXl.js";
2
+ import { logger } from "./logger-BfzGx5lS.js";
3
3
  import a, { readFile } from "node:fs/promises";
4
4
  import F, { homedir } from "node:os";
5
5
  import path, { posix } from "node:path";
@@ -1,4 +1,4 @@
1
- import "./pricing-fetcher--SyRxrWB.js";
2
- import { calculateCostForEntry, createUniqueHash, dailyUsageSchema, formatDate, formatDateCompact, getDefaultClaudePath, getEarliestTimestamp, loadDailyUsageData, loadMonthlyUsageData, loadSessionBlockData, loadSessionData, modelBreakdownSchema, monthlyUsageSchema, sessionUsageSchema, sortFilesByTimestamp, usageDataSchema } from "./data-loader-BB7quSBW.js";
3
- import "./logger-BmTBrpMz.js";
1
+ import "./pricing-fetcher-mFPZYGXl.js";
2
+ import { calculateCostForEntry, createUniqueHash, dailyUsageSchema, formatDate, formatDateCompact, getDefaultClaudePath, getEarliestTimestamp, loadDailyUsageData, loadMonthlyUsageData, loadSessionBlockData, loadSessionData, modelBreakdownSchema, monthlyUsageSchema, sessionUsageSchema, sortFilesByTimestamp, usageDataSchema } from "./data-loader-i0_91kbD.js";
3
+ import "./logger-BfzGx5lS.js";
4
4
  export { calculateCostForEntry, createUniqueHash, dailyUsageSchema, formatDate, formatDateCompact, getDefaultClaudePath, getEarliestTimestamp, loadDailyUsageData, loadMonthlyUsageData, loadSessionBlockData, loadSessionData, modelBreakdownSchema, monthlyUsageSchema, sessionUsageSchema, sortFilesByTimestamp, usageDataSchema };
@@ -1,6 +1,6 @@
1
- import { PricingFetcher, __toESM, require_usingCtx } from "./pricing-fetcher--SyRxrWB.js";
2
- import { glob, usageDataSchema } from "./data-loader-BB7quSBW.js";
3
- import { logger } from "./logger-BmTBrpMz.js";
1
+ import { PricingFetcher, __toESM, require_usingCtx } from "./pricing-fetcher-mFPZYGXl.js";
2
+ import { glob, usageDataSchema } from "./data-loader-i0_91kbD.js";
3
+ import { logger } from "./logger-BfzGx5lS.js";
4
4
  import { readFile } from "node:fs/promises";
5
5
  import { homedir } from "node:os";
6
6
  import path from "node:path";
package/dist/debug.js CHANGED
@@ -1,5 +1,5 @@
1
- import "./pricing-fetcher--SyRxrWB.js";
2
- import "./data-loader-BB7quSBW.js";
3
- import "./logger-BmTBrpMz.js";
4
- import { detectMismatches, printMismatchReport } from "./debug-C8xwZHMS.js";
1
+ import "./pricing-fetcher-mFPZYGXl.js";
2
+ import "./data-loader-i0_91kbD.js";
3
+ import "./logger-BfzGx5lS.js";
4
+ import { detectMismatches, printMismatchReport } from "./debug-DUZvOm08.js";
5
5
  export { detectMismatches, printMismatchReport };
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- import { CostModes, SortOrders, __commonJSMin, __require, __toESM, dateSchema } from "./pricing-fetcher--SyRxrWB.js";
2
+ import { CostModes, SortOrders, __commonJSMin, __require, __toESM, dateSchema } from "./pricing-fetcher-mFPZYGXl.js";
3
3
  import { calculateTotals, createTotalsObject, getTotalTokens } from "./calculate-cost-D3IraeGW.js";
4
- import { DEFAULT_SESSION_DURATION_HOURS, calculateBurnRate, filterRecentBlocks, formatDateCompact, getDefaultClaudePath, loadDailyUsageData, loadMonthlyUsageData, loadSessionBlockData, loadSessionData, projectBlockUsage } from "./data-loader-BB7quSBW.js";
5
- import { description, log, logger, name, version } from "./logger-BmTBrpMz.js";
6
- import { detectMismatches, printMismatchReport } from "./debug-C8xwZHMS.js";
7
- import { createMcpHttpApp, createMcpServer, startMcpServerStdio } from "./mcp-CPBV7a41.js";
4
+ import { DEFAULT_SESSION_DURATION_HOURS, calculateBurnRate, filterRecentBlocks, formatDateCompact, getDefaultClaudePath, loadDailyUsageData, loadMonthlyUsageData, loadSessionBlockData, loadSessionData, projectBlockUsage } from "./data-loader-i0_91kbD.js";
5
+ import { description, log, logger, name, version } from "./logger-BfzGx5lS.js";
6
+ import { detectMismatches, printMismatchReport } from "./debug-DUZvOm08.js";
7
+ import { createMcpHttpApp, createMcpServer, startMcpServerStdio } from "./mcp-Bx-_DNLG.js";
8
8
  import process$1 from "node:process";
9
9
  import { createServer } from "node:http";
10
10
  import { Http2ServerRequest } from "node:http2";
@@ -951,7 +951,7 @@ function _getDefaultLogLevel() {
951
951
  }
952
952
  const consola = createConsola$1();
953
953
  var name = "ccusage";
954
- var version = "12.3.1";
954
+ var version = "12.3.2";
955
955
  var description = "Usage analysis tool for Claude Code";
956
956
  /**
957
957
  * Application logger instance with package name tag
package/dist/logger.js CHANGED
@@ -1,2 +1,2 @@
1
- import { log, logger } from "./logger-BmTBrpMz.js";
1
+ import { log, logger } from "./logger-BfzGx5lS.js";
2
2
  export { log, logger };
@@ -1,6 +1,6 @@
1
- import { ZodFirstPartyTypeKind, ZodOptional, ZodType, __commonJSMin, __toESM, arrayType, booleanType, dateSchema, discriminatedUnionType, enumType, literalType, numberType, objectType, optionalType, recordType, require_usingCtx, stringType, unionType, unknownType } from "./pricing-fetcher--SyRxrWB.js";
2
- import { getDefaultClaudePath, loadDailyUsageData, loadMonthlyUsageData, loadSessionBlockData, loadSessionData } from "./data-loader-BB7quSBW.js";
3
- import { name, version } from "./logger-BmTBrpMz.js";
1
+ import { ZodFirstPartyTypeKind, ZodOptional, ZodType, __commonJSMin, __toESM, arrayType, booleanType, dateSchema, discriminatedUnionType, enumType, literalType, numberType, objectType, optionalType, recordType, require_usingCtx, stringType, unionType, unknownType } from "./pricing-fetcher-mFPZYGXl.js";
2
+ import { getDefaultClaudePath, loadDailyUsageData, loadMonthlyUsageData, loadSessionBlockData, loadSessionData } from "./data-loader-i0_91kbD.js";
3
+ import { name, version } from "./logger-BfzGx5lS.js";
4
4
  import process from "node:process";
5
5
  const LATEST_PROTOCOL_VERSION = "2025-03-26";
6
6
  const SUPPORTED_PROTOCOL_VERSIONS = [
package/dist/mcp.js CHANGED
@@ -1,5 +1,5 @@
1
- import "./pricing-fetcher--SyRxrWB.js";
2
- import "./data-loader-BB7quSBW.js";
3
- import "./logger-BmTBrpMz.js";
4
- import { createMcpHttpApp, createMcpServer, startMcpServerStdio } from "./mcp-CPBV7a41.js";
1
+ import "./pricing-fetcher-mFPZYGXl.js";
2
+ import "./data-loader-i0_91kbD.js";
3
+ import "./logger-BfzGx5lS.js";
4
+ import { createMcpHttpApp, createMcpServer, startMcpServerStdio } from "./mcp-Bx-_DNLG.js";
5
5
  export { createMcpHttpApp, createMcpServer, startMcpServerStdio };
@@ -1,4 +1,4 @@
1
- import { logger } from "./logger-BmTBrpMz.js";
1
+ import { logger } from "./logger-BfzGx5lS.js";
2
2
  import { createRequire } from "node:module";
3
3
  var __create = Object.create;
4
4
  var __defProp = Object.defineProperty;
@@ -1,3 +1,3 @@
1
- import { PricingFetcher } from "./pricing-fetcher--SyRxrWB.js";
2
- import "./logger-BmTBrpMz.js";
1
+ import { PricingFetcher } from "./pricing-fetcher-mFPZYGXl.js";
2
+ import "./logger-BfzGx5lS.js";
3
3
  export { PricingFetcher };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ccusage",
3
3
  "type": "module",
4
- "version": "12.3.1",
4
+ "version": "12.3.2",
5
5
  "description": "Usage analysis tool for Claude Code",
6
6
  "author": "ryoppippi",
7
7
  "license": "MIT",