claude-token-saver 3.16.0 โ 3.17.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/README.en.md +7 -5
- package/README.md +7 -5
- package/package.json +1 -1
- package/src/commands/install.js +49 -0
package/README.en.md
CHANGED
|
@@ -6,9 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
## ๐ Routing saved โ the reason this tool exists
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
๐ Routing saved $2.09 | fableโsonnet 1ร $0.72 ยท opusโhaiku 1ร $0.57 ยท fableโhaiku 1ร $0.51 ยท opusโsonnet 2ร $0.29
|
|
11
|
-
```
|
|
9
|
+

|
|
12
10
|
|
|
13
11
|
**That figure on the first statusline row is the whole product.** It is money actually saved by moving the easy work your expensive model kept repeating onto cheaper ones โ and right beside it is which model that money moved off, and onto what.
|
|
14
12
|
|
|
@@ -40,8 +38,6 @@ By run (newest first):
|
|
|
40
38
|
npm i -g claude-token-saver # postinstall auto-registers the statusline + Skill
|
|
41
39
|
```
|
|
42
40
|
|
|
43
|
-

|
|
44
|
-
|
|
45
41
|
---
|
|
46
42
|
|
|
47
43
|
## โก Why โ the 30-second pitch
|
|
@@ -87,6 +83,8 @@ npm i -g claude-token-saver
|
|
|
87
83
|
|
|
88
84
|
The statusline appears at the bottom of Claude Code right away. If auto-registration was skipped (`--ignore-scripts`, sudo, sandboxed installs), run `claude-token-saver install`.
|
|
89
85
|
|
|
86
|
+
One install sets up everything: **statusline, Skill, SessionStart hook, the ๐
ท Harness (5 principles), and a first route-scan.** The harness is **appended** to `~/.claude/CLAUDE.md` as a marked block (your existing content is backed up and preserved) and is left alone if one is already there. Skip it with `CTS_NO_HARNESS=1 npm i -g claude-token-saver`; undo it with `claude-token-saver harness uninit --global`.
|
|
87
|
+
|
|
90
88
|
> โ ๏ธ Avoid `sudo` global installs โ the Skill lands in root's `~/.claude` instead of yours. Use nvm/fnm/Volta or `npm config set prefix ~/.npm-global`.
|
|
91
89
|
|
|
92
90
|
## Reading the statusline
|
|
@@ -339,6 +337,10 @@ Also update `statusLine.command` in `~/.claude/settings.json` to `claude-token-s
|
|
|
339
337
|
|
|
340
338
|
## Release notes
|
|
341
339
|
|
|
340
|
+
### v3.17.0 (2026-08-22)
|
|
341
|
+
- **One install now sets up the ๐
ท Harness too** โ until now `harness init` was a separate step, without which the ๐
ท score and ratchet-rule delivery did nothing. The install **appends** the 5-principle block to `~/.claude/CLAUDE.md` (existing content backed up and preserved; an existing block is left alone). Skip with `CTS_NO_HARNESS=1`, undo with `harness uninit --global`.
|
|
342
|
+
- **The README leads with the real statusline screenshot** โ the capture replaces the code block at the top, and the duplicate image further down was removed.
|
|
343
|
+
|
|
342
344
|
### v3.16.0 (2026-08-22)
|
|
343
345
|
- **README restructured around routing savings** โ `๐ Routing saved` now opens the page, with how the figure is derived (before / after / gap) and the real `route-scan savings` output alongside it. Channel and homepage badges moved to a "Who makes this" section at the bottom.
|
|
344
346
|
- **Statusline screenshot refreshed to the current two-row layout** โ captured from real output rather than mocked up. Regenerate with `npm run docs:statusline` (headless Chrome; no dependencies added).
|
package/README.md
CHANGED
|
@@ -6,9 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
## ๐ Routing saved โ ์ด ๋๊ตฌ๊ฐ ์กด์ฌํ๋ ์ด์
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
๐ Routing saved $2.09 | fableโsonnet 1ร $0.72 ยท opusโhaiku 1ร $0.57 ยท fableโhaiku 1ร $0.51 ยท opusโsonnet 2ร $0.29
|
|
11
|
-
```
|
|
9
|
+

|
|
12
10
|
|
|
13
11
|
**statusline ์ฒซ ์ค์ ๋จ๋ ์ด ๊ธ์ก์ด ์ ๋ถ์
๋๋ค.** ๋น์ผ ๋ชจ๋ธ์ด ๋ฐ๋ณต ์ฒ๋ฆฌํด ์จ ์ฌ์ด ์์
์ ๋ ์ผ ๋ชจ๋ธ๋ก ๋ด๋ ค๋ณด๋ด์ **์ค์ ๋ก ์๋ ๋**์ด๊ณ , ์์๋ ๊ทธ ๋์ด ์ด๋ ๋ชจ๋ธ์์ ์ด๋ ๋ชจ๋ธ๋ก ์ฎ๊ฒจ์ ์๊ฒผ๋์ง๊ฐ ๊ทธ๋๋ก ๋ถ์ต๋๋ค.
|
|
14
12
|
|
|
@@ -40,8 +38,6 @@ $ claude-token-saver route-scan savings
|
|
|
40
38
|
npm i -g claude-token-saver # postinstall์ด statusline + Skill ์๋ ๋ฑ๋ก
|
|
41
39
|
```
|
|
42
40
|
|
|
43
|
-

|
|
44
|
-
|
|
45
41
|
---
|
|
46
42
|
|
|
47
43
|
## โก ์ ์ฐ๋ โ 30์ด ์์ฝ
|
|
@@ -86,6 +82,8 @@ npm i -g claude-token-saver
|
|
|
86
82
|
|
|
87
83
|
์ค์น ์ฆ์ Claude Code ํ๋จ์ statusline์ด ๋ํ๋ฉ๋๋ค. `--ignore-scripts`/sudo ๋ฑ์ผ๋ก ์๋ ๋ฑ๋ก์ด ์ ๋๋ค๋ฉด `claude-token-saver install`๋ก ์๋ ๋ฑ๋กํ์ธ์.
|
|
88
84
|
|
|
85
|
+
์ค์น ํ ๋ฒ์ผ๋ก **statusline ยท Skill ยท SessionStart ํ
ยท ๐
ท Harness(5์์น) ยท ์ต์ด route-scan** ์ด ๋ชจ๋ ์ค๋น๋ฉ๋๋ค. Harness๋ `~/.claude/CLAUDE.md`์ ํ์๋ ๋ธ๋ก์ผ๋ก **์ถ๊ฐ**๋๋ฉฐ(๊ธฐ์กด ๋ด์ฉ์ ๋ฐฑ์
ํ ๋ณด์กด), ์ด๋ฏธ ์ค์ ๋ผ ์์ผ๋ฉด ๊ฑด๋๋ฆฌ์ง ์์ต๋๋ค. ์์น ์์ผ๋ฉด `CTS_NO_HARNESS=1 npm i -g claude-token-saver`๋ก ๊ฑด๋๋ฐ๊ณ , ๋๋๋ฆฌ๋ ค๋ฉด `claude-token-saver harness uninit --global`์ ์คํํ์ธ์.
|
|
86
|
+
|
|
89
87
|
> โ ๏ธ sudo ๊ธ๋ก๋ฒ ์ค์น๋ Skill์ด root์ `~/.claude`์ ๋ฑ๋ก๋๋ ํจ์ ์ด ์์ต๋๋ค โ nvm/fnm/Volta๋ก ์ฌ์ฉ์ ์์ญ ์ค์น๋ฅผ ๊ถ์ฅํฉ๋๋ค.
|
|
90
88
|
|
|
91
89
|
## statusline ์ฝ๋ ๋ฒ
|
|
@@ -305,6 +303,10 @@ npm uninstall -g claude-cache-monitor && npm i -g claude-token-saver
|
|
|
305
303
|
|
|
306
304
|
## ๋ฆด๋ฆฌ์ค ๋
ธํธ
|
|
307
305
|
|
|
306
|
+
### v3.17.0 (2026-08-22)
|
|
307
|
+
- **์ค์น ํ ๋ฒ์ผ๋ก ๐
ท Harness๊น์ง ์ ์ฉ๋ฉ๋๋ค** โ ์ง๊ธ๊น์ง๋ ์ค์น ํ `harness init`์ ๋ฐ๋ก ์คํํด์ผ statusline์ ๐
ท ์ ์์ ratchet ๋ฃฐ ์ ๋ฌ์ด ๋์ํ์ต๋๋ค. ์ด์ ์ค์น๊ฐ `~/.claude/CLAUDE.md`์ 5์์น ๋ธ๋ก์ **์ถ๊ฐ**ํฉ๋๋ค(๊ธฐ์กด ๋ด์ฉ์ ๋ฐฑ์
ํ ๋ณด์กด, ์ด๋ฏธ ์์ผ๋ฉด ๊ฑด๋๋ฆฌ์ง ์์). ๊ฑด๋๋ฐ๋ ค๋ฉด `CTS_NO_HARNESS=1`, ๋๋๋ฆฌ๋ ค๋ฉด `harness uninit --global`.
|
|
308
|
+
- **README ์๋จ์ statusline ์ค์ ์คํฌ๋ฆฐ์ท์ผ๋ก ๊ต์ฒด** โ ์ฝ๋ ๋ธ๋ก ๋์ ์ค์ ์บก์ฒ๋ฅผ ์ต์๋จ์ ๋๊ณ , ์๋์ชฝ์ ์ค๋ณต์ผ๋ก ์๋ ์ด๋ฏธ์ง๋ ๋บ์ต๋๋ค.
|
|
309
|
+
|
|
308
310
|
### v3.16.0 (2026-08-22)
|
|
309
311
|
- **README๋ฅผ ๋ผ์ฐํ
์ ๊ฐ ์ค์ฌ์ผ๋ก ์ฌ๊ตฌ์ฑ** โ ์ด ๋๊ตฌ์ ํต์ฌ์ด ๋ฌด์์ธ์ง ์ฒซ ํ๋ฉด์์ ๋ฐ๋ก ๋ณด์ด๋๋ก `๐ Routing saved`๋ฅผ ์ต์๋จ์ ์ฌ๋ฆฌ๊ณ , ๊ธ์ก์ด ์์ฅ์์ ์ด๋ป๊ฒ ๋์ค๋์ง(before/after/์ฐจ์ก)์ `route-scan savings` ์ค์ ์ถ๋ ฅ์ ํจ๊ป ์ค์์ต๋๋ค. ์ฑ๋ยทํํ์ด์ง ๋ฐฐ์ง๋ ์ตํ๋จ "๋ง๋ ๊ณณ"์ผ๋ก ๋ด๋ ธ์ต๋๋ค.
|
|
310
312
|
- **statusline ์คํฌ๋ฆฐ์ท์ ํ์ฌ 2์ค ๋ ์ด์์์ผ๋ก ๊ฐฑ์ ** โ ๋ชฉ์
์ด ์๋๋ผ ์ค์ ์ถ๋ ฅ์ ์บก์ฒํฉ๋๋ค. `npm run docs:statusline`์ผ๋ก ์ฌ์์ฑํ ์ ์์ต๋๋ค(headless Chrome ์ฌ์ฉ, ์์กด์ฑ ์ถ๊ฐ ์์).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-token-saver",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.17.0",
|
|
4
4
|
"description": "Route the easy work your expensive Claude model keeps repeating down to haiku/sonnet โ post-hoc session analysis, no realtime router, no extra LLM calls.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/commands/install.js
CHANGED
|
@@ -59,6 +59,55 @@ export async function run({ hasFlag }) {
|
|
|
59
59
|
} catch (e) { debug('install:route-scan-seed', e); /* hook-triggered scan covers it on the first session instead */ }
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
+
// Harness, set up as part of the install rather than left as a manual
|
|
63
|
+
// follow-up step. The ๐
ท statusline segment and the ratchet rules that
|
|
64
|
+
// route-scan promotes both depend on the block existing in CLAUDE.md, so
|
|
65
|
+
// an install without it ships a tool that is half wired up.
|
|
66
|
+
//
|
|
67
|
+
// Scope is global (~/.claude/CLAUDE.md): a global install is not tied to
|
|
68
|
+
// any one project, and the harness principles are project-independent.
|
|
69
|
+
// Only ever ADDS โ harnessInit appends its own marked block, backs up the
|
|
70
|
+
// previous file, and leaves surrounding content untouched. Skipped when a
|
|
71
|
+
// block is already there (nothing to do) and when CTS_NO_HARNESS=1 is set,
|
|
72
|
+
// for anyone who wants the statusline without the CLAUDE.md rules.
|
|
73
|
+
try {
|
|
74
|
+
const { harnessInit, harnessStatus } = await import('../harness.js');
|
|
75
|
+
const before = harnessStatus(undefined, { scope: 'global' });
|
|
76
|
+
if (process.env.CTS_NO_HARNESS === '1') {
|
|
77
|
+
console.log('');
|
|
78
|
+
console.log(lang === 'ko'
|
|
79
|
+
? ' harness: CTS_NO_HARNESS=1 ์ด๋ฏ๋ก ๊ฑด๋๋๋๋ค (๋์ค์ `harness init --global`).'
|
|
80
|
+
: ' harness: skipped (CTS_NO_HARNESS=1) โ run `harness init --global` later.');
|
|
81
|
+
} else if (before.hasBlock) {
|
|
82
|
+
console.log('');
|
|
83
|
+
console.log(lang === 'ko'
|
|
84
|
+
? ` harness: ์ด๋ฏธ ์ค์ ๋จ โ ๐
ท ${before.configured}/${before.total} (${before.file})`
|
|
85
|
+
: ` harness: already set up โ ๐
ท ${before.configured}/${before.total} (${before.file})`);
|
|
86
|
+
} else {
|
|
87
|
+
const h = harnessInit({ scope: 'global' });
|
|
88
|
+
console.log('');
|
|
89
|
+
for (const p of h.backedUp) {
|
|
90
|
+
console.log(lang === 'ko' ? ` harness: ๋ฐฑ์
${p}` : ` harness: backed up ${p}`);
|
|
91
|
+
}
|
|
92
|
+
for (const p of h.wrote) {
|
|
93
|
+
console.log(lang === 'ko' ? ` harness: ์์ฑ ${p}` : ` harness: wrote ${p}`);
|
|
94
|
+
}
|
|
95
|
+
console.log(lang === 'ko'
|
|
96
|
+
? ' harness: 5์์น์ ~/.claude/CLAUDE.md ์ ์ค์ ํ์ต๋๋ค โ statusline์ ๐
ท 5/5 ๊ฐ ํ์๋ฉ๋๋ค.'
|
|
97
|
+
: ' harness: 5 principles installed in ~/.claude/CLAUDE.md โ the statusline now shows ๐
ท 5/5.');
|
|
98
|
+
console.log(lang === 'ko'
|
|
99
|
+
? ' ๋๋๋ฆฌ๋ ค๋ฉด: claude-token-saver harness uninit --global'
|
|
100
|
+
: ' to undo: claude-token-saver harness uninit --global');
|
|
101
|
+
}
|
|
102
|
+
} catch (e) {
|
|
103
|
+
// Never fail an install over this โ the statusline and Skill are already
|
|
104
|
+
// in place, and `harness init` remains available as a manual step.
|
|
105
|
+
debug('install:harness-init', e);
|
|
106
|
+
console.log(lang === 'ko'
|
|
107
|
+
? ' harness: ์๋ ์ค์ ์ ๊ฑด๋๋ฐ์์ต๋๋ค โ `claude-token-saver harness init --global` ๋ก ์ง์ ์ค์ ํ์ธ์.'
|
|
108
|
+
: ' harness: auto-setup skipped โ run `claude-token-saver harness init --global` yourself.');
|
|
109
|
+
}
|
|
110
|
+
|
|
62
111
|
console.log('');
|
|
63
112
|
console.log('Open Claude Code in any directory and just mention:');
|
|
64
113
|
console.log(' "cache hit rate" / "1M context" / "5H cap" โ the skill auto-activates.');
|