claude-code-cost 1.6.2 → 1.7.0
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/hub-app.json
CHANGED
|
@@ -4,6 +4,35 @@
|
|
|
4
4
|
"name": "Cost",
|
|
5
5
|
"icon": "dollar-sign",
|
|
6
6
|
"run": { "entry": "server.js", "defaultPort": 3543 },
|
|
7
|
+
"plugin": { "marketplace": "plugin", "name": "cost-dashboard" },
|
|
8
|
+
"listing": {
|
|
9
|
+
"tagline": "Ask Claude what your Claude Code sessions cost",
|
|
10
|
+
"description": "A skill that lets Claude read your Claude Code costs in a session. Run /cost-dashboard:cost with a question, such as \"what did this week cost?\" or \"which session cost the most?\". Claude answers with totals by day, model and project, the costliest sessions and subagents, and your plan usage limits.",
|
|
11
|
+
"tags": ["skill", "cost", "cli"],
|
|
12
|
+
"homepage": "https://nikiforovall.blog/claude-code-cost/",
|
|
13
|
+
"screenshots": [
|
|
14
|
+
{
|
|
15
|
+
"url": "https://nikiforovall.blog/claude-code-cost/shots/themes/ember-h2-hub-cost-light.webp",
|
|
16
|
+
"alt": "The Cost dashboard in the hub: the total cost, the cost by day and by model, and the top projects",
|
|
17
|
+
"title": "Overview",
|
|
18
|
+
"caption": "The numbers the skill reads: the total, by day, by model and by project."
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"url": "https://nikiforovall.blog/claude-code-cost/shots/themes/ember-h2d-hub-cost-sessions-light.webp",
|
|
22
|
+
"alt": "The Cost dashboard's session list, sorted by cost",
|
|
23
|
+
"title": "Sessions",
|
|
24
|
+
"caption": "Sessions by cost. Ask Claude which one cost the most."
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"url": "https://nikiforovall.blog/claude-code-cost/shots/themes/ember-cost-insights-light.webp",
|
|
28
|
+
"alt": "The Cost insights view: run rate, 5-hour blocks, subagent share and top tools",
|
|
29
|
+
"title": "Insights",
|
|
30
|
+
"caption": "Run rate, 5-hour blocks, the subagent share and the top tools."
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"author": "NikiforovAll",
|
|
34
|
+
"license": "MIT"
|
|
35
|
+
},
|
|
7
36
|
"loading": {
|
|
8
37
|
"verbs": [
|
|
9
38
|
"Counting tokens…",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-code-cost",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "Cost dashboard for Claude Code usage",
|
|
5
5
|
"main": "server.js",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"server.js",
|
|
49
49
|
"hub-app.json",
|
|
50
50
|
"lib/",
|
|
51
|
+
"plugin/",
|
|
51
52
|
"public/",
|
|
52
53
|
"README.md",
|
|
53
54
|
"LICENSE"
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "cost-dashboard",
|
|
3
|
+
"owner": {
|
|
4
|
+
"name": "NikiforovAll"
|
|
5
|
+
},
|
|
6
|
+
"description": "The plugin that ships with Claude Code Cost",
|
|
7
|
+
"plugins": [
|
|
8
|
+
{
|
|
9
|
+
"name": "cost-dashboard",
|
|
10
|
+
"source": "./plugins/cost-dashboard",
|
|
11
|
+
"description": "A skill to read Claude Code costs from a session"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cost
|
|
3
|
+
description: Answer a question about Claude Code costs — totals by day, model and project, the costliest sessions and subagents, plan usage limits.
|
|
4
|
+
argument-hint: '[question]'
|
|
5
|
+
disable-model-invocation: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Cost
|
|
9
|
+
|
|
10
|
+
Answer the user's cost question with the `claude-code-cost` CLI. With no question, run `overview`.
|
|
11
|
+
|
|
12
|
+
## Find the CLI
|
|
13
|
+
|
|
14
|
+
Use the first that exists:
|
|
15
|
+
|
|
16
|
+
1. The command your system prompt names for the cost CLI.
|
|
17
|
+
2. When the Cost dashboard runs (for example in Claude Code Hub), it writes `<config dir>/.cost/server.json`. Read its `script` field, the path of the CLI, and run `node "<that path>"`. The config dir is `$CLAUDE_CONFIG_DIR`, else `~/.claude`. Quote the path: on Windows it has backslashes.
|
|
18
|
+
3. `claude-code-cost` on PATH.
|
|
19
|
+
4. `npx claude-code-cost`.
|
|
20
|
+
|
|
21
|
+
## Commands
|
|
22
|
+
|
|
23
|
+
| Command | What it prints |
|
|
24
|
+
|---|---|
|
|
25
|
+
| `overview` | Total cost, by model, by day and the top projects; `--compare` adds the window before |
|
|
26
|
+
| `insights` | Run rate, 5-hour blocks, subagent share, compactions, top tools |
|
|
27
|
+
| `projects` | Projects by cost |
|
|
28
|
+
| `sessions [<project>]` | Sessions by cost, with their ids; `--match <title>` |
|
|
29
|
+
| `agents` | Subagents by skill or agent type: runs, total, average |
|
|
30
|
+
| `session <id>` | One session: totals, subagents, costliest turns |
|
|
31
|
+
| `agent <session id> <agent id>` | One subagent of a session |
|
|
32
|
+
| `limits` | Plan usage limits: the 5-hour and weekly windows |
|
|
33
|
+
|
|
34
|
+
Most commands take `--range` (`today`, `24h`, `<n>d`) and `--json`. `help <command>` prints the flags of the installed binary: read it before you use a flag.
|
|
35
|
+
|
|
36
|
+
## Answer
|
|
37
|
+
|
|
38
|
+
- State the window with every number. The default is 7 days. `session` and `agent` cover the whole session: state its first and last date.
|
|
39
|
+
- A list shows the top rows. `--top <n>` shows more.
|
|
40
|
+
- Call the costs estimates: they come from the transcripts at list prices.
|