repospend 0.0.9 → 0.1.1
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/CHANGELOG.md +28 -0
- package/README.md +150 -131
- package/dist/cli.js +1973 -439
- package/docs/data-sources.md +128 -0
- package/docs/llms.txt +60 -0
- package/docs/pricing.md +66 -0
- package/docs/screenshots/agent-friction.png +0 -0
- package/docs/screenshots/dashboard-overview.png +0 -0
- package/docs/screenshots/models-view.png +0 -0
- package/docs/screenshots/repo-detail.png +0 -0
- package/docs/screenshots/repos-view.png +0 -0
- package/docs/screenshots/session-detail.png +0 -0
- package/docs/screenshots/sessions-view.png +0 -0
- package/docs/token-accounting.md +100 -0
- package/package.json +17 -3
- package/web-dist/assets/index-BBw375PL.js +308 -0
- package/web-dist/assets/index-Bzdfbi5w.css +1 -0
- package/web-dist/index.html +2 -2
- package/web-dist/assets/index-D9bkUUxw.css +0 -1
- package/web-dist/assets/index-L2zVlSNd.js +0 -306
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,34 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to RepoSpend will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## 0.1.1
|
|
6
|
+
|
|
7
|
+
- Add bundled Claude Fable 5 and Claude Mythos 5 API-equivalent pricing, including dated model ID family pricing and future Fable/Mythos version fallback.
|
|
8
|
+
- Price Claude cache writes from the local 5-minute vs 1-hour TTL split when transcripts expose it, with the 1-hour rate kept as the fallback for unsplit cache creation.
|
|
9
|
+
- Improve the dashboard filter bar by replacing always-expanded filter groups with compact dropdowns that close when another filter opens, Escape is pressed, or the user clicks outside.
|
|
10
|
+
- Move the Overview timeline and chart controls directly under the KPI row, keeping diagnostics such as Token Counting in Settings instead of the daily-glance flow.
|
|
11
|
+
- Replace Settings save and local-cache actions that forced full page reloads with React refetches that preserve page context.
|
|
12
|
+
- Improve chart readability with stable repo colors, positive-only minimum bar size, and a model distribution share panel for skewed model usage.
|
|
13
|
+
- Reduce badge and copy noise by quieting provider badges, preserving outcome color, simplifying empty filter copy, and showing a compact filtered-view notice on pages without the filter bar.
|
|
14
|
+
- Improve responsive and accessibility polish with a horizontal narrow-width nav, safer filter popover alignment, system font fallback, tabular numeric values, and reduced-motion CSS.
|
|
15
|
+
|
|
16
|
+
## 0.1.0
|
|
17
|
+
|
|
18
|
+
- Add GitHub Copilot support for local OTEL exports, Copilot session-state files, and VS Code Copilot Chat transcript/debug files, leaving cost unknown when local data lacks full token splits.
|
|
19
|
+
- Add Copilot source status, labels, settings metrics, quick links, tests, API-equivalent model pricing aliases, and VS Code model metadata recovery.
|
|
20
|
+
- Add Claude service-tier metadata and Codex current-config service-tier visibility in the dashboard cost summary and settings.
|
|
21
|
+
- Add a Data Doctor confidence report in the dashboard, Settings, and `repospend doctor`, covering token coverage, pricing coverage, repo verification, parser issues, source warnings, and empty-data states.
|
|
22
|
+
- Add pricing-gap triage in Settings and Usage Health, with one-click review of unpriced token-bearing sessions and clearer separation between missing model rates and missing token detail.
|
|
23
|
+
- Add bundled Claude Opus 4.8 pricing and inherited pricing labels for nearby newer Claude and GPT model IDs when an exact local rate is not present.
|
|
24
|
+
- Improve dashboard scanability by simplifying the Overview, promoting "Start here" actions, normalizing compact number/model labels, cleaning noisy markdown session titles, and adding a Sessions cost-outlier legend.
|
|
25
|
+
- Improve Agent Friction by treating command failures as triage evidence, routing review actions directly to command evidence, and avoiding false positives from source text or HTTP-style status codes.
|
|
26
|
+
- Add dashboard-style filters to CLI summaries and exports, and apply API export filters consistently across JSON and CSV.
|
|
27
|
+
- Harden localhost settings/cache mutations with Host and Origin checks for local API writes.
|
|
28
|
+
- Remove unused budget configuration and UI/documentation copy so old budget fields are intentionally dropped on the next config save.
|
|
29
|
+
- Improve README, package metadata, AI-readable docs, and dashboard screenshots for repo-level AI coding usage discovery while keeping Cursor experimental and RTK framed as token-reduction workflow context.
|
|
30
|
+
- Move detailed source paths and Cursor troubleshooting into `docs/data-sources.md`, and publish the linked docs with the npm package.
|
|
31
|
+
- Raise the Vite chunk warning threshold to match the current local dashboard bundle size.
|
|
32
|
+
|
|
5
33
|
## 0.0.9
|
|
6
34
|
|
|
7
35
|
- Cache parsed Codex session summaries under `~/.repospend/cache` so unchanged large transcripts reload much faster.
|
package/README.md
CHANGED
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
# RepoSpend
|
|
2
2
|
|
|
3
|
+
RepoSpend is a local-first dashboard for tracking AI coding token usage and API-equivalent spend by repository, session, model, and tool. It supports local Codex, Claude Code, and GitHub Copilot usage data, runs with `npx repospend`, and does not upload prompts, code, transcripts, or usage data.
|
|
4
|
+
|
|
3
5
|
[](https://www.npmjs.com/package/repospend)
|
|
4
6
|
[](https://www.npmjs.com/package/repospend)
|
|
5
7
|
[](./LICENSE)
|
|
6
8
|
[](https://www.npmjs.com/package/repospend)
|
|
7
9
|
[](https://github.com/mehmetdemircs/RepoSpend/actions/workflows/ci.yml)
|
|
8
10
|
|
|
9
|
-
RepoSpend
|
|
10
|
-
|
|
11
|
+
RepoSpend turns local AI coding usage data into a repo-level cost dashboard, so
|
|
12
|
+
developers can see which projects, sessions, models, and tools are driving token
|
|
13
|
+
usage and estimated API-equivalent cost.
|
|
11
14
|
|
|
12
|
-
|
|
13
|
-
repo.
|
|
15
|
+
Project links:
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
- Website: [https://repospend.com](https://repospend.com)
|
|
18
|
+
- GitHub: [https://github.com/mehmetdemircs/RepoSpend](https://github.com/mehmetdemircs/RepoSpend)
|
|
19
|
+
- npm package: [`repospend`](https://www.npmjs.com/package/repospend)
|
|
20
|
+
- AI-readable summary: [docs/llms.txt](docs/llms.txt)
|
|
16
21
|
|
|
17
22
|
```bash
|
|
18
23
|
npx repospend
|
|
@@ -21,24 +26,47 @@ npx repospend
|
|
|
21
26
|
RepoSpend opens a local dashboard, usually at
|
|
22
27
|
[http://localhost:2005](http://localhost:2005).
|
|
23
28
|
|
|
29
|
+
Best for developers who want to:
|
|
30
|
+
|
|
31
|
+
- see which repositories are driving AI coding usage
|
|
32
|
+
- compare Codex, Claude Code, and GitHub Copilot usage locally
|
|
33
|
+
- inspect expensive sessions without uploading prompts or code
|
|
34
|
+
- understand token shape, cache reuse, model mix, and agent friction
|
|
35
|
+
|
|
24
36
|
## Preview
|
|
25
37
|
|
|
26
|
-

|
|
39
|
+
|
|
40
|
+
Preview media uses fictional Middle-earth demo data. The Lord of the Rings themed
|
|
41
|
+
repo names, sessions, prompts, token counts, models, and costs are intentional; no
|
|
42
|
+
private repository data is shown.
|
|
43
|
+
|
|
44
|
+
## What is RepoSpend?
|
|
27
45
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
46
|
+
RepoSpend is a local-first AI coding spend dashboard for developers and teams
|
|
47
|
+
who want to understand usage by repository instead of only by account, day, or
|
|
48
|
+
tool. It reads supported local files in read-only mode, normalizes them into
|
|
49
|
+
sessions, and groups them by Git repository.
|
|
50
|
+
|
|
51
|
+
Use it to inspect Codex token usage, Claude Code token usage by repo, GitHub
|
|
52
|
+
Copilot local usage data, model mix, cache reuse, and the sessions behind high
|
|
53
|
+
estimated API-equivalent spend.
|
|
31
54
|
|
|
32
55
|
## Why RepoSpend?
|
|
33
56
|
|
|
34
|
-
AI coding tools are powerful, but it is hard to see
|
|
57
|
+
AI coding tools are powerful, but it is hard to see which repo, session, model,
|
|
58
|
+
or workflow is responsible for the usage.
|
|
35
59
|
|
|
36
|
-
RepoSpend helps answer:
|
|
60
|
+
RepoSpend helps answer practical questions:
|
|
37
61
|
|
|
38
62
|
- Which repo is using the most tokens?
|
|
39
63
|
- Which sessions were unusually expensive?
|
|
40
64
|
- Which model or tool generated the spend?
|
|
65
|
+
- What token shape drove the cost: input, cached input, output, or reasoning?
|
|
66
|
+
- Are cache reads reducing repeated input work?
|
|
67
|
+
- Is spend concentrated in one model, one repo, or one day?
|
|
41
68
|
- Where did the agent get stuck retrying commands?
|
|
69
|
+
- Which sessions should be exported or reviewed later?
|
|
42
70
|
- How much would this usage roughly cost at API-style rates?
|
|
43
71
|
|
|
44
72
|
Everything stays local.
|
|
@@ -68,18 +96,22 @@ prints the dashboard URL. By default it runs at
|
|
|
68
96
|
|---|---|---|
|
|
69
97
|
| Codex | Most complete support | Tokens, models, sessions, repo grouping, command friction |
|
|
70
98
|
| Claude Code | Initial support | Sessions, projects, models, timestamps, tokens when available |
|
|
99
|
+
| GitHub Copilot | Initial support | Copilot CLI OTEL exports, Copilot CLI session state, and VS Code Copilot Chat transcripts; costs only when local data includes full token splits |
|
|
71
100
|
| Cursor | Experimental opt-in | Local JSONL and SQLite/vscdb discovery; tokens/cost only when local data includes them |
|
|
72
|
-
| RTK |
|
|
101
|
+
| RTK | Token reduction workflow | Not an AI model or coding assistant; shown by default as workflow context for reducing token waste |
|
|
73
102
|
|
|
74
103
|
RepoSpend started as a Codex-first release. Claude Code support is newer, and
|
|
75
|
-
Cursor is off by default because accurate
|
|
76
|
-
account-backed usage data rather than local
|
|
104
|
+
GitHub Copilot support is newest. Cursor is off by default because accurate
|
|
105
|
+
Cursor token usage often requires account-backed usage data rather than local
|
|
106
|
+
files alone.
|
|
77
107
|
|
|
78
108
|
## Requirements
|
|
79
109
|
|
|
80
110
|
- Node.js `20` or newer
|
|
81
111
|
- macOS, Linux, or Windows
|
|
82
|
-
- Local Codex, Claude Code,
|
|
112
|
+
- Local Codex, Claude Code, or GitHub Copilot data for usage analytics
|
|
113
|
+
- Optional RTK data if you want token-reduction workflow context
|
|
114
|
+
- Cursor data only if you enable experimental Cursor import
|
|
83
115
|
|
|
84
116
|
RepoSpend uses `better-sqlite3`, so npm may install a native SQLite package for
|
|
85
117
|
your platform.
|
|
@@ -88,23 +120,12 @@ your platform.
|
|
|
88
120
|
|
|
89
121
|
RepoSpend helps you break down local AI coding usage by:
|
|
90
122
|
|
|
91
|
-
- repo
|
|
92
|
-
-
|
|
93
|
-
-
|
|
94
|
-
- model
|
|
95
|
-
- source/tool and app/surface, where detectable
|
|
96
|
-
- token type
|
|
123
|
+
- repo, session, day, and hour
|
|
124
|
+
- model, source/tool, and app/surface where detectable
|
|
125
|
+
- input, cached input, output, and reasoning token shape
|
|
97
126
|
- estimated API-equivalent cost
|
|
98
127
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
```text
|
|
102
|
-
/Users/elrond/dev/RivendellRecords
|
|
103
|
-
/Users/elrond/dev/RivendellRecords/apps/web
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
RepoSpend walks up to the Git root and shows them together as one
|
|
107
|
-
`RivendellRecords` project.
|
|
128
|
+
Nested paths are grouped by Git root so usage rolls up to the repository.
|
|
108
129
|
|
|
109
130
|
## Screenshots
|
|
110
131
|
|
|
@@ -112,43 +133,37 @@ RepoSpend walks up to the Git root and shows them together as one
|
|
|
112
133
|
|
|
113
134
|

|
|
114
135
|
|
|
115
|
-
|
|
116
|
-
token intensity across projects.
|
|
136
|
+
Compare spend, tokens, sessions, cache hit rate, file edits, and token intensity.
|
|
117
137
|
|
|
118
138
|
### Repository Detail
|
|
119
139
|
|
|
120
140
|

|
|
121
141
|
|
|
122
|
-
|
|
123
|
-
warnings, token shape, sessions, and command signals.
|
|
142
|
+
Inspect cost concentration, warnings, token shape, sessions, and command signals.
|
|
124
143
|
|
|
125
144
|
### Models
|
|
126
145
|
|
|
127
146
|

|
|
128
147
|
|
|
129
|
-
|
|
130
|
-
and repo concentration across the models used in the current scan.
|
|
148
|
+
Compare token shape, API-equivalent cost, cache reuse, and repo concentration.
|
|
131
149
|
|
|
132
150
|
### Sessions
|
|
133
151
|
|
|
134
152
|

|
|
135
153
|
|
|
136
|
-
|
|
137
|
-
repo, tool, model, outcome, cost, tokens, and activity.
|
|
154
|
+
Search and sort individual AI coding runs by repo, tool, model, cost, and tokens.
|
|
138
155
|
|
|
139
156
|
### Session Detail
|
|
140
157
|
|
|
141
158
|

|
|
142
159
|
|
|
143
|
-
|
|
144
|
-
commands, highlights, and issues to inspect.
|
|
160
|
+
Review one run's cost, tokens, model, file edits, commands, and issues.
|
|
145
161
|
|
|
146
162
|
### Agent Friction
|
|
147
163
|
|
|
148
164
|

|
|
149
165
|
|
|
150
|
-
|
|
151
|
-
high-token troubleshooting is easier to review.
|
|
166
|
+
Separate blocking command failures from harmless shell exits.
|
|
152
167
|
|
|
153
168
|
## Privacy
|
|
154
169
|
|
|
@@ -158,7 +173,7 @@ on your machine.
|
|
|
158
173
|
- No login or account required.
|
|
159
174
|
- No telemetry.
|
|
160
175
|
- No prompt or transcript uploads.
|
|
161
|
-
- It does not modify Codex, Claude Code, Cursor, or RTK files.
|
|
176
|
+
- It does not modify Codex, Claude Code, GitHub Copilot, Cursor, or RTK files.
|
|
162
177
|
- It does not claim to match your subscription bill exactly.
|
|
163
178
|
- It does not read Codex Desktop server-side sessions that are not stored locally.
|
|
164
179
|
|
|
@@ -166,18 +181,12 @@ on your machine.
|
|
|
166
181
|
|
|
167
182
|
RepoSpend shows **API-equivalent cost**.
|
|
168
183
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
184
|
+
RepoSpend estimates cost from local token counts and local pricing assumptions.
|
|
185
|
+
It is useful for comparing repos and sessions, but it is not an invoice. Actual
|
|
186
|
+
cost can differ because of subscriptions, credits, included usage, account terms,
|
|
187
|
+
provider changes, or missing local token data.
|
|
172
188
|
|
|
173
|
-
|
|
174
|
-
usage, account-level terms, provider changes, or other billing details. If you use
|
|
175
|
-
Codex or Claude Code through a subscription, read the number as "what this token
|
|
176
|
-
usage would roughly cost at API-style rates."
|
|
177
|
-
|
|
178
|
-
Codex support is the most complete today. Claude Code and Cursor support depend
|
|
179
|
-
on what those tools store locally, so some sessions may show unknown tokens or
|
|
180
|
-
cost.
|
|
189
|
+
For pricing details, see [docs/pricing.md](docs/pricing.md).
|
|
181
190
|
|
|
182
191
|
### Token Accounting
|
|
183
192
|
|
|
@@ -187,77 +196,105 @@ RepoSpend uses normalized model-work totals:
|
|
|
187
196
|
totalTokens = inputTokens + outputTokens + reasoningTokens
|
|
188
197
|
```
|
|
189
198
|
|
|
190
|
-
Cache reads and cache writes are kept as input sub-buckets and priced once.
|
|
191
|
-
|
|
192
|
-
|
|
199
|
+
Cache reads and cache writes are kept as input sub-buckets and priced once. For
|
|
200
|
+
Claude, RepoSpend also uses the 5-minute vs 1-hour cache-write split recorded in
|
|
201
|
+
local transcripts when available. This means RepoSpend token totals may look
|
|
202
|
+
lower than tools that display cache reads/writes as separate addable token
|
|
203
|
+
columns, and Claude API-equivalent cost may differ from tools that collapse all
|
|
204
|
+
cache writes into one rate.
|
|
193
205
|
|
|
194
206
|
For the detailed accounting model and comparison with `ccusage` and Tokscale,
|
|
195
207
|
see [docs/token-accounting.md](docs/token-accounting.md).
|
|
196
208
|
|
|
197
|
-
##
|
|
209
|
+
## Data Sources
|
|
198
210
|
|
|
199
|
-
RepoSpend only reads local files. It does not edit Codex, Claude Code,
|
|
200
|
-
RTK data.
|
|
211
|
+
RepoSpend only reads local files. It does not edit Codex, Claude Code, GitHub
|
|
212
|
+
Copilot, Cursor, or RTK data.
|
|
201
213
|
|
|
202
|
-
|
|
214
|
+
| Source | What RepoSpend reads | Notes |
|
|
215
|
+
|---|---|---|
|
|
216
|
+
| Codex | Local CLI state and session files | Most complete token, model, repo, session, and command-friction support |
|
|
217
|
+
| Claude Code | Local project and session JSONL files | Tokens and models are shown when present in local transcripts |
|
|
218
|
+
| GitHub Copilot | Local OTEL exports, session-state, and VS Code Copilot Chat files | Full cost requires local input/cache/output token splits |
|
|
219
|
+
| Cursor | Experimental local transcript/database discovery | Off by default; local files vary and often omit exact token/cost data |
|
|
220
|
+
| RTK | Local workflow context | Not an AI token source; helps explain token-reduction practices |
|
|
203
221
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
~/.codex/sessions
|
|
207
|
-
```
|
|
222
|
+
Detailed paths, source-specific behavior, and Cursor troubleshooting live in
|
|
223
|
+
[docs/data-sources.md](docs/data-sources.md).
|
|
208
224
|
|
|
209
|
-
|
|
225
|
+
RepoSpend-owned settings live under `~/.repospend/`, including pricing overrides,
|
|
226
|
+
local app settings, and the parse cache.
|
|
210
227
|
|
|
211
|
-
|
|
212
|
-
~/.claude/projects
|
|
213
|
-
~/.config/claude/projects
|
|
214
|
-
~/Library/Application Support/Claude/local-agent-mode-sessions
|
|
215
|
-
~/.config/Claude/local-agent-mode-sessions
|
|
216
|
-
```
|
|
228
|
+
## FAQ
|
|
217
229
|
|
|
218
|
-
|
|
219
|
-
import history-only entries into usage analytics because they do not contain
|
|
220
|
-
reliable token/model data.
|
|
230
|
+
### What is RepoSpend?
|
|
221
231
|
|
|
222
|
-
|
|
223
|
-
|
|
232
|
+
RepoSpend is a local-first dashboard for tracking AI coding token usage and
|
|
233
|
+
API-equivalent spend by repository, session, model, and tool.
|
|
224
234
|
|
|
225
|
-
|
|
235
|
+
### Does RepoSpend upload prompts or code?
|
|
226
236
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
~/.cursor/chats/
|
|
230
|
-
~/.cursor/projects/
|
|
231
|
-
~/.cursor/projects/*/agent-transcripts/
|
|
232
|
-
~/Library/Application Support/Cursor/User/globalStorage/state.vscdb
|
|
233
|
-
~/Library/Application Support/Cursor/User/workspaceStorage/
|
|
234
|
-
~/.config/Cursor/User/globalStorage/state.vscdb
|
|
235
|
-
~/.config/Cursor/User/workspaceStorage/
|
|
236
|
-
%APPDATA%\Cursor\User\globalStorage\state.vscdb
|
|
237
|
-
%APPDATA%\Cursor\User\workspaceStorage\
|
|
238
|
-
```
|
|
237
|
+
No. RepoSpend runs locally, reads supported client files in read-only mode, and
|
|
238
|
+
does not upload prompts, code, transcripts, or usage data.
|
|
239
239
|
|
|
240
|
-
|
|
241
|
-
`.db`, and `.vscdb` files for chat/composer/agent-like JSON blobs. Unknown or
|
|
242
|
-
locked Cursor databases are skipped with warnings. Prompt and response text is
|
|
243
|
-
never uploaded.
|
|
240
|
+
### Which tools does RepoSpend support?
|
|
244
241
|
|
|
245
|
-
RepoSpend
|
|
242
|
+
RepoSpend tracks local usage from Codex, Claude Code, and GitHub Copilot. Cursor
|
|
243
|
+
import is experimental and opt-in. RTK can appear as workflow context for
|
|
244
|
+
token-reduction signals, but it is not an AI model or coding assistant. Support
|
|
245
|
+
depth depends on what each tool stores locally; Codex is currently the most
|
|
246
|
+
complete path.
|
|
246
247
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
248
|
+
### How do I run RepoSpend?
|
|
249
|
+
|
|
250
|
+
Run it with:
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
npx repospend
|
|
251
254
|
```
|
|
252
255
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
+
RepoSpend starts a localhost dashboard, usually at
|
|
257
|
+
[http://localhost:2005](http://localhost:2005).
|
|
258
|
+
|
|
259
|
+
### How is RepoSpend different from ccusage?
|
|
260
|
+
|
|
261
|
+
`ccusage` is excellent for Claude Code usage totals and terminal reporting.
|
|
262
|
+
RepoSpend is a visual, repo-first dashboard across multiple AI coding tools. It
|
|
263
|
+
focuses on repository grouping, session inspection, model mix, token shape,
|
|
264
|
+
cache reuse, exports, and command/agent friction signals.
|
|
265
|
+
|
|
266
|
+
### Is RepoSpend open source?
|
|
267
|
+
|
|
268
|
+
Yes. RepoSpend is open source under the Apache-2.0 license. The GitHub repository
|
|
269
|
+
is [mehmetdemircs/RepoSpend](https://github.com/mehmetdemircs/RepoSpend).
|
|
270
|
+
|
|
271
|
+
## Compared With Other Usage Tools
|
|
272
|
+
|
|
273
|
+
RepoSpend is complementary to command-line usage tools such as `ccusage` and
|
|
274
|
+
generic Claude Code usage monitors.
|
|
256
275
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
276
|
+
Use `ccusage` when you want fast Claude Code totals, daily breakdowns, or a CLI
|
|
277
|
+
view that is close to Claude Code's local usage files. Use RepoSpend when you
|
|
278
|
+
want a local dashboard that compares AI coding usage across repos, sessions,
|
|
279
|
+
models, and tools.
|
|
280
|
+
|
|
281
|
+
When comparing totals, expect some intentional differences:
|
|
282
|
+
|
|
283
|
+
- RepoSpend includes Claude Desktop/local-agent session files when they exist;
|
|
284
|
+
many terminal-first tools count only `~/.claude/projects`.
|
|
285
|
+
- RepoSpend keeps cached input and cache writes as input sub-buckets rather than
|
|
286
|
+
adding them again to headline token totals.
|
|
287
|
+
- RepoSpend prices Claude cache writes by the recorded 5-minute vs 1-hour TTL
|
|
288
|
+
split when local transcripts expose it.
|
|
289
|
+
- RepoSpend separates Codex visible output from reasoning output so reasoning is
|
|
290
|
+
priced once.
|
|
291
|
+
|
|
292
|
+
Generic Claude Code monitors usually focus on one source. RepoSpend is designed
|
|
293
|
+
as a repo-level AI coding cost tracker: it brings together local Codex, Claude
|
|
294
|
+
Code, and GitHub Copilot data, includes experimental Cursor imports when enabled,
|
|
295
|
+
and can show optional RTK workflow context for token-reduction signals. The
|
|
296
|
+
dashboard then explains the token shape and sessions behind the estimated
|
|
297
|
+
API-equivalent spend.
|
|
261
298
|
|
|
262
299
|
## Commands
|
|
263
300
|
|
|
@@ -271,6 +308,7 @@ There are also a few terminal-friendly commands:
|
|
|
271
308
|
|
|
272
309
|
```bash
|
|
273
310
|
repospend scan
|
|
311
|
+
repospend doctor
|
|
274
312
|
repospend by-repo
|
|
275
313
|
repospend by-day
|
|
276
314
|
repospend by-hour
|
|
@@ -280,13 +318,12 @@ repospend export --format json
|
|
|
280
318
|
repospend export --format csv
|
|
281
319
|
```
|
|
282
320
|
|
|
283
|
-
Most commands also accept
|
|
321
|
+
Most commands also accept dashboard-style filters:
|
|
284
322
|
|
|
285
323
|
```bash
|
|
286
|
-
repospend by-repo --source codex
|
|
287
|
-
repospend
|
|
288
|
-
repospend
|
|
289
|
-
repospend by-repo --source all
|
|
324
|
+
repospend by-repo --source codex # codex, claude, copilot, cursor, all
|
|
325
|
+
repospend export --format csv --repo my-app --from 2026-05-01 --to 2026-05-29
|
|
326
|
+
repospend doctor --model gpt-5-codex --sourceApp "VS Code"
|
|
290
327
|
```
|
|
291
328
|
|
|
292
329
|
Use `REPOSPEND_NO_OPEN=1 repospend` if you want the URL printed without opening a
|
|
@@ -305,31 +342,13 @@ browser.
|
|
|
305
342
|
local schemas.
|
|
306
343
|
- Cost estimates do not represent subscription billing, credits, regional
|
|
307
344
|
pricing, or account-specific terms.
|
|
308
|
-
- Budget alerts are not available yet.
|
|
309
345
|
- Some older sessions may not include full token, command, or prompt details.
|
|
310
|
-
- RTK
|
|
346
|
+
- RTK is workflow context, not an AI token source; it helps explain token-reduction
|
|
347
|
+
practices alongside AI usage.
|
|
311
348
|
- On Windows, RepoSpend captures Codex **CLI** usage from `~/.codex/`. The Codex
|
|
312
349
|
**Desktop app** does not persist session transcripts or per-turn token usage to
|
|
313
350
|
disk; real session data lives server-side.
|
|
314
351
|
|
|
315
|
-
## Troubleshooting Cursor Import
|
|
316
|
-
|
|
317
|
-
Cursor local files vary by version and surface. To inspect what exists locally:
|
|
318
|
-
|
|
319
|
-
```bash
|
|
320
|
-
find ~/.cursor -type f | grep -E "jsonl|sqlite|db|vscdb|chat|transcript"
|
|
321
|
-
ls -la "$HOME/Library/Application Support/Cursor/User/globalStorage"
|
|
322
|
-
ls -la "$HOME/Library/Application Support/Cursor/User/workspaceStorage"
|
|
323
|
-
```
|
|
324
|
-
|
|
325
|
-
On Linux, replace the `Library/Application Support` paths with
|
|
326
|
-
`$HOME/.config/Cursor/User/...`. On Windows, check
|
|
327
|
-
`%APPDATA%\Cursor\User\globalStorage` and `%APPDATA%\Cursor\User\workspaceStorage`.
|
|
328
|
-
|
|
329
|
-
If Cursor sessions import with unknown tokens or cost, that usually means the
|
|
330
|
-
local files did not include exact usage data. RepoSpend keeps the session visible
|
|
331
|
-
and avoids guessing.
|
|
332
|
-
|
|
333
352
|
## Develop
|
|
334
353
|
|
|
335
354
|
From source:
|