ccusage 20.0.8 → 20.0.10
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 +21 -22
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div align="center">
|
|
2
|
-
<img src="https://cdn.jsdelivr.net/gh/
|
|
2
|
+
<img src="https://cdn.jsdelivr.net/gh/ccusage/ccusage@main/docs/public/logo.svg" alt="ccusage logo" width="256" height="256">
|
|
3
3
|
<h1>ccusage</h1>
|
|
4
4
|
</div>
|
|
5
5
|
|
|
@@ -7,18 +7,18 @@
|
|
|
7
7
|
<a href="https://socket.dev/npm/package/ccusage"><img src="https://socket.dev/api/badge/npm/package/ccusage" alt="Socket Badge" /></a>
|
|
8
8
|
<a href="https://npmjs.com/package/ccusage"><img src="https://img.shields.io/npm/v/ccusage?color=yellow" alt="npm version" /></a>
|
|
9
9
|
<a href="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"><img src="https://img.shields.io/npm/dt/ccusage" alt="NPM Downloads" /></a>
|
|
10
|
-
<a href="https://deepwiki.com/
|
|
10
|
+
<a href="https://deepwiki.com/ccusage/ccusage"><img src="https://img.shields.io/badge/DeepWiki-ccusage%2Fccusage-blue.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAyCAYAAAAnWDnqAAAAAXNSR0IArs4c6QAAA05JREFUaEPtmUtyEzEQhtWTQyQLHNak2AB7ZnyXZMEjXMGeK/AIi+QuHrMnbChYY7MIh8g01fJoopFb0uhhEqqcbWTp06/uv1saEDv4O3n3dV60RfP947Mm9/SQc0ICFQgzfc4CYZoTPAswgSJCCUJUnAAoRHOAUOcATwbmVLWdGoH//PB8mnKqScAhsD0kYP3j/Yt5LPQe2KvcXmGvRHcDnpxfL2zOYJ1mFwrryWTz0advv1Ut4CJgf5uhDuDj5eUcAUoahrdY/56ebRWeraTjMt/00Sh3UDtjgHtQNHwcRGOC98BJEAEymycmYcWwOprTgcB6VZ5JK5TAJ+fXGLBm3FDAmn6oPPjR4rKCAoJCal2eAiQp2x0vxTPB3ALO2CRkwmDy5WohzBDwSEFKRwPbknEggCPB/imwrycgxX2NzoMCHhPkDwqYMr9tRcP5qNrMZHkVnOjRMWwLCcr8ohBVb1OMjxLwGCvjTikrsBOiA6fNyCrm8V1rP93iVPpwaE+gO0SsWmPiXB+jikdf6SizrT5qKasx5j8ABbHpFTx+vFXp9EnYQmLx02h1QTTrl6eDqxLnGjporxl3NL3agEvXdT0WmEost648sQOYAeJS9Q7bfUVoMGnjo4AZdUMQku50McDcMWcBPvr0SzbTAFDfvJqwLzgxwATnCgnp4wDl6Aa+Ax283gghmj+vj7feE2KBBRMW3FzOpLOADl0Isb5587h/U4gGvkt5v60Z1VLG8BhYjbzRwyQZemwAd6cCR5/XFWLYZRIMpX39AR0tjaGGiGzLVyhse5C9RKC6ai42ppWPKiBagOvaYk8lO7DajerabOZP46Lby5wKjw1HCRx7p9sVMOWGzb/vA1hwiWc6jm3MvQDTogQkiqIhJV0nBQBTU+3okKCFDy9WwferkHjtxib7t3xIUQtHxnIwtx4mpg26/HfwVNVDb4oI9RHmx5WGelRVlrtiw43zboCLaxv46AZeB3IlTkwouebTr1y2NjSpHz68WNFjHvupy3q8TFn3Hos2IAk4Ju5dCo8B3wP7VPr/FGaKiG+T+v+TQqIrOqMTL1VdWV1DdmcbO8KXBz6esmYWYKPwDL5b5FA1a0hwapHiom0r/cKaoqr+27/XcrS5UwSMbQAAAABJRU5ErkJggg==" alt="DeepWiki"></a>
|
|
11
11
|
<!-- DeepWiki badge generated by https://deepwiki.ryoppippi.com/ -->
|
|
12
12
|
<a href="https://github.com/hesreallyhim/awesome-claude-code"><img src="https://awesome.re/mentioned-badge.svg" alt="Mentioned in Awesome Claude Code" /></a>
|
|
13
13
|
<a href="https://技術者倫理.com"><img src="https://img.shields.io/badge/%E6%8A%80%E8%A1%93%E8%80%85%E5%80%AB%E7%90%86-%E9%81%B5%E5%AE%88%E6%B8%88%E3%81%BF-0a0a0a?style=for-the-badge&labelColor=ffffff" alt="技術者倫理 遵守済み" /></a>
|
|
14
14
|
</p>
|
|
15
15
|
|
|
16
16
|
<p align="center">
|
|
17
|
-
<a href="https://trendshift.io/repositories/18533" target="_blank"><img src="https://trendshift.io/api/badge/repositories/18533" alt="
|
|
17
|
+
<a href="https://trendshift.io/repositories/18533" target="_blank"><img src="https://trendshift.io/api/badge/repositories/18533" alt="ccusage%2Fccusage | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
|
|
18
18
|
</p>
|
|
19
19
|
|
|
20
20
|
<div align="center">
|
|
21
|
-
<img src="https://cdn.jsdelivr.net/gh/
|
|
21
|
+
<img src="https://cdn.jsdelivr.net/gh/ccusage/ccusage@main/docs/public/screenshot.png" alt="ccusage terminal report screenshot">
|
|
22
22
|
</div>
|
|
23
23
|
|
|
24
24
|
> Analyze coding (agent) CLI token usage and costs from local data.
|
|
@@ -58,7 +58,7 @@ You can run ccusage directly without a global installation:
|
|
|
58
58
|
bunx ccusage
|
|
59
59
|
|
|
60
60
|
# Nix
|
|
61
|
-
nix run github:
|
|
61
|
+
nix run github:ccusage/ccusage -- daily
|
|
62
62
|
|
|
63
63
|
# Alternative package runners
|
|
64
64
|
pnpm dlx ccusage
|
|
@@ -66,7 +66,7 @@ pnpx ccusage
|
|
|
66
66
|
npx ccusage@latest
|
|
67
67
|
|
|
68
68
|
# PR preview builds
|
|
69
|
-
bunx -p https://pkg.pr.new/
|
|
69
|
+
bunx -p https://pkg.pr.new/ccusage/ccusage@<pr-number> ccusage --offline
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
> [bunx](https://bun.com/docs/pm/bunx) caches the downloaded package, so repeated runs are faster after the first launch.
|
|
@@ -155,11 +155,11 @@ Full documentation is available at **[ccusage.com](https://ccusage.com/)**
|
|
|
155
155
|
<details>
|
|
156
156
|
<summary>Contributor setup</summary>
|
|
157
157
|
|
|
158
|
-
Contributor setup
|
|
158
|
+
Contributor setup uses the Nix flake development environment with [nix-direnv](https://github.com/nix-community/nix-direnv) for pinned tools, and `just` for everyday development tasks. Install [Nix](https://nixos.org/) with the `nix-command` and `flakes` experimental features enabled, then let nix-direnv load the dev shell automatically when you enter the directory:
|
|
159
159
|
|
|
160
160
|
```sh
|
|
161
161
|
# Clone the repository
|
|
162
|
-
git clone https://github.com/
|
|
162
|
+
git clone https://github.com/ccusage/ccusage.git
|
|
163
163
|
cd ccusage
|
|
164
164
|
|
|
165
165
|
# Allow direnv to load the Nix dev shell
|
|
@@ -168,12 +168,12 @@ direnv allow
|
|
|
168
168
|
|
|
169
169
|
The dev shell provides the pinned `pnpm`, Rust toolchain, GitHub CLI, git hooks, generated local agent skills, and project utilities from `flake.nix`. It also installs package dependencies from `pnpm-lock.yaml` when needed.
|
|
170
170
|
|
|
171
|
-
Run
|
|
171
|
+
Run project tasks with `just` from inside the Nix environment (`just --list` shows every recipe):
|
|
172
172
|
|
|
173
173
|
```sh
|
|
174
174
|
just fmt
|
|
175
|
-
just typecheck
|
|
176
175
|
just test
|
|
176
|
+
just check
|
|
177
177
|
```
|
|
178
178
|
|
|
179
179
|
### Nix Package
|
|
@@ -181,9 +181,9 @@ just test
|
|
|
181
181
|
The flake exposes `ccusage` as the default package and app:
|
|
182
182
|
|
|
183
183
|
```sh
|
|
184
|
-
nix run github:
|
|
185
|
-
nix run github:
|
|
186
|
-
nix build github:
|
|
184
|
+
nix run github:ccusage/ccusage
|
|
185
|
+
nix run github:ccusage/ccusage -- codex daily --offline
|
|
186
|
+
nix build github:ccusage/ccusage
|
|
187
187
|
```
|
|
188
188
|
|
|
189
189
|
Nix builds embed the LiteLLM pricing file from the locked `litellm` flake input, so sandboxed builds do not fetch pricing at build time. To update the locked pricing snapshot:
|
|
@@ -191,11 +191,10 @@ Nix builds embed the LiteLLM pricing file from the locked `litellm` flake input,
|
|
|
191
191
|
Non-Nix Cargo builds read the same locked LiteLLM revision from `flake.lock` and fetch the pricing file from that revision at build time.
|
|
192
192
|
|
|
193
193
|
```bash
|
|
194
|
-
|
|
195
|
-
nix flake check
|
|
194
|
+
just update-litellm-pricing
|
|
196
195
|
```
|
|
197
196
|
|
|
198
|
-
The scheduled `update pricing` workflow runs the same
|
|
197
|
+
The scheduled `update pricing` workflow runs the same update and validation, then opens a PR when the pricing snapshot changes.
|
|
199
198
|
|
|
200
199
|
</details>
|
|
201
200
|
|
|
@@ -208,8 +207,8 @@ The scheduled `update pricing` workflow runs the same commands and opens a PR wh
|
|
|
208
207
|
<p align="center">
|
|
209
208
|
<a href="https://coderabbit.link/ryoppippi">
|
|
210
209
|
<picture>
|
|
211
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/
|
|
212
|
-
<img src="https://cdn.jsdelivr.net/gh/
|
|
210
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/ccusage/ccusage@main/docs/public/coderabbit-logo-dark.svg">
|
|
211
|
+
<img src="https://cdn.jsdelivr.net/gh/ccusage/ccusage@main/docs/public/coderabbit-logo.svg" alt="CodeRabbit" width="320">
|
|
213
212
|
</picture>
|
|
214
213
|
</a>
|
|
215
214
|
</p>
|
|
@@ -222,11 +221,11 @@ The scheduled `update pricing` workflow runs the same commands and opens a PR wh
|
|
|
222
221
|
|
|
223
222
|
## Star History
|
|
224
223
|
|
|
225
|
-
<a href="https://www.star-history.com/#
|
|
224
|
+
<a href="https://www.star-history.com/#ccusage/ccusage&Date">
|
|
226
225
|
<picture>
|
|
227
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=
|
|
228
|
-
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=
|
|
229
|
-
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=
|
|
226
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=ccusage/ccusage&type=Date&theme=dark" />
|
|
227
|
+
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=ccusage/ccusage&type=Date" />
|
|
228
|
+
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=ccusage/ccusage&type=Date" />
|
|
230
229
|
</picture>
|
|
231
230
|
</a>
|
|
232
231
|
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ccusage",
|
|
3
|
-
"version": "20.0.
|
|
3
|
+
"version": "20.0.10",
|
|
4
4
|
"description": "Analyze coding (agent) CLI token usage and costs from local data",
|
|
5
|
-
"homepage": "https://github.com/
|
|
5
|
+
"homepage": "https://github.com/ccusage/ccusage#readme",
|
|
6
6
|
"bugs": {
|
|
7
|
-
"url": "https://github.com/
|
|
7
|
+
"url": "https://github.com/ccusage/ccusage/issues"
|
|
8
8
|
},
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"author": "ryoppippi",
|
|
11
11
|
"repository": {
|
|
12
12
|
"type": "git",
|
|
13
|
-
"url": "git+https://github.com/
|
|
13
|
+
"url": "git+https://github.com/ccusage/ccusage.git",
|
|
14
14
|
"directory": "apps/ccusage"
|
|
15
15
|
},
|
|
16
|
-
"funding": "https://github.com/ryoppippi
|
|
16
|
+
"funding": "https://github.com/sponsors/ryoppippi",
|
|
17
17
|
"bin": {
|
|
18
18
|
"ccusage": "./dist/cli.js"
|
|
19
19
|
},
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
],
|
|
24
24
|
"type": "module",
|
|
25
25
|
"optionalDependencies": {
|
|
26
|
-
"@ccusage/ccusage-darwin-arm64": "20.0.
|
|
27
|
-
"@ccusage/ccusage-
|
|
28
|
-
"@ccusage/ccusage-linux-
|
|
29
|
-
"@ccusage/ccusage-
|
|
30
|
-
"@ccusage/ccusage-
|
|
31
|
-
"@ccusage/ccusage-win32-
|
|
26
|
+
"@ccusage/ccusage-darwin-arm64": "20.0.10",
|
|
27
|
+
"@ccusage/ccusage-darwin-x64": "20.0.10",
|
|
28
|
+
"@ccusage/ccusage-linux-arm64": "20.0.10",
|
|
29
|
+
"@ccusage/ccusage-linux-x64": "20.0.10",
|
|
30
|
+
"@ccusage/ccusage-win32-x64": "20.0.10",
|
|
31
|
+
"@ccusage/ccusage-win32-arm64": "20.0.10"
|
|
32
32
|
}
|
|
33
33
|
}
|