exe-watcher 0.2.15 → 0.2.46

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
@@ -1,22 +1,22 @@
1
1
  <p align="center">
2
- <img src="https://cdn.jsdelivr.net/gh/AskExe/exe-watcher@main/assets/owl-header.png" alt="WATCHER" width="520" />
2
+ <img src="assets/owl-header.png" alt="Exe Watcher banner" width="520" />
3
3
  </p>
4
4
 
5
- <p align="center"><strong>Real-time AI spend tracker for developers — by <a href="https://github.com/AskExe">Exe AI</a>.</strong></p>
5
+ <p align="center"><strong>The owl watching your AI coding spend — tokens, cost, models, agents, and projects in one beautiful terminal + macOS menu bar.</strong></p>
6
6
 
7
7
  <p align="center">
8
8
  <a href="https://www.npmjs.com/package/exe-watcher"><img src="https://img.shields.io/npm/v/exe-watcher.svg" alt="npm version" /></a>
9
9
  <a href="https://www.npmjs.com/package/exe-watcher"><img src="https://img.shields.io/npm/dt/exe-watcher.svg" alt="total downloads" /></a>
10
10
  <a href="https://github.com/AskExe/exe-watcher/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/exe-watcher.svg" alt="license" /></a>
11
- <a href="https://github.com/AskExe/exe-watcher"><img src="https://img.shields.io/badge/node-%3E%3D22-brightgreen.svg" alt="node version" /></a>
11
+ <a href="https://github.com/AskExe/exe-watcher"><img src="https://img.shields.io/badge/node-%3E%3D22.5.0-brightgreen.svg" alt="node version" /></a>
12
12
  <a href="https://discord.gg/pJ2DMWvtAx"><img src="https://img.shields.io/badge/discord-join-5865F2?logo=discord&logoColor=white" alt="Discord" /></a>
13
13
  </p>
14
14
 
15
15
  <p align="center">
16
- <img src="https://raw.githubusercontent.com/AskExe/exe-watcher/main/assets/dashboard.jpg" alt="Watcher TUI dashboard" width="620" />
16
+ <img src="assets/exe-watcher-readme.png" alt="Exe Watcher macOS menu bar spend dashboard" width="401" />
17
17
  </p>
18
18
 
19
- 8 providers. 5 time periods. 17 currencies. Every dollar your AI coding tools spend, tracked automatically from local session data. No API keys, no cloud, no wrappers.
19
+ Exe Watcher turns your local AI coding sessions into a live spend cockpit: today's burn, provider/model mix, activity breakdown, one-shot rate, token trends, optimization hints, and project cost — without API keys, cloud sync, or wrappers around your tools.
20
20
 
21
21
  ```bash
22
22
  npm install -g exe-watcher
@@ -24,29 +24,44 @@ npm install -g exe-watcher
24
24
 
25
25
  ---
26
26
 
27
+ ## What makes it cool
28
+
29
+ - **Local-first spend tracking** — reads session data already on your machine; no telemetry service, no account, no proxy.
30
+ - **Terminal + native macOS menu bar** — run the full TUI in your terminal or keep today's spend visible in the menu bar.
31
+ - **Multi-provider view** — Claude Code, Codex, Cursor, Cursor Agent, Copilot, OpenCode, OMP, and Pi are auto-detected.
32
+ - **Actually useful metrics** — cost, calls, sessions, tokens, cache hit %, one-shot rate, activity type, model split, tools, MCP servers, shell commands, and top sessions.
33
+ - **Optimization built in** — finds token waste and gives copy-paste fixes for bloated prompts, repeated file reads, uncapped shell output, unused MCP servers, and ghost agents.
34
+ - **Exe OS aware** — when Exe OS is present, Watcher adds AI employee memory growth and per-agent spend.
35
+
36
+ ---
37
+
27
38
  ## Features
28
39
 
29
- ### Native macOS menubar app
40
+ ### Native macOS menu bar app
30
41
 
31
42
  ```bash
32
43
  exe-watcher menubar # install + launch
33
44
  exe-watcher menubar --force # reinstall latest
45
+ exe-watcher menubar --version v0.2.38 # install a specific version
46
+ exe-watcher # on macOS: prompts to install menubar app
34
47
  ```
35
48
 
49
+ > **Note:** Running `exe-watcher` with no subcommand on macOS prompts you to install the menubar app. In non-interactive environments (pipes, CI), it shows help instead. Use `exe-watcher --help` to see all available commands.
50
+
36
51
  A Swift/SwiftUI popover that lives in your menu bar. Today's spend is always visible at a glance.
37
52
 
38
- - **Period switcher** — Today, 7 Days, 30 Days, Month, All Time. Each period shows comparison to prior period (e.g. "+12% vs last 7d").
39
- - **Provider tabs** — Switch between All, Claude, Codex, Cursor, etc. Only providers with actual spend appear. Cache prefetching makes tab switching instant.
40
- - **Project spend** — Per-project cost breakdown across 24h / 7d / 30d.
41
- - **Daily history heatmap** — 365 days of spend history, GitHub-contribution-style.
42
- - **Subscription tracking** — Claude Pro ($20/mo), Claude Max ($200/mo), Cursor Pro ($20/mo) — see how much of your quota you've used.
43
- - **Capacity estimation** — Derives your token limits from usage patterns when hard caps aren't published.
44
- - **Cache hit %** — Track prompt caching efficiency across providers.
45
- - **One-shot rate** — What percentage of edits land on the first try vs. retry loops.
46
- - **Token optimization** — Surfaces waste patterns with estimated savings.
47
- - **Multi-currency** — 17 currencies (USD, GBP, EUR, JPY, AUD, CAD, CHF, CNY, SEK, NOK, DKK, NZD, SGD, HKD, KRW, INR, BRL). ECB exchange rates, cached 24h.
53
+ - **Period switcher** — Today, 7 Days, 30 Days, Month, All Time. Each period includes comparison to the previous window where available.
54
+ - **Provider tabs** — Switch between All, Claude, Codex, Cursor, and any other detected provider with spend.
55
+ - **Insight tabs** — Trend, Forecast, Pulse, and Stats summarize token/cost movement, projections, optimization wins, and usage streaks.
56
+ - **Activity breakdown** — Research, Building, Debugging, DevOps, Testing, and Planning with cost, turns, and one-shot rate.
57
+ - **Model breakdown** — See which models are driving spend and call volume.
58
+ - **Project spend** — Per-project cost across today / 7d / 30d.
59
+ - **Optimization findings** — Menubar links open the full optimizer or report directly in Terminal.
60
+ - **Subscription tracking** — Claude Pro ($20/mo), Claude Max ($200/mo), Cursor Pro ($20/mo), or custom monthly budgets.
61
+ - **Capacity estimation** — Derives likely token limits from usage patterns when hard caps aren't published.
62
+ - **Multi-currency** — USD, GBP, EUR, JPY, AUD, CAD, CHF, CNY, SEK, NOK, DKK, NZD, SGD, HKD, KRW, INR, BRL.
48
63
 
49
- Silent background refresh every 30 seconds. Launches at login via macOS Login Items. No loading spinners — all periods are pre-fetched on launch.
64
+ Silent background refresh runs every 30 seconds. Period/provider data is cached and prefetched so tab switching feels instant.
50
65
 
51
66
  ### Interactive TUI dashboard
52
67
 
@@ -198,7 +213,7 @@ Two components, loosely coupled via CLI output:
198
213
  │ │ │ │
199
214
  │ Reads provider session files │ JSON │ Calls CLI with --format │
200
215
  │ Computes cost via LiteLLM rates ├─────►│ menubar-json │
201
- │ Daily cache (v5, atomic writes) │ │ @Observable state management │
216
+ │ Daily cache (v6, atomic writes) │ │ @Observable state management │
202
217
  │ 365-day historical backfill │ │ 30s cache TTL, prefetch on │
203
218
  │ Lock serialization for safety │ │ launch, concurrent fetch │
204
219
  │ │ │ guards │
@@ -207,7 +222,7 @@ Two components, loosely coupled via CLI output:
207
222
 
208
223
  **CLI pipeline:** Parse provider session files from disk → deduplicate by message ID → compute cost per token type (input, output, cache write, cache read, web search) → aggregate by period, project, model, activity → output as TUI, JSON, or CSV.
209
224
 
210
- **Menubar app:** Calls `exe-watcher status --format menubar-json --period <period> --provider <provider>` → decodes JSON → renders SwiftUI popover. All 5 periods are pre-fetched on launch for instant tab switching. Security: no shell injection — validated argv array passed directly, no `/bin/zsh -c`.
225
+ **Menubar app:** Calls `exe-watcher status --format menubar-json --period <period> --provider <provider>` → decodes JSON → renders SwiftUI popover. All 5 periods are pre-fetched on launch for instant tab switching. Security: no shell injection — validated argv arrays are passed directly to child processes, not through a shell.
211
226
 
212
227
  **Deduplication** per provider: API message ID (Claude), cumulative token cross-check (Codex), conversation/timestamp (Cursor), session+message ID (OpenCode), responseId (Pi/OMP).
213
228
 
@@ -215,13 +230,13 @@ Two components, loosely coupled via CLI output:
215
230
 
216
231
  ## Test suite
217
232
 
218
- 637 tests across 3 layers:
233
+ 648 tests across 3 layers:
219
234
 
220
235
  | Layer | Framework | Count | What it covers |
221
236
  |-------|-----------|-------|----------------|
222
- | **CLI data integrity** | Vitest | 594 | Schema validation, provider sum consistency, period monotonicity, project spend accuracy, 365-day history, token sanity checks |
223
- | **Swift state** | XCTest | 37 | Period windowing, cache isolation, prefetch logic, capacity estimation, CLI resolution, provider sum validation, JSON decode |
224
- | **UI smoke** | XCTest + Accessibility | 6 | App launch, status item presence, popover display, period switching via macOS Accessibility APIs |
237
+ | **CLI data integrity** | Vitest | 597 | Schema validation, provider sum consistency, period monotonicity, project spend accuracy, 365-day history, token sanity checks |
238
+ | **Swift state** | Swift Testing | 45 | Period windowing, cache isolation, prefetch logic, capacity estimation, CLI resolution, provider sum validation, JSON decode |
239
+ | **UI smoke** | Swift Testing + Accessibility | 6 | App launch, status item presence, popover display, period switching via macOS Accessibility APIs |
225
240
 
226
241
  ```bash
227
242
  # Run CLI tests
@@ -312,10 +327,10 @@ Watcher is forked from [codeburn](https://github.com/getagentseal/codeburn) by [
312
327
  - 8 provider support (added Cursor Agent, Copilot, OMP, Pi, OpenCode)
313
328
  - Native macOS menubar app with multi-period views, provider tabs, project spend, and subscription tracking
314
329
  - Exe OS integration — per-agent spend and memory tracking for AI employee teams
315
- - Daily cache system (v5) with atomic writes and cold-start 365-day backfill
330
+ - Daily cache system (v6) with atomic writes and cold-start/progressive 365-day backfill
316
331
  - Capacity estimation from usage patterns
317
332
  - Multi-currency support (17 currencies)
318
- - 637-test suite across CLI, Swift state, and UI smoke layers
333
+ - 648-test suite across CLI, Swift state, and UI smoke layers
319
334
  - Consolidated activity categories from 13 to 6
320
335
  - Fixed double-counting bugs in the menubar JSON pipeline
321
336
  - Performance: 7-day and 30-day queries from 2-5s down to ~1s via daily cache