|
1 | | -# mad-eye ποΈ |
| 1 | +<div align="center"> |
2 | 2 |
|
3 | | -Mad-Eye Moody in your macOS menubar, watching your Claude subscription usage limits. The Eye gets more agitated as you approach a limit; click it for the detailed Gauges. |
| 3 | +<img src="assets/hero.svg" alt="mad-eye" width="140" height="140" /> |
4 | 4 |
|
5 | | -## Develop |
| 5 | +# mad-eye |
| 6 | + |
| 7 | +**Your Claude usage limits, watching you back.** |
| 8 | + |
| 9 | +A macOS menubar app that shows your Claude subscription usage as an animated eye β |
| 10 | +[Mad-Eye Moody](https://harrypotter.fandom.com/wiki/Alastor_Moody) style. The Eye gets more |
| 11 | +agitated as you approach a limit, and its ring shatters when you hit 100%. No numbers in your |
| 12 | +menubar β just an Eye that tells you how close you are at a glance. |
| 13 | + |
| 14 | +[](https://github.com/kvnwolf/mad-eye/actions/workflows/ci.yml) |
| 15 | +  |
| 16 | +  |
| 17 | +  |
| 18 | + |
| 19 | +<br/> |
| 20 | + |
| 21 | +<!-- Add assets/demo.gif before launch β see assets/CAPTURE.md --> |
| 22 | +<img src="assets/demo.gif" alt="mad-eye animating in the menubar" width="640" /> |
| 23 | + |
| 24 | +</div> |
| 25 | + |
| 26 | +--- |
| 27 | + |
| 28 | +## Why |
| 29 | + |
| 30 | +If you live in Claude Code, you want an ambient sense of *"how close am I to my limit?"* |
| 31 | +without opening a dashboard. mad-eye puts that in your menubar as a single Eye: |
| 32 | + |
| 33 | +- a **calm, slow glance** when you've got headroom, |
| 34 | +- a **frantic dart** when you're about to run out, |
| 35 | +- a **cracked, frozen stare** when you've hit the wall. |
| 36 | + |
| 37 | +Click it for the detailed gauges. |
| 38 | + |
| 39 | +## The moods |
| 40 | + |
| 41 | +The Eye tracks **one** gauge β your **Session** limit by default. Click any gauge in the |
| 42 | +popover to make it the one that drives the Eye (it remembers your choice). |
| 43 | + |
| 44 | +| Usage | Mood | The Eye⦠| |
| 45 | +|:--:|:--|:--| |
| 46 | +| `< 50%` | π **Calm** | slow, wide glances | |
| 47 | +| `< 80%` | π **Nervous** | quicker, tighter darts | |
| 48 | +| `< 95%` | π° **Paranoid** | fast, wide, restless | |
| 49 | +| `< 100%` | π± **Frantic** | can't sit still | |
| 50 | +| `100%` | π₯ **Shattered** | the ring cracks, the eye freezes | |
| 51 | + |
| 52 | +<div align="center"> |
| 53 | +<!-- Add assets/popover.png before launch β see assets/CAPTURE.md --> |
| 54 | +<img src="assets/popover.png" alt="the popover with usage gauges" width="360" /> |
| 55 | +</div> |
| 56 | + |
| 57 | +## Install |
| 58 | + |
| 59 | +### Homebrew (recommended) |
6 | 60 |
|
7 | 61 | ```sh |
| 62 | +brew install --cask kvnwolf/tap/mad-eye |
| 63 | +``` |
| 64 | + |
| 65 | +### Manual |
| 66 | + |
| 67 | +Download the latest `.dmg` from [**Releases**](https://github.com/kvnwolf/mad-eye/releases), |
| 68 | +open it, and drag **mad-eye** into Applications. |
| 69 | + |
| 70 | +> It's an unsigned build, so the first time: **right-click β Open** (or run |
| 71 | +> `xattr -dr com.apple.quarantine /Applications/mad-eye.app`). Homebrew does this for you. |
| 72 | +
|
| 73 | +## Requirements |
| 74 | + |
| 75 | +- **macOS Monterey or later.** |
| 76 | +- **[Claude Code](https://claude.com/claude-code) installed and logged in.** mad-eye reads your |
| 77 | + usage from the same credentials Claude Code stores β no Claude Code, no data (the Eye goes dark). |
| 78 | + |
| 79 | +## Privacy & trust |
| 80 | + |
| 81 | +mad-eye reads your Claude OAuth token from the macOS Keychain **(read-only)** and calls |
| 82 | +Anthropic's usage endpoint β the same data behind Claude Code's `/usage` panel. That's the whole |
| 83 | +story: |
| 84 | + |
| 85 | +- π **Your token never leaves your Mac** except to `api.anthropic.com`. |
| 86 | +- π« **No telemetry, no analytics, no servers.** There's no backend β just your Mac and Anthropic. |
| 87 | +- π **It never writes or refreshes your credentials** β strictly read-only. If the token expires, |
| 88 | + the Eye just goes blind until Claude Code refreshes it. |
| 89 | +- On first launch macOS asks to read the *"Claude Code-credentials"* Keychain item β click |
| 90 | + **Always Allow**. |
| 91 | + |
| 92 | +Don't take my word for it β read the [Keychain read](src-tauri/src/keychain/read.rs) and the |
| 93 | +[usage fetch](src-tauri/src/usage/client.rs) yourself. That's the whole point of open-sourcing it. |
| 94 | + |
| 95 | +## How it works |
| 96 | + |
| 97 | +- A **Rust core** renders the Eye directly to a monochrome template tray icon (tiny-skia, no image |
| 98 | + assets) and animates the pupil ~30fps by mood. |
| 99 | +- It polls Anthropic's OAuth usage endpoint (undocumented β a future change on their side could |
| 100 | + break it) and maps the limits to gauges + a mood. |
| 101 | +- The **popover** is a native frosted panel β vanilla TypeScript, macOS vibrancy, theme-aware. |
| 102 | +- It's a **ghost app**: no Dock icon, no β-Tab. Launch-at-login and Quit live in the Eye's |
| 103 | + right-click menu. |
| 104 | + |
| 105 | +## Development |
| 106 | + |
| 107 | +```sh |
| 108 | +git clone https://github.com/kvnwolf/mad-eye |
| 109 | +cd mad-eye |
8 | 110 | bun install |
9 | | -bun tauri dev # native app: menubar Eye + Popover |
10 | | -bunx dobby dev # Popover UI only, in the browser |
| 111 | +bun tauri dev # the native app: menubar Eye + popover |
11 | 112 | ``` |
12 | 113 |
|
13 | | -## Build |
| 114 | +Drive the Eye through every mood without burning real usage: |
14 | 115 |
|
15 | 116 | ```sh |
16 | | -bun tauri build |
| 117 | +MAD_EYE_FAKE_PCT=97 bun tauri dev # 40 calm Β· 70 nervous Β· 90 paranoid Β· 97 frantic Β· 100 shattered |
17 | 118 | ``` |
| 119 | + |
| 120 | +Releases are cut with the [`release`](.claude/skills/release/SKILL.md) skill (universal DMG β |
| 121 | +GitHub Release β Homebrew cask). |
| 122 | + |
| 123 | +## License |
| 124 | + |
| 125 | +[MIT](LICENSE) Β© Kevin Wolf |
| 126 | + |
| 127 | +--- |
| 128 | + |
| 129 | +<div align="center"><sub>Built with π¦ Rust + <a href="https://tauri.app">Tauri</a> Β· not affiliated with Anthropic</sub></div> |
0 commit comments