cost-bubble 1.0.0 → 1.0.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 CHANGED
@@ -1,90 +1,80 @@
1
1
  # Cost Bubble
2
2
 
3
- **Live session cost and context monitoring for Codex, Claude Code, and Antigravity on macOS, Windows and Linux.**
4
-
5
- Cost Bubble sits as a lightweight native floating pill right beside your AI coding app’s sidebar—keeping the open session’s estimated spend, context-window fill, and active background chats visible at a glance without breaking your flow.
3
+ A lightweight floating pill that shows live session cost and context fill right beside your **Codex**, **Claude Code**, or **Antigravity** sidebar—on **macOS**, **Windows**, and **Linux**.
6
4
 
7
5
  <p align="center">
8
- <img src="docs/demo.gif" alt="Cost Bubble follows sample Codex chats, expands to show today’s sessions, and reveals the context window split, hourly burn chart, cost drivers, and clickable subagents on hover" width="840" />
6
+ <img src="docs/demo.gif" alt="Cost Bubble following Codex chats, expanding on hover, and opening context and cost breakdowns on click" width="840" />
9
7
  </p>
10
8
 
11
- ## What It Shows
12
-
13
- - **Live session pulse** — Automatically follows your open chat (`▸`) in **Codex**, **Claude Code**, or **Antigravity Desktop**, plus up to two other chats ranked by recent spend, weighted with a 150-second half-life.
14
- - **Input token gauge** — Four bars show the latest request’s input size. Their color changes at 50k, 100k, 200k and 300k tokens. Hover for a segmented cached/fresh context bar, headroom, and pricing-tier status. Purple dots underneath mark active subagents.
15
- - **Instant cost breakdown** — Hover or click any price for 5-minute, hourly, daily, and lifetime spend, spend mix with cache-hit efficiency and estimated cache-miss overhead, a 1-hour stacked burn chart, top cost drivers with timestamps, and clickable Codex subagents.
16
- - **Recent sessions on hover** — Hover the pill to compare recent chats, see today’s spend, sort by recent activity, daily cost or recency, or click any title to switch chats. Click outside or `×` to dismiss pinned popups.
17
- - **Native & unobtrusive** — Built with native desktop integration. Drag or resize per app; stays quietly available on New Chat screens in Codex, Claude Code, and Antigravity while hiding on ordinary non-Code Claude chats.
9
+ - **Live spend & context at a glance** — Follows your active chat automatically, with a 4-bar input gauge (color-coded up to 300k+ tokens) and purple dots for active subagents.
10
+ - **Click for breakdowns** — Click any **price** for 5-min / 1-hr / daily / lifetime spend, cache efficiency, hourly burn chart, cost drivers, and clickable subagents. Click the **signal bars** for cached vs. fresh context and headroom.
11
+ - **Switch chats from the pill** — Hover to compare today’s sessions and daily total, sort by activity or cost, or click any title to jump straight to that chat.
18
12
 
19
13
  ---
20
14
 
21
15
  ## Install
22
16
 
23
- Choose the download for your computer from the [latest release](https://github.com/anopows/cost-bubble/releases/latest).
17
+ ### macOS
24
18
 
25
- | Platform | Install |
26
- | --- | --- |
27
- | macOS 14 or later, Intel or Apple Silicon | Open **Cost-Bubble-macOS.zip**, move **Cost Bubble.app** into Applications, then open it. The universal app is signed and notarized. |
28
- | Windows 10/11, x64 or ARM64 | Run the **-setup.exe** for your system type. It installs for your Windows user. The installer is unsigned, so SmartScreen may ask you to confirm the publisher. |
29
- | Ubuntu 24.04, amd64 or arm64 | Download the matching **.deb**. From its folder run `sudo apt install ./cost-bubble_1.0.0_amd64.deb` (use `arm64` on ARM). Open **Cost Bubble** from the applications menu. |
30
- | Other compatible Linux distributions | Download the matching **.AppImage**, make it executable in file properties, then open it. |
19
+ ```sh
20
+ curl -fsSL https://raw.githubusercontent.com/anopows/cost-bubble/main/scripts/install.sh | bash
21
+ ```
31
22
 
32
- On macOS, `npx cost-bubble@latest install` also installs the app and enables it at login. Use that command to upgrade an existing npm installation. On Linux, the floating HUD uses X11. Wayland desktops with AppIndicator support show spend in the tray.
23
+ Or `npx cost-bubble@latest install`, or download **[Cost-Bubble-macOS.zip](https://github.com/anopows/cost-bubble/releases/latest/download/Cost-Bubble-macOS.zip)**.
33
24
 
34
- ### Enable Accessibility
25
+ > **First run:** Enable **Cost Bubble** in **System Settings → Privacy & Security → Accessibility** (or click the menu bar gauge icon → *Open Accessibility Settings…*).
35
26
 
36
- Cost Bubble uses macOS Accessibility to detect the active chat, align beside the sidebar, and jump to a chat when clicked.
27
+ ### Windows
37
28
 
38
- 1. Click the gauge icon in the macOS menu bar and choose **Open Accessibility Settings…** (or open **System Settings → Privacy & Security → Accessibility**).
39
- 2. Turn on **Cost Bubble**. If it isn’t listed, click **+**, press **⌘⇧G**, enter `~/Applications/Cost Bubble.app`, and click **Open**.
40
- 3. Open an existing chat in **Codex**, the **Code** section of **Claude Desktop**, or **Antigravity Desktop** to see the pill appear beside the sidebar.
29
+ ```powershell
30
+ irm https://raw.githubusercontent.com/anopows/cost-bubble/main/scripts/install.ps1 | iex
31
+ ```
41
32
 
42
- ---
33
+ Or download the installer: **[x64](https://github.com/anopows/cost-bubble/releases/latest/download/Cost-Bubble-Windows-x64-setup.exe)** · **[ARM64](https://github.com/anopows/cost-bubble/releases/latest/download/Cost-Bubble-Windows-arm64-setup.exe)**.
43
34
 
44
- ## Using the Pill
35
+ ### Linux
45
36
 
46
- | Action | What happens |
47
- | --- | --- |
48
- | **Hover the pill** | Expands to show the current chat (`▸`) plus other chats active today (from your 12 most recent). |
49
- | **Hover the signal bars** | Shows the latest request’s cached/fresh context split, headroom, and pricing tier. **Click** to pin it open (click outside or `×` to close). |
50
- | **Hover a price** | Opens the full cost breakdown: 5-min / 1-hr / today / lifetime spend, spend mix & cache-miss overhead, 1-hour stacked burn chart, top cost drivers, and clickable Codex subagents. **Click** to pin it open. |
51
- | **Click a chat title** | Switches directly to that chat in the active desktop app. *(Antigravity leaves its picker open if multiple titles match.)* |
52
- | **Read the header total** | Shows today’s combined spend across this app’s chats. Lifetime estimates appear in each chat’s price breakdown. |
53
- | **Click `⇅`** | Cycles row order between **Decay**, **Cost**, and **Recent**. |
54
- | **Drag the left edge, pinch, or `−` / `+`** | Moves or resizes the pill—each desktop app remembers its own position. Use **`≡`** for pin, auto-fit, 12-chat history, and reset options. |
37
+ ```sh
38
+ curl -fsSL https://raw.githubusercontent.com/anopows/cost-bubble/main/scripts/install.sh | bash
39
+ ```
40
+
41
+ Or download **[AppImage (x86_64)](https://github.com/anopows/cost-bubble/releases/latest/download/Cost-Bubble-Linux-x86_64.AppImage)** · **[AppImage (ARM64)](https://github.com/anopows/cost-bubble/releases/latest/download/Cost-Bubble-Linux-aarch64.AppImage)** · **[.deb packages](https://github.com/anopows/cost-bubble/releases/latest)**. *(Floating pill uses X11; Wayland shows spend in the tray.)*
55
42
 
56
43
  ---
57
44
 
58
- ## How Estimates Work
45
+ ## Controls
59
46
 
60
- - **Direct local pricing:** Reads your local session logs directly and prices token usage against [LiteLLM](https://github.com/BerriAI/litellm)’s public pricing catalog (refreshed daily to a local cache, with a bundled offline fallback). A **`—`** means pricing is unavailable; sessions with incomplete pricing show the sum of their priced requests. Estimates may differ from subscription invoices or API bills.
61
- - **Fast requests:** Codex uses the recorded response tier when available and falls back to the chat’s recorded speed. Fast, priority and Ultrafast estimates include the applicable cache and long-context rates. Claude uses the speed recorded on each response. A recognized premium tier without a known price is shown as unpriced. Antigravity estimates use the recorded model and tokens; its workflow mode alone does not establish a billing tier.
62
- - **Input token bars:** Mint, cyan, yellow, orange and red mark progressively larger input sizes including cached input. Hover for the exact token count and the context-window share when recorded.
63
- - **Subagents & auto-reviewers:** Up to four purple dots underneath the signal bars indicate ordinary subagents. Automatic reviewers are separated into their own row in the cost breakdown and included in totals when priced.
64
- - **Per-request vs. per-turn rates:** Latest, average, and peak figures measure individual requests in Codex and Antigravity, or turns in Claude Code. If a refresh fails, the pill retains its last successful reading and continues aging spend out of the 5-minute window.
65
- - **Local-only readers:** The Rust readers normalize each app’s local storage and cache parsed usage. Custom `CODEX_HOME` and `CLAUDE_CONFIG_DIR` paths are preserved at install time.
47
+ | Action | Result |
48
+ | --- | --- |
49
+ | **Hover pill** | Expand today’s sessions and daily total |
50
+ | **Click price** | Toggle cost breakdown (hourly burn, spend mix, drivers, subagents) |
51
+ | **Click signal bars** | Toggle context window & cache breakdown |
52
+ | **Click chat title** | Jump to that chat |
53
+ | **Click outside / `Esc` / `×`** | Close open breakdown |
54
+ | **Drag, left edge, `−` / `+`, `⇅`, `≡`** | Move, resize, zoom, sort, or change theme & options per app |
66
55
 
67
56
  ---
68
57
 
69
- ## Update & Uninstall
58
+ ## How Estimates Work
70
59
 
71
- - **Windows and Linux:** Install the latest matching package to update. Use Installed Apps on Windows, your package manager for the Debian package, or remove the downloaded AppImage.
72
- - **macOS update with npm:** Re-run `npx cost-bubble@latest install`.
73
- - **Quit temporarily:** Click the menu bar gauge icon and choose **Quit Cost Bubble**.
74
- - **Uninstall:** Unload the login agent, move the items below to the Trash, and optionally remove **Cost Bubble** from Accessibility Settings.
60
+ Cost Bubble reads your local session logs directly and prices token usage against [LiteLLM](https://github.com/BerriAI/litellm)’s public pricing catalog. Everything stays on your machine; estimates may differ from API or subscription bills.
75
61
 
76
- ```sh
77
- launchctl bootout "gui/$(id -u)/io.github.anopows.cost-bubble"
78
- ```
62
+ <details>
63
+ <summary>Pricing, update & uninstall details</summary>
79
64
 
80
- - `~/Applications/Cost Bubble.app`
81
- - `~/Library/LaunchAgents/io.github.anopows.cost-bubble.plist`
82
- - `~/Library/Caches/io.github.anopows.cost-bubble/` *(optional pricing and scan cache)*
65
+ - **Fast & priority tiers:** Codex and Claude fast/priority/ultrafast requests use their recorded speed tier when priced; unrecognized premium tiers display as unpriced (`—`).
66
+ - **Subagents & reviewers:** Purple dots mark active subagents; automatic reviewers appear in their own breakdown row and are included in totals.
67
+ - **Custom config paths:** `CODEX_HOME` and `CLAUDE_CONFIG_DIR` are respected automatically.
68
+ - **Update:** Re-run your platform’s install command above.
69
+ - **Uninstall:**
70
+ - **Windows:** Remove **Cost Bubble** from **Settings → Apps → Installed Apps**.
71
+ - **Linux:** `sudo apt remove cost-bubble` (for `.deb`), or delete `~/.local/bin/cost-bubble` and `~/.local/share/applications/cost-bubble.desktop`.
72
+ - **macOS:** Run `launchctl bootout "gui/$(id -u)/io.github.anopows.cost-bubble"` and delete `~/Applications/Cost Bubble.app`, `~/Library/LaunchAgents/io.github.anopows.cost-bubble.plist`, and optionally `~/Library/Caches/io.github.anopows.cost-bubble/`.
73
+
74
+ </details>
83
75
 
84
76
  ---
85
77
 
86
78
  ## Development
87
79
 
88
- See the [cross-platform build and test instructions](v1/README.md) and [macOS signing instructions](docs/signed-releases.md).
89
-
90
- Released under the [MIT License](LICENSE).
80
+ See [v1/README.md](v1/README.md) to build and test from source, or [docs/signed-releases.md](docs/signed-releases.md) for macOS signing. Released under the [MIT License](LICENSE).
package/docs/demo.gif CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cost-bubble",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "macOS installer for the Cost Bubble cross-platform desktop HUD.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.0",
2
+ "version": "1.0.1",
3
3
  "teamID": "4YJ6CF8CRP",
4
- "sha256": "fa1b98afd5306f47eee1b7fb9f9afa188019e1fd4c726df14545f8e0537af125"
4
+ "sha256": "c43aae675d79493eeeb7d5b48ffea1619c946d451754477cab2c9c0978d6a63e"
5
5
  }