Skip to content

Commit c9f4e87

Browse files
jgravelleclaude
andcommitted
Add Claude Code status line setup to USER_GUIDE.md
Documents how to display live token savings and Opus cost avoided in the Claude Code status bar, including the one-liner ask and a manual Node.js snippet for custom statusline hooks. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 8fc243c commit c9f4e87

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

USER_GUIDE.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,32 @@ Add to `.vscode/settings.json`:
6060
}
6161
```
6262

63+
### Claude Code Status Line
64+
65+
If you use Claude Code, you can display a live token savings counter in the status bar:
66+
67+
```
68+
Claude Sonnet 4.6 | my-project | ░░░░░░░░░░ 0% | 1,280,837 tkns saved · $6.40 saved on Opus
69+
```
70+
71+
Ask Claude Code to set it up:
72+
73+
> "Add jcodemunch token savings to my status line"
74+
75+
Claude Code will add a segment that reads `~/.code-index/_savings.json` and calculates cost avoided at the Claude Opus rate ($5.00 / 1M tokens). The counter updates automatically after every jcodemunch tool call — no restart required.
76+
77+
To add it manually, read `~/.code-index/_savings.json` and extract `total_tokens_saved`:
78+
79+
```js
80+
// Node.js snippet for a statusline hook
81+
const f = path.join(os.homedir(), '.code-index', '_savings.json');
82+
const total = fs.existsSync(f) ? JSON.parse(fs.readFileSync(f)).total_tokens_saved ?? 0 : 0;
83+
const cost = (total * 5.00 / 1_000_000).toFixed(2);
84+
if (total > 0) output += `${total.toLocaleString()} tkns saved · $${cost} saved on Opus`;
85+
```
86+
87+
---
88+
6389
### Google Antigravity
6490
6591
1. Open the Agent pane → click the `` menu → **MCP Servers** → **Manage MCP Servers**

0 commit comments

Comments
 (0)