You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bb6482a
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: apps/ccusage/README.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@
24
24
25
25
## Supported Sources
26
26
27
-
The main CLI tool for analyzing Claude Code, Codex, OpenCode, Amp, pi-agent, GitHub Copilot CLI, and Kimi usage from local data. Track daily, weekly, monthly, and session-based usage with beautiful tables.
27
+
The main CLI tool for analyzing Claude Code, Codex, OpenCode, Amp, pi-agent, GitHub Copilot CLI, Gemini CLI, and Kimi usage from local data. Track daily, weekly, monthly, and session-based usage with beautiful tables.
28
28
29
29
## Installation
30
30
@@ -69,6 +69,7 @@ bunx ccusage codex daily --speed fast
69
69
bunx ccusage opencode weekly
70
70
bunx ccusage amp session
71
71
bunx ccusage copilot daily
72
+
bunx ccusage gemini daily
72
73
bunx ccusage kimi daily
73
74
bunx ccusage pi daily --pi-path /path/to/sessions
74
75
bunx ccusage pi daily --pi-path /path/to/sessions,/archive/pi/sessions
Copy file name to clipboardExpand all lines: docs/guide/all-reports.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ ccusage daily --all
25
25
26
26
## How Unified Views Work
27
27
28
-
ccusage detects local usage files from Claude Code, Codex, OpenCode, Amp, pi-agent, GitHub Copilot CLI, and Kimi. The same daily, weekly, monthly, and session views can run in two modes:
28
+
ccusage detects local usage files from Claude Code, Codex, OpenCode, Amp, pi-agent, GitHub Copilot CLI, Gemini CLI, and Kimi. The same daily, weekly, monthly, and session views can run in two modes:
Copy file name to clipboardExpand all lines: docs/guide/config-files.md
+13-1Lines changed: 13 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -176,7 +176,7 @@ Override shared defaults for specific unified reports and legacy Claude commands
176
176
177
177
### Source-Specific Configuration
178
178
179
-
Use data source namespaces to set defaults and report overrides. Supported namespaces are `claude`, `codex`, `opencode`, `amp`, `pi`, `copilot`, and `kimi`.
179
+
Use data source namespaces to set defaults and report overrides. Supported namespaces are `claude`, `codex`, `opencode`, `amp`, `pi`, `copilot`, `gemini`, and `kimi`.
180
180
181
181
```json
182
182
{
@@ -213,6 +213,16 @@ Use data source namespaces to set defaults and report overrides. Supported names
213
213
"defaults": {
214
214
"offline": true
215
215
}
216
+
},
217
+
"gemini": {
218
+
"defaults": {
219
+
"offline": true
220
+
}
221
+
},
222
+
"kimi": {
223
+
"defaults": {
224
+
"offline": true
225
+
}
216
226
}
217
227
}
218
228
```
@@ -224,6 +234,8 @@ ccusage codex daily
224
234
ccusage opencode weekly
225
235
ccusage pi daily
226
236
ccusage copilot monthly
237
+
ccusage gemini daily
238
+
ccusage kimi daily
227
239
```
228
240
229
241
Source-specific settings are also applied when running unified reports such as `ccusage daily`. In that case, each source receives its own merged options before data is loaded.
> Gemini CLI support is experimental while the Gemini CLI log format continues to evolve.
4
+
5
+
ccusage can read Gemini CLI chat logs as one of its supported local data sources. Gemini uses the same unified and focused report model as Claude Code, Codex, OpenCode, Amp, pi-agent, and GitHub Copilot CLI.
6
+
7
+
## Focused Views
8
+
9
+
```bash
10
+
# Daily Gemini CLI usage
11
+
ccusage gemini daily
12
+
13
+
# Monthly Gemini CLI usage
14
+
ccusage gemini monthly
15
+
16
+
# Gemini CLI sessions
17
+
ccusage gemini session
18
+
```
19
+
20
+
Most users can start with unified reports such as `ccusage daily`. Add the `gemini` namespace only when you want to focus the same report shape on Gemini CLI usage.
21
+
22
+
## Data Source
23
+
24
+
The CLI reads Gemini CLI JSON and JSONL files located under `GEMINI_DATA_DIR` (defaults to `~/.gemini/tmp`). `GEMINI_DATA_DIR` can be one directory or a comma-separated list of directories.
|`ccusage gemini daily`| Aggregate usage by date |[Daily Usage](/guide/daily-reports)|
43
+
|`ccusage gemini monthly`| Aggregate usage by month |[Monthly Usage](/guide/monthly-reports)|
44
+
|`ccusage gemini session`| Group usage by Gemini CLI session |[Session Usage](/guide/session-reports)|
45
+
46
+
These views support `--json`, `--compact`, and `--offline`.
47
+
48
+
## What Gets Calculated
49
+
50
+
-**Token usage** - Gemini token records provide input, output, cached, thought, tool, and total token counts when available.
51
+
-**Cache tokens** - Gemini `input` values can include cached prompt tokens. ccusage separates those cached tokens into cache read so input and cache read are not double-counted.
52
+
-**Reasoning tokens** - Gemini `thoughts` tokens are included in total tokens and exposed as `reasoningTokens` in JSON output. They are priced with output tokens.
53
+
-**Pricing** - Costs are calculated from LiteLLM pricing data for Gemini, Google, Vertex AI, and OpenRouter Gemini model names.
Ensure Gemini CLI has written chat logs under `~/.gemini/tmp/*/chats/`. Set `GEMINI_DATA_DIR` if your Gemini data lives elsewhere or in multiple archive roots.
66
+
:::
67
+
68
+
::: details Costs showing as $0.00
69
+
If a model is not in LiteLLM's database, the cost will be $0.00. Use `--offline=false` to fetch the latest pricing data, or [open an issue](https://github.com/ryoppippi/ccusage/issues/new) to request alias support.
Copy file name to clipboardExpand all lines: docs/guide/index.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,9 @@
2
2
3
3

4
4
5
-
**ccusage** is a local CLI for understanding coding (agent) CLI token usage and estimated costs across Claude Code, Codex, OpenCode, Amp, pi-agent, GitHub Copilot CLI, and Kimi.
5
+
**ccusage** is a local CLI for understanding coding (agent) CLI token usage and estimated costs across Claude Code, Codex, OpenCode, Amp, pi-agent, GitHub Copilot CLI, Gemini CLI, and Kimi.
6
6
7
-
The original **“cc”** came from **C**laude **C**ode usage and now also fits **C**odex **C**LI usage. As OpenCode, Amp, pi-agent, and other coding (agent) CLIs became part of the same workflow, ccusage expanded into a general name for local coding CLI usage analysis.
7
+
The original **“cc”** came from **C**laude **C**ode usage and now also fits **C**odex **C**LI usage. As OpenCode, Amp, pi-agent, Gemini CLI, Kimi, and other coding (agent) CLIs became part of the same workflow, ccusage expanded into a general name for local coding CLI usage analysis.
8
8
9
9
## The Problem
10
10
@@ -19,7 +19,7 @@ Modern coding (agent) CLI usage is split across several local data formats. That
19
19
20
20
ccusage reads the local usage files that coding CLIs already generate and provides:
21
21
22
-
-**All Sources by Default** - Claude Code, Codex, OpenCode, Amp, pi-agent, GitHub Copilot CLI, and Kimi in one CLI
22
+
-**All Sources by Default** - Claude Code, Codex, OpenCode, Amp, pi-agent, GitHub Copilot CLI, Gemini CLI, and Kimi in one CLI
23
23
-**Usage Views** - Daily, weekly, monthly, and session-based breakdowns
24
24
-**Cost Analysis** - Estimated costs based on token usage and model pricing
25
25
-**Focused Data Source Views** - Start with all detected sources, then narrow the same usage views to one source when needed
@@ -80,6 +80,7 @@ ccusage reads from local coding CLI data directories:
Copy file name to clipboardExpand all lines: docs/guide/kimi/index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
> Kimi support is experimental. Expect breaking changes while both ccusage and [Kimi CLI](https://github.com/MoonshotAI/kimi-cli) continue to evolve.
4
4
5
-
ccusage can read Kimi CLI wire logs as one of its supported local data sources. Kimi uses the same unified and focused report model as Claude Code, Codex, OpenCode, Amp, pi-agent, and GitHub Copilot CLI.
5
+
ccusage can read Kimi CLI wire logs as one of its supported local data sources. Kimi uses the same unified and focused report model as Claude Code, Codex, OpenCode, Amp, pi-agent, GitHub Copilot CLI, and Gemini CLI.
0 commit comments