@ycstudios/token-tab 0.1.0 → 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/README.md +15 -6
- package/package.json +1 -1
- package/src/pricing.mjs +5 -0
package/README.md
CHANGED
|
@@ -79,7 +79,8 @@ network:
|
|
|
79
79
|
|
|
80
80
|
### CLI
|
|
81
81
|
```sh
|
|
82
|
-
|
|
82
|
+
npx @ycstudios/token-tab # no install — or: npm i -g @ycstudios/token-tab
|
|
83
|
+
node src/token-tab.mjs # from a checkout: human report
|
|
83
84
|
node src/token-tab.mjs --json # machine-readable
|
|
84
85
|
node src/token-tab.mjs --swiftbar # SwiftBar format
|
|
85
86
|
```
|
|
@@ -91,11 +92,19 @@ One symlink and you have `◧ <tokens>` in the menu bar in about a minute. See
|
|
|
91
92
|
|
|
92
93
|
### Menu bar — native app
|
|
93
94
|
A SwiftUI `MenuBarExtra` app, App-Sandboxed with no network entitlement, reading
|
|
94
|
-
`~/.claude` through a scoped read-only grant.
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
95
|
+
`~/.claude` through a scoped read-only grant.
|
|
96
|
+
|
|
97
|
+
```sh
|
|
98
|
+
brew tap yiftachcohen/tap
|
|
99
|
+
brew install --cask token-tab
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Or grab the notarized zip or DMG from the
|
|
103
|
+
[Releases page](https://github.com/YiftachCohen/token-tab/releases) — Homebrew installs
|
|
104
|
+
the same signed, notarized artifact, pinned by sha256. Or build it yourself in two
|
|
105
|
+
minutes from [`app/README.md`](app/README.md) — the from-source path is the point of the
|
|
106
|
+
trust model anyway. Release builds are signed + notarized locally, never in CI
|
|
107
|
+
([`RELEASING.md`](RELEASING.md)).
|
|
99
108
|
|
|
100
109
|
## Accuracy
|
|
101
110
|
|
package/package.json
CHANGED
package/src/pricing.mjs
CHANGED
|
@@ -58,6 +58,11 @@ const ALIASES = {
|
|
|
58
58
|
haiku: "claude-haiku-4-5",
|
|
59
59
|
};
|
|
60
60
|
|
|
61
|
+
/** The rate-table's model keys, exported so tests can assert the shared parity
|
|
62
|
+
* fixture covers the table exhaustively (see test/rates-coverage.test.mjs). */
|
|
63
|
+
export const RATED_MODEL_IDS = Object.freeze(Object.keys(RATES));
|
|
64
|
+
export const ALIAS_IDS = Object.freeze(Object.keys(ALIASES));
|
|
65
|
+
|
|
61
66
|
/** Reduce any model id to the rate-table key:
|
|
62
67
|
* - strip the [1m] suffix (same surface, same price on current models)
|
|
63
68
|
* - strip Bedrock region prefixes (us./eu./apac.) and the `anthropic.` vendor prefix
|