ccusage 16.2.4 → 17.0.0
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 +20 -35
- package/config-schema.json +0 -33
- package/dist/_types-CV6z8-9_.js +583 -0
- package/dist/{calculate-cost-BDqO4yWA.js → calculate-cost-CX9KwEZt.js} +1 -1
- package/dist/calculate-cost.d.ts +1 -4
- package/dist/calculate-cost.js +2 -3
- package/dist/data-loader-DQtk3Va0.js +3733 -0
- package/dist/data-loader-D_hlygEz.d.ts +2307 -0
- package/dist/data-loader.d.ts +1 -2
- package/dist/data-loader.js +3 -5
- package/dist/debug-Bn_uiKiR.js +148 -0
- package/dist/debug.d.ts +8 -0
- package/dist/debug.js +4 -6
- package/dist/index.d.ts +0 -0
- package/dist/index.js +2839 -2061
- package/dist/{logger-Df86rWXR.js → logger-1M8m84B7.js} +179 -74
- package/dist/logger.d.ts +11 -7
- package/dist/logger.js +1 -1
- package/dist/{prompt-DsUFNEY7.js → prompt-BeRmYuGP.js} +49 -28
- package/package.json +4 -4
- package/dist/_token-utils-WjkbrjKv.js +0 -5
- package/dist/_types-DIdtMJ6V.js +0 -3076
- package/dist/data-loader-D1FVB4Lp.d.ts +0 -785
- package/dist/data-loader-DV25VhPk.js +0 -2681
- package/dist/debug-CWd5mOJK.js +0 -109
- package/dist/mcp-CEW0jW3t.js +0 -6832
- package/dist/mcp.d.ts +0 -35
- package/dist/mcp.js +0 -8
- package/dist/pricing-fetcher-COuXYEih.js +0 -402
- package/dist/pricing-fetcher-DK8lcI1w.d.ts +0 -219
- package/dist/pricing-fetcher.d.ts +0 -2
- package/dist/pricing-fetcher.js +0 -4
package/README.md
CHANGED
|
@@ -39,43 +39,38 @@ deno run -E -R=$HOME/.claude/projects/ -S=homedir -N='raw.githubusercontent.com:
|
|
|
39
39
|
|
|
40
40
|
> 💡 **Tip**: We recommend using `bunx` instead of `npx` for a massive speed improvement!
|
|
41
41
|
|
|
42
|
-
### Local Installation (Optional)
|
|
43
|
-
|
|
44
|
-
Since ccusage has such a small bundle size, installation is entirely optional:
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
npm install -g ccusage
|
|
48
|
-
```
|
|
49
|
-
|
|
50
42
|
## Usage
|
|
51
43
|
|
|
52
44
|
```bash
|
|
53
45
|
# Basic usage
|
|
54
|
-
ccusage # Show daily report (default)
|
|
55
|
-
ccusage daily # Daily token usage and costs
|
|
56
|
-
ccusage monthly # Monthly aggregated report
|
|
57
|
-
ccusage session # Usage by conversation session
|
|
58
|
-
ccusage blocks # 5-hour billing windows
|
|
59
|
-
ccusage statusline # Compact status line for hooks (Beta)
|
|
46
|
+
npx ccusage # Show daily report (default)
|
|
47
|
+
npx ccusage daily # Daily token usage and costs
|
|
48
|
+
npx ccusage monthly # Monthly aggregated report
|
|
49
|
+
npx ccusage session # Usage by conversation session
|
|
50
|
+
npx ccusage blocks # 5-hour billing windows
|
|
51
|
+
npx ccusage statusline # Compact status line for hooks (Beta)
|
|
60
52
|
|
|
61
53
|
# Live monitoring
|
|
62
|
-
ccusage blocks --live # Real-time usage dashboard
|
|
54
|
+
npx ccusage blocks --live # Real-time usage dashboard
|
|
63
55
|
|
|
64
56
|
# Filters and options
|
|
65
|
-
ccusage daily --since 20250525 --until 20250530
|
|
66
|
-
ccusage daily --json # JSON output
|
|
67
|
-
ccusage daily --breakdown # Per-model cost breakdown
|
|
68
|
-
ccusage daily --timezone UTC # Use UTC timezone
|
|
69
|
-
ccusage daily --locale ja-JP # Use Japanese locale for date/time formatting
|
|
57
|
+
npx ccusage daily --since 20250525 --until 20250530
|
|
58
|
+
npx ccusage daily --json # JSON output
|
|
59
|
+
npx ccusage daily --breakdown # Per-model cost breakdown
|
|
60
|
+
npx ccusage daily --timezone UTC # Use UTC timezone
|
|
61
|
+
npx ccusage daily --locale ja-JP # Use Japanese locale for date/time formatting
|
|
70
62
|
|
|
71
63
|
# Project analysis
|
|
72
|
-
ccusage daily --instances # Group by project/instance
|
|
73
|
-
ccusage daily --project myproject # Filter to specific project
|
|
74
|
-
ccusage daily --instances --project myproject --json # Combined usage
|
|
64
|
+
npx ccusage daily --instances # Group by project/instance
|
|
65
|
+
npx ccusage daily --project myproject # Filter to specific project
|
|
66
|
+
npx ccusage daily --instances --project myproject --json # Combined usage
|
|
75
67
|
|
|
76
68
|
# Compact mode for screenshots/sharing
|
|
77
|
-
ccusage --compact # Force compact table mode
|
|
78
|
-
ccusage monthly --compact # Compact monthly report
|
|
69
|
+
npx ccusage --compact # Force compact table mode
|
|
70
|
+
npx ccusage monthly --compact # Compact monthly report
|
|
71
|
+
|
|
72
|
+
# MCP Server (Model Context Protocol)
|
|
73
|
+
npx @ccusage/mcp@latest # Run MCP server for Claude Desktop integration
|
|
79
74
|
```
|
|
80
75
|
|
|
81
76
|
## Features
|
|
@@ -127,16 +122,6 @@ Check out [ccusage: The Claude Code cost scorecard that went viral](https://www.
|
|
|
127
122
|
</a>
|
|
128
123
|
</p>
|
|
129
124
|
|
|
130
|
-
## Claude Code Resources
|
|
131
|
-
|
|
132
|
-
[`ClaudeLog`](https://claudelog.com) by [InventorBlack](https://www.reddit.com/user/inventor_black/)
|
|
133
|
-
A comprehensive knowledge base with detailed breakdowns of advanced topics, including:
|
|
134
|
-
|
|
135
|
-
- Advanced [mechanics](https://claudelog.com/mechanics/you-are-the-main-thread/) and [CLAUDE.md best practices](https://claudelog.com/mechanics/claude-md-supremacy).
|
|
136
|
-
- Practical technique guides for [plan mode](https://claudelog.com/mechanics/plan-mode), [ultrathink](https://claudelog.com/faqs/what-is-ultrathink/), and [sub-agents](https://claudelog.com/mechanics/task-agent-tools/).
|
|
137
|
-
- Concepts like [agent-first design](https://claudelog.com/mechanics/agent-first-design/), [agent engineering](https://claudelog.com/mechanics/agent-engineering/), and [humanizing agents](https://claudelog.com/mechanics/humanising-agents/).
|
|
138
|
-
- [Configuration guides](https://claudelog.com/configuration).
|
|
139
|
-
|
|
140
125
|
## Star History
|
|
141
126
|
|
|
142
127
|
<a href="https://www.star-history.com/#ryoppippi/ccusage&Date">
|
package/config-schema.json
CHANGED
|
@@ -657,39 +657,6 @@
|
|
|
657
657
|
},
|
|
658
658
|
"additionalProperties": false
|
|
659
659
|
},
|
|
660
|
-
"mcp": {
|
|
661
|
-
"type": "object",
|
|
662
|
-
"properties": {
|
|
663
|
-
"mode": {
|
|
664
|
-
"type": "string",
|
|
665
|
-
"enum": [
|
|
666
|
-
"auto",
|
|
667
|
-
"calculate",
|
|
668
|
-
"display"
|
|
669
|
-
],
|
|
670
|
-
"description": "Cost calculation mode: auto (use costUSD if exists, otherwise calculate), calculate (always calculate), display (always use costUSD)",
|
|
671
|
-
"markdownDescription": "Cost calculation mode: auto (use costUSD if exists, otherwise calculate), calculate (always calculate), display (always use costUSD)",
|
|
672
|
-
"default": "auto"
|
|
673
|
-
},
|
|
674
|
-
"type": {
|
|
675
|
-
"type": "string",
|
|
676
|
-
"enum": [
|
|
677
|
-
"stdio",
|
|
678
|
-
"http"
|
|
679
|
-
],
|
|
680
|
-
"description": "Transport type for MCP server",
|
|
681
|
-
"markdownDescription": "Transport type for MCP server",
|
|
682
|
-
"default": "stdio"
|
|
683
|
-
},
|
|
684
|
-
"port": {
|
|
685
|
-
"type": "number",
|
|
686
|
-
"description": "Port for HTTP transport (default: 8080)",
|
|
687
|
-
"markdownDescription": "Port for HTTP transport (default: 8080)",
|
|
688
|
-
"default": 8080
|
|
689
|
-
}
|
|
690
|
-
},
|
|
691
|
-
"additionalProperties": false
|
|
692
|
-
},
|
|
693
660
|
"statusline": {
|
|
694
661
|
"type": "object",
|
|
695
662
|
"properties": {
|