@ccusage/pi 18.0.3 → 18.0.4
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 +12 -15
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<a href="https://deepwiki.com/ryoppippi/ccusage"><img src="https://img.shields.io/badge/DeepWiki-ryoppippi%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>
|
|
12
12
|
</p>
|
|
13
13
|
|
|
14
|
-
>
|
|
14
|
+
> Analyze [pi-agent](https://github.com/nicobailon/pi-agent) session usage with the same reporting experience as <code>ccusage</code>.
|
|
15
15
|
|
|
16
16
|
## Quick Start
|
|
17
17
|
|
|
@@ -38,15 +38,15 @@ ccusage-pi daily
|
|
|
38
38
|
ccusage-pi monthly --json
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
> 💡 The CLI
|
|
41
|
+
> 💡 The CLI reads pi-agent session data from `~/.pi/agent/sessions/` (configurable via `PI_AGENT_DIR`).
|
|
42
42
|
|
|
43
43
|
## Common Commands
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
|
-
# Daily
|
|
46
|
+
# Daily usage grouped by date (default command)
|
|
47
47
|
npx @ccusage/pi@latest daily
|
|
48
48
|
|
|
49
|
-
# Monthly
|
|
49
|
+
# Monthly usage grouped by month
|
|
50
50
|
npx @ccusage/pi@latest monthly
|
|
51
51
|
|
|
52
52
|
# Session-based usage
|
|
@@ -65,29 +65,26 @@ npx @ccusage/pi@latest daily --since 2025-12-01 --until 2025-12-19
|
|
|
65
65
|
Useful environment variables:
|
|
66
66
|
|
|
67
67
|
- `PI_AGENT_DIR` – override the pi-agent sessions directory (defaults to `~/.pi/agent/sessions`)
|
|
68
|
-
- `CLAUDE_CONFIG_DIR` – override the Claude Code data directory
|
|
69
68
|
- `LOG_LEVEL` – control log verbosity (0 silent … 5 trace)
|
|
70
69
|
|
|
71
70
|
## What is pi-agent?
|
|
72
71
|
|
|
73
|
-
[Pi-agent](https://github.com/
|
|
72
|
+
[Pi-agent](https://github.com/nicobailon/pi-agent) is an alternative Claude coding agent. It stores usage data in a similar JSONL format to Claude Code but in a different directory structure.
|
|
74
73
|
|
|
75
74
|
## Features
|
|
76
75
|
|
|
77
|
-
- 📊 **
|
|
78
|
-
- 🏷️ **Source Labels**: Clear labels (`[cc]` for Claude Code, `[pi]` for pi-agent)
|
|
79
|
-
- 📅 **Daily/Monthly/Session Reports**: Same reporting options as ccusage
|
|
76
|
+
- 📊 **Daily/Monthly/Session Reports**: Same reporting options as ccusage
|
|
80
77
|
- 💵 **Accurate Cost Calculation**: Uses LiteLLM pricing database
|
|
81
78
|
- 📄 **JSON Output**: Export data in structured JSON format with `--json`
|
|
79
|
+
- 📱 **Compact Mode**: Use `--compact` flag for narrow terminals
|
|
82
80
|
|
|
83
|
-
## Data
|
|
81
|
+
## Data Source
|
|
84
82
|
|
|
85
|
-
|
|
83
|
+
Pi-agent session data is read from:
|
|
86
84
|
|
|
87
|
-
|
|
|
88
|
-
|
|
|
89
|
-
|
|
|
90
|
-
| Pi-agent | `~/.pi/agent/sessions/` | `[pi]` |
|
|
85
|
+
| Directory | Default Path |
|
|
86
|
+
| ----------------- | ----------------------- |
|
|
87
|
+
| Pi-agent sessions | `~/.pi/agent/sessions/` |
|
|
91
88
|
|
|
92
89
|
## Documentation
|
|
93
90
|
|
package/dist/index.js
CHANGED
|
@@ -896,7 +896,7 @@ async function executeCommand(cmd, ctx, name$1) {
|
|
|
896
896
|
await resolved.run(ctx);
|
|
897
897
|
}
|
|
898
898
|
var name = "@ccusage/pi";
|
|
899
|
-
var version = "18.0.
|
|
899
|
+
var version = "18.0.4";
|
|
900
900
|
var description = "Pi-agent usage tracking - unified Claude Max usage across Claude Code and pi-agent";
|
|
901
901
|
var require_debug = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
902
902
|
let messages = [];
|
package/package.json
CHANGED