@thedevdavid/sage 0.1.7 → 0.1.8

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 CHANGED
@@ -7,7 +7,7 @@ billing cycle and spend/balance for **OpenAI**, **Anthropic (Claude)**, and
7
7
  **Kimi (Moonshot)** API keys. No signup, no server, no database, no telemetry —
8
8
  everything lives in `~/.sage/` on your machine.
9
9
 
10
- Three ways to use it, one shared local store:
10
+ Four pieces, one shared local store (the website is just this product's page):
11
11
 
12
12
  | Piece | What it is |
13
13
  | --- | --- |
@@ -89,8 +89,6 @@ sage skill install [--project] install the agent skill
89
89
  the CLI and the menu bar app (you can add keys from either).
90
90
  - `~/.sage/cache.json` — last successful fetch per provider, so the menu bar
91
91
  app and offline runs still show something (marked as cached).
92
- - The web tool stores the same data in your browser's `localStorage` instead
93
- (`sage:config` / `sage:cache`) — it never touches the filesystem.
94
92
 
95
93
  ## macOS menu bar app
96
94
 
@@ -121,6 +119,11 @@ about API spend or cycle status — without ever reading your keys.
121
119
  build it. If Xcode offers to upgrade the project format, decline — a newer
122
120
  format makes the release workflow fail to open the project.
123
121
  - Site: `python3 -m http.server 8080 -d site` — one static `index.html`, no build step.
122
+ - Screenshots: `scripts/build-capture-window.sh` once, then
123
+ `build/capture-window.app/Contents/MacOS/capture-window out.png --app-name sage`
124
+ captures the menu bar popover programmatically (ScreenCaptureKit; it opens the
125
+ popover itself). Needs one-time Screen Recording + Accessibility permission for
126
+ the `capture-window` app.
124
127
 
125
128
  ## Releasing
126
129
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thedevdavid/sage",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Local-only usage & billing-cycle tracker for LLM API keys and subscriptions (OpenAI, Anthropic/Claude, Kimi, Cursor).",
5
5
  "type": "module",
6
6
  "bin": {
@@ -81,17 +81,10 @@ function parseKimiUsage(usage, me) {
81
81
 
82
82
  async function fetchUsage(creds) {
83
83
  const headers = { Authorization: `Bearer ${creds.token}`, Accept: 'application/json' };
84
- let usage;
85
- let me = null;
86
- try {
87
- [usage, me] = await Promise.all([
88
- httpJson(`${BASE}/usages`, { headers }),
89
- httpJson(`${BASE}/me`, { headers }).catch(() => null),
90
- ]);
91
- } catch (err) {
92
- if (err.status === 401) throw err;
93
- throw err;
94
- }
84
+ const [usage, me] = await Promise.all([
85
+ httpJson(`${BASE}/usages`, { headers }),
86
+ httpJson(`${BASE}/me`, { headers }).catch(() => null),
87
+ ]);
95
88
  return parseKimiUsage(usage, me);
96
89
  }
97
90