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 2801bc7
Browse filesBrowse the repository at this point in the historyBrowse files
For Codex, OpenCode, Amp, Droid, Codebuff, Hermes Agent, pi-agent, Goose, OpenClaw, Kilo, Kimi, Qwen, GitHub Copilot CLI, and Gemini CLI data locations, use the source-specific environment variables listed in [Environment Variables](/guide/environment-variables).
78
+
For Codex, OpenCode, Amp, Droid, Codebuff, Hermes Agent, pi-agent, Goose, OpenClaw, Kilo, Kimi, Qwen, GitHub Copilot CLI, Gemini CLI, Grok Build CLI, and ZCode data locations, use the source-specific environment variables listed in [Environment Variables](/guide/environment-variables).
Copy file name to clipboardExpand all lines: docs/guide/zcode/index.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ Most users can start with unified reports such as `ccusage daily`. Add the `zcod
19
19
20
20
## Data Source
21
21
22
-
The CLI reads completed model requests from the `model_usage` table in ZCode's SQLite database, joining `session` for the project directory and app version.
22
+
The CLI reads completed model requests from the `model_usage` table in ZCode's SQLite database, joining `session` for the project directory.
23
23
24
24
Root resolution (highest first):
25
25
@@ -47,14 +47,14 @@ Only rows with `status = 'completed'` are counted. Error and cancelled attempts
47
47
|`ccusage zcode monthly`| Aggregate usage by month |[Monthly Usage](/guide/monthly-reports)|
48
48
|`ccusage zcode session`| Group usage by ZCode session |[Session Usage](/guide/session-reports)|
49
49
50
-
These views support `--json`, `--compact`, `--mode`, and `--offline`.
50
+
These views support [`--json`](/guide/json-output), `--compact`, `--mode`, and `--offline`.
51
51
52
52
## What Gets Calculated
53
53
54
-
-**Token usage** - ZCode records OpenAI-style usage where `input_tokens` includes the cache-read slice. ccusage carves `cache_read_input_tokens`out of input so cache reads are reported and priced at their own rate.
54
+
-**Token usage** - ZCode records OpenAI-style usage where `input_tokens` includes cache-read and cache-creation tokens. ccusage carves both cache slices out of input so the reported buckets remain additive and use their own pricing rates.
55
55
-**Reasoning tokens** - ZCode's schema has a `reasoning_tokens` column, but every observed row records zero; reasoning is assumed to sit inside output and is never added on top. If a future ZCode version moves it outside, the recorded total grows past the counted buckets and ccusage routes the difference into its extra-tokens bucket instead of dropping it.
56
-
-**Costs** - ZCode records no per-request cost, so every cost mode derives from the pricing tables. Model ids are lowercased for lookup (`GLM-5.3` matches the `glm-5.3` pricing entry).
57
-
-**Session metadata** - Session reports carry the project directory, first/last activity, and app version from the `session` table.
56
+
-**Costs** - ZCode records no per-request cost. The default `auto` mode and `calculate` estimate costs from the pricing tables; `display` shows `$0.00` because there is no recorded cost to display. Pricing lookup honors an exact raw-model override first, then tries provider-qualified Z.ai and normalized aliases.
57
+
-**Session metadata** - Session reports carry the project directory and first/last activity.
58
58
59
59
## Environment Variables
60
60
@@ -89,5 +89,5 @@ Ensure `~/.zcode/cli/db/db.sqlite` exists and has completed rows in `model_usage
89
89
:::
90
90
91
91
::: details Costs showing as $0.00
92
-
ZCode subscription usage has no recorded per-request cost, so costs are always table estimates. If a model is missing from pricing, the cost stays at zero and a missing-pricing warning may appear.
92
+
ZCode records no per-request cost, so `--mode display` shows `$0.00`. Use the default `auto` mode or `--mode calculate` to estimate costs from the pricing tables. If a model is missing from pricing, the estimate stays at zero and a missing-pricing warning may appear.
Copy file name to clipboardExpand all lines: docs/index.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ layout: home
4
4
hero:
5
5
name: ccusage
6
6
text: Coding (Agent) CLI Usage Analysis
7
-
tagline: A fast local CLI for tracking tokens and estimated costs across Claude Code, Codex, OpenCode, Amp, Droid, Codebuff, Hermes Agent, pi-agent, Goose, OpenClaw, Kilo, Kimi, Qwen, GitHub Copilot CLI, and Gemini CLI
7
+
tagline: A fast local CLI for tracking tokens and estimated costs across Claude Code, Codex, OpenCode, Amp, Droid, Codebuff, Hermes Agent, pi-agent, Goose, OpenClaw, Kilo, Kimi, Qwen, GitHub Copilot CLI, Gemini CLI, Grok Build CLI, and ZCode
8
8
image:
9
9
src: /logo.svg
10
10
alt: ccusage logo
@@ -27,7 +27,7 @@ features:
27
27
link: /guide/getting-started
28
28
- icon: 📁
29
29
title: Local Data Sources
30
-
details: Reads local usage logs from Claude Code, Codex, OpenCode, Amp, Droid, Codebuff, Hermes Agent, pi-agent, Goose, OpenClaw, Kilo, Kimi, Qwen, GitHub Copilot CLI, and Gemini CLI without uploading your data
30
+
details: Reads local usage logs from Claude Code, Codex, OpenCode, Amp, Droid, Codebuff, Hermes Agent, pi-agent, Goose, OpenClaw, Kilo, Kimi, Qwen, GitHub Copilot CLI, Gemini CLI, Grok Build CLI, and ZCode without uploading your data
0 commit comments