ccusage 13.0.0 → 13.0.1
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 +11 -12
- package/dist/{data-loader-B8gFJPfi.js → data-loader-D0kGuKxU.js} +2 -2
- package/dist/data-loader.js +3 -3
- package/dist/{debug-CL2Shx1n.js → debug-DBezzOxe.js} +3 -3
- package/dist/debug.js +4 -4
- package/dist/index.js +5 -5
- package/dist/{logger-B4PJ298G.js → logger-Pv_1kl_H.js} +1 -1
- package/dist/logger.js +1 -1
- package/dist/{mcp-Bw62xMEM.js → mcp-lSzQickg.js} +3 -3
- package/dist/mcp.js +4 -4
- package/dist/{pricing-fetcher-Cx71zrV9.js → pricing-fetcher-Dc_QCa7C.js} +1 -1
- package/dist/pricing-fetcher.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
# ccusage
|
|
2
|
-
|
|
3
1
|
<div align="center">
|
|
4
|
-
<img src="docs/logo.
|
|
2
|
+
<img src="https://cdn.jsdelivr.net/gh/ryoppippi/ccusage@main/docs/logo.svg" alt="ccusage logo" width="256" height="256">
|
|
3
|
+
<h1>ccusage</h1>
|
|
5
4
|
</div>
|
|
6
5
|
|
|
7
6
|
[](https://npmjs.com/package/ccusage)
|
|
8
7
|
[](https://tanstack.com/stats/npm?packageGroups=%5B%7B%22packages%22:%5B%7B%22name%22:%22ccusage%22%7D%5D%7D%5D&range=30-days&transform=none&binType=daily&showDataMode=all&height=400)
|
|
9
8
|
[](https://packagephobia.com/result?p=ccusage)
|
|
10
|
-
[](https://deepwiki.com/ryoppippi/ccusage)<!-- DeepWiki badge generated by https://deepwiki.ryoppippi.com/ -->
|
|
9
|
+
[](https://deepwiki.com/ryoppippi/ccusage) <!-- DeepWiki badge generated by https://deepwiki.ryoppippi.com/ -->
|
|
11
10
|
[](https://github.com/hesreallyhim/awesome-claude-code)
|
|
12
11
|
|
|
13
12
|
<div align="center">
|
|
14
|
-
<img src="https://
|
|
13
|
+
<img src="https://cdn.jsdelivr.net/gh/ryoppippi/ccusage@main/docs/screenshot.png">
|
|
15
14
|
</div>
|
|
16
15
|
|
|
17
16
|
> **ccusage(claude-code-usage)**
|
|
@@ -27,11 +26,11 @@ Inspired by [this article](https://note.com/milliondev/n/n1d018da2d769) about tr
|
|
|
27
26
|
|
|
28
27
|
# English
|
|
29
28
|
|
|
30
|
-
https://github.com/user-attachments/assets/7a00f2f3-82a7-41b6-a8da-e04b76b5e35a
|
|
29
|
+
<https://github.com/user-attachments/assets/7a00f2f3-82a7-41b6-a8da-e04b76b5e35a>
|
|
31
30
|
|
|
32
31
|
# 日本語
|
|
33
32
|
|
|
34
|
-
https://github.com/user-attachments/assets/db09fc06-bf57-4d37-9b06-514851bcc1d0
|
|
33
|
+
<https://github.com/user-attachments/assets/db09fc06-bf57-4d37-9b06-514851bcc1d0>
|
|
35
34
|
|
|
36
35
|
</details>
|
|
37
36
|
|
|
@@ -280,7 +279,7 @@ The blocks report helps you understand Claude Code's 5-hour rolling session wind
|
|
|
280
279
|
- Helps track if you're approaching token limits within a session
|
|
281
280
|
- The `-t max` option automatically uses your highest previous block as the limit
|
|
282
281
|
|
|
283
|
-
#### Blocks-specific options
|
|
282
|
+
#### Blocks-specific options
|
|
284
283
|
|
|
285
284
|
- `-t, --token-limit <number|max>`: Set token limit for quota warnings (use "max" for highest previous block)
|
|
286
285
|
- `-a, --active`: Show only active block with detailed projections
|
|
@@ -353,7 +352,7 @@ Available MCP tools:
|
|
|
353
352
|
#### Claude Desktop Configuration Example
|
|
354
353
|
|
|
355
354
|
<div align="center">
|
|
356
|
-
<img src="https://
|
|
355
|
+
<img src="https://cdn.jsdelivr.net/gh/ryoppippi/ccusage@main/docs/mcp-claude-desktop.avif">
|
|
357
356
|
</div>
|
|
358
357
|
|
|
359
358
|
To use ccusage MCP with Claude Desktop, add this to your Claude Desktop configuration file:
|
|
@@ -509,9 +508,9 @@ Thanks to [@milliondev](https://note.com/milliondev) for the original concept an
|
|
|
509
508
|
## Sponsors
|
|
510
509
|
|
|
511
510
|
<p align="center">
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
511
|
+
<a href="https://github.com/sponsors/ryoppippi">
|
|
512
|
+
<img src="https://cdn.jsdelivr.net/gh/ryoppippi/sponsors/sponsors.svg">
|
|
513
|
+
</a>
|
|
515
514
|
</p>
|
|
516
515
|
|
|
517
516
|
## Star History
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CLAUDE_PROJECTS_DIR_NAME, DEFAULT_CLAUDE_CODE_PATH, DEFAULT_RECENT_DAYS, PricingFetcher, USAGE_DATA_GLOB_PATTERN, USER_HOME_DIR, __commonJSMin, __require, __toESM, require_usingCtx } from "./pricing-fetcher-
|
|
1
|
+
import { CLAUDE_PROJECTS_DIR_NAME, DEFAULT_CLAUDE_CODE_PATH, DEFAULT_RECENT_DAYS, PricingFetcher, USAGE_DATA_GLOB_PATTERN, USER_HOME_DIR, __commonJSMin, __require, __toESM, require_usingCtx } from "./pricing-fetcher-Dc_QCa7C.js";
|
|
2
2
|
import { activityDateSchema, arrayType, createDailyDate, createMonthlyDate, createProjectPath, createSessionId, dailyDateSchema, isoTimestampSchema, messageIdSchema, modelNameSchema, monthlyDateSchema, numberType, objectType, projectPathSchema, requestIdSchema, sessionIdSchema, versionSchema } from "./types.internal-CX7kpidj.js";
|
|
3
|
-
import { logger } from "./logger-
|
|
3
|
+
import { logger } from "./logger-Pv_1kl_H.js";
|
|
4
4
|
import a, { readFile } from "node:fs/promises";
|
|
5
5
|
import F, { homedir } from "node:os";
|
|
6
6
|
import path, { posix } from "node:path";
|
package/dist/data-loader.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./pricing-fetcher-
|
|
1
|
+
import "./pricing-fetcher-Dc_QCa7C.js";
|
|
2
2
|
import "./types.internal-CX7kpidj.js";
|
|
3
|
-
import { calculateCostForEntry, createUniqueHash, dailyUsageSchema, formatDate, formatDateCompact, getDefaultClaudePath, getEarliestTimestamp, loadDailyUsageData, loadMonthlyUsageData, loadSessionBlockData, loadSessionData, modelBreakdownSchema, monthlyUsageSchema, sessionUsageSchema, sortFilesByTimestamp, usageDataSchema } from "./data-loader-
|
|
4
|
-
import "./logger-
|
|
3
|
+
import { calculateCostForEntry, createUniqueHash, dailyUsageSchema, formatDate, formatDateCompact, getDefaultClaudePath, getEarliestTimestamp, loadDailyUsageData, loadMonthlyUsageData, loadSessionBlockData, loadSessionData, modelBreakdownSchema, monthlyUsageSchema, sessionUsageSchema, sortFilesByTimestamp, usageDataSchema } from "./data-loader-D0kGuKxU.js";
|
|
4
|
+
import "./logger-Pv_1kl_H.js";
|
|
5
5
|
export { calculateCostForEntry, createUniqueHash, dailyUsageSchema, formatDate, formatDateCompact, getDefaultClaudePath, getEarliestTimestamp, loadDailyUsageData, loadMonthlyUsageData, loadSessionBlockData, loadSessionData, modelBreakdownSchema, monthlyUsageSchema, sessionUsageSchema, sortFilesByTimestamp, usageDataSchema };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CLAUDE_PROJECTS_DIR_NAME, DEBUG_MATCH_THRESHOLD_PERCENT, DEFAULT_CLAUDE_CODE_PATH, PricingFetcher, USAGE_DATA_GLOB_PATTERN, USER_HOME_DIR, __toESM, require_usingCtx } from "./pricing-fetcher-
|
|
2
|
-
import { glob, usageDataSchema } from "./data-loader-
|
|
3
|
-
import { logger } from "./logger-
|
|
1
|
+
import { CLAUDE_PROJECTS_DIR_NAME, DEBUG_MATCH_THRESHOLD_PERCENT, DEFAULT_CLAUDE_CODE_PATH, PricingFetcher, USAGE_DATA_GLOB_PATTERN, USER_HOME_DIR, __toESM, require_usingCtx } from "./pricing-fetcher-Dc_QCa7C.js";
|
|
2
|
+
import { glob, usageDataSchema } from "./data-loader-D0kGuKxU.js";
|
|
3
|
+
import { logger } from "./logger-Pv_1kl_H.js";
|
|
4
4
|
import { readFile } from "node:fs/promises";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
var import_usingCtx = __toESM(require_usingCtx(), 1);
|
package/dist/debug.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./pricing-fetcher-
|
|
1
|
+
import "./pricing-fetcher-Dc_QCa7C.js";
|
|
2
2
|
import "./types.internal-CX7kpidj.js";
|
|
3
|
-
import "./data-loader-
|
|
4
|
-
import "./logger-
|
|
5
|
-
import { detectMismatches, printMismatchReport } from "./debug-
|
|
3
|
+
import "./data-loader-D0kGuKxU.js";
|
|
4
|
+
import "./logger-Pv_1kl_H.js";
|
|
5
|
+
import { detectMismatches, printMismatchReport } from "./debug-DBezzOxe.js";
|
|
6
6
|
export { detectMismatches, printMismatchReport };
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { BLOCKS_COMPACT_WIDTH_THRESHOLD, BLOCKS_DEFAULT_TERMINAL_WIDTH, BLOCKS_WARNING_THRESHOLD, DEFAULT_RECENT_DAYS, MCP_DEFAULT_PORT, __commonJSMin, __require, __toESM } from "./pricing-fetcher-
|
|
2
|
+
import { BLOCKS_COMPACT_WIDTH_THRESHOLD, BLOCKS_DEFAULT_TERMINAL_WIDTH, BLOCKS_WARNING_THRESHOLD, DEFAULT_RECENT_DAYS, MCP_DEFAULT_PORT, __commonJSMin, __require, __toESM } from "./pricing-fetcher-Dc_QCa7C.js";
|
|
3
3
|
import { CostModes, SortOrders, dateSchema } from "./types.internal-CX7kpidj.js";
|
|
4
4
|
import { calculateTotals, createTotalsObject, getTotalTokens } from "./calculate-cost-CoS7we68.js";
|
|
5
|
-
import { DEFAULT_SESSION_DURATION_HOURS, calculateBurnRate, filterRecentBlocks, formatDateCompact, getDefaultClaudePath, loadDailyUsageData, loadMonthlyUsageData, loadSessionBlockData, loadSessionData, projectBlockUsage, uniq } from "./data-loader-
|
|
6
|
-
import { description, log, logger, name, version } from "./logger-
|
|
7
|
-
import { detectMismatches, printMismatchReport } from "./debug-
|
|
8
|
-
import { createMcpHttpApp, createMcpServer, startMcpServerStdio } from "./mcp-
|
|
5
|
+
import { DEFAULT_SESSION_DURATION_HOURS, calculateBurnRate, filterRecentBlocks, formatDateCompact, getDefaultClaudePath, loadDailyUsageData, loadMonthlyUsageData, loadSessionBlockData, loadSessionData, projectBlockUsage, uniq } from "./data-loader-D0kGuKxU.js";
|
|
6
|
+
import { description, log, logger, name, version } from "./logger-Pv_1kl_H.js";
|
|
7
|
+
import { detectMismatches, printMismatchReport } from "./debug-DBezzOxe.js";
|
|
8
|
+
import { createMcpHttpApp, createMcpServer, startMcpServerStdio } from "./mcp-lSzQickg.js";
|
|
9
9
|
import process$1 from "node:process";
|
|
10
10
|
import { createServer } from "node:http";
|
|
11
11
|
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 = "13.0.
|
|
954
|
+
var version = "13.0.1";
|
|
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-
|
|
1
|
+
import { log, logger } from "./logger-Pv_1kl_H.js";
|
|
2
2
|
export { log, logger };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { __commonJSMin, __toESM, require_usingCtx } from "./pricing-fetcher-
|
|
1
|
+
import { __commonJSMin, __toESM, require_usingCtx } from "./pricing-fetcher-Dc_QCa7C.js";
|
|
2
2
|
import { ZodFirstPartyTypeKind, ZodOptional, ZodType, arrayType, booleanType, dateSchema, discriminatedUnionType, enumType, literalType, numberType, objectType, optionalType, recordType, stringType, unionType, unknownType } from "./types.internal-CX7kpidj.js";
|
|
3
|
-
import { getDefaultClaudePath, loadDailyUsageData, loadMonthlyUsageData, loadSessionBlockData, loadSessionData } from "./data-loader-
|
|
4
|
-
import { name, version } from "./logger-
|
|
3
|
+
import { getDefaultClaudePath, loadDailyUsageData, loadMonthlyUsageData, loadSessionBlockData, loadSessionData } from "./data-loader-D0kGuKxU.js";
|
|
4
|
+
import { name, version } from "./logger-Pv_1kl_H.js";
|
|
5
5
|
import process from "node:process";
|
|
6
6
|
const LATEST_PROTOCOL_VERSION = "2025-03-26";
|
|
7
7
|
const SUPPORTED_PROTOCOL_VERSIONS = [
|
package/dist/mcp.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./pricing-fetcher-
|
|
1
|
+
import "./pricing-fetcher-Dc_QCa7C.js";
|
|
2
2
|
import "./types.internal-CX7kpidj.js";
|
|
3
|
-
import "./data-loader-
|
|
4
|
-
import "./logger-
|
|
5
|
-
import { createMcpHttpApp, createMcpServer, startMcpServerStdio } from "./mcp-
|
|
3
|
+
import "./data-loader-D0kGuKxU.js";
|
|
4
|
+
import "./logger-Pv_1kl_H.js";
|
|
5
|
+
import { createMcpHttpApp, createMcpServer, startMcpServerStdio } from "./mcp-lSzQickg.js";
|
|
6
6
|
export { createMcpHttpApp, createMcpServer, startMcpServerStdio };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { modelPricingSchema } from "./types.internal-CX7kpidj.js";
|
|
2
|
-
import { logger } from "./logger-
|
|
2
|
+
import { logger } from "./logger-Pv_1kl_H.js";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import { homedir } from "node:os";
|
|
5
5
|
var __create = Object.create;
|
package/dist/pricing-fetcher.js
CHANGED