Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Lixeas

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
35 changes: 22 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
<img src="NotchWatch/Resources/Images/notchwatch-corbeau-16-modified.svg" width="64" height="64" alt="NotchWatch logo">
<h1 align="center">
<img src="NotchWatch/Resources/Images/notchwatch-corbeau-16-modified.svg" width="40" height="40" valign="middle" alt="">
NotchWatch
</h1>

# NotchWatch
<p align="center">
<a href="https://github.com/Lixeas/NotchWatch/actions/workflows/test.yml"><img src="https://github.com/Lixeas/NotchWatch/actions/workflows/test.yml/badge.svg" alt="Test"></a>
<a href="https://github.com/Lixeas/NotchWatch/actions/workflows/release.yml"><img src="https://github.com/Lixeas/NotchWatch/actions/workflows/release.yml/badge.svg" alt="Release"></a>
<a href="https://github.com/Lixeas/NotchWatch/releases/latest"><img src="https://img.shields.io/github/v/release/Lixeas/NotchWatch?label=version" alt="Latest release"></a>
</p>

[![Test](https://github.com/Lixeas/NotchWatch/actions/workflows/test.yml/badge.svg)](https://github.com/Lixeas/NotchWatch/actions/workflows/test.yml)

A macOS menu bar application for monitoring Anthropic API credit consumption.
<p align="center">See your Anthropic API credit usage at a glance from the macOS menu bar — no dashboard, no dock icon, just a signal you read in passing.</p>

## Features

- Menu bar icon shown as a progress pill (color-coded: green / orange / red as you approach your limit)
- Real-time display of Anthropic API credit usage, 5h/7-day rate-limit windows
- Menu bar shows usage as colored text — `42% • $8.40` — the percentage itself carries the status color (green / orange / red as you approach your limit), no separate progress bar
- Estimated billing cycle date range in the dropdown (calendar-month approximation — Anthropic's usage API doesn't expose the real billing period)
- English / French toggle in Settings, applies app-wide immediately, defaults to English
- Secure OAuth token retrieval from the macOS Keychain (reuses Claude Code's login), with a manual override in Settings if it expires
- Automatic refresh on a configurable interval
- Launch at login (optional)
- VoiceOver labels on the menu bar icon and controls; motion respects Reduce Motion

## Installation

Expand Down Expand Up @@ -44,9 +51,9 @@ swift build -c release

## Usage

1. Launch the application — it lives only in the menu bar (no Dock icon).
2. Click the menu bar pill to see credit consumption, refresh, or open **Settings**.
3. In Settings: paste a manual auth token if the automatic one expired, change the refresh interval, or enable launch at login.
1. Launch the application — it lives only in the menu bar (no Dock icon), showing usage as `<percent>% • $<amount>`.
2. Click the menu bar item to see full consumption details, the estimated billing cycle, refresh, or open **Settings**.
3. In Settings: paste a manual auth token if the automatic one expired, change the refresh interval, switch language (English/French), or enable launch at login.

### Keychain access prompt

Expand All @@ -64,13 +71,13 @@ claude login

This refreshes the token Claude Code stores in the Keychain — NotchWatch picks it up automatically on the next refresh, no further action needed.

If you can't run `claude login` (no CLI on this machine, different account, etc.), paste a token manually in **Settings → Jeton d'authentification**:
If you can't run `claude login` (no CLI on this machine, different account, etc.), paste a token manually in **Settings → Authentication Token**:

1. Get a fresh OAuth access token — either from `claude login` on any machine, or by extracting the one Claude Code already has stored:
```sh
security find-generic-password -s "Claude Code-credentials" -w | python3 -c "import json,sys; print(json.load(sys.stdin)['claudeAiOauth']['accessToken'])"
```
2. Paste it into the token field in Settings — it saves automatically as you type, no button to click.
2. Paste it into the token field in Settings — it saves automatically as you type (debounced), no button to click.
3. Leave the field empty to go back to the automatic Claude Code token.

Bonus: once a manual token is set, NotchWatch reads it from its own Keychain entry instead of Claude Code's — no more cross-app Keychain permission prompts.
Expand All @@ -84,11 +91,13 @@ Bonus: once a manual token is set, NotchWatch reads it from its own Keychain ent

- `swift build` / `swift test` — build and run the unit tests locally (or let the [Test workflow](.github/workflows/test.yml) do it on a real macOS runner on every push/PR).
- `.github/workflows/release.yml` — tag `vX.Y.Z` and push it (or run manually via `workflow_dispatch`) to build the `.app`, package a `.dmg`, publish a GitHub Release, and bump `Casks/notch-watch.rb` automatically.
- User-facing strings live in `NotchWatch/Localization.swift` (`Strings` namespace, EN/FR pairs) — add both languages together when introducing new copy.
- `PRODUCT.md` and `DESIGN.md` document the product intent and visual system respectively; read them before changing UI.

## Contributing

Contributions are welcome. Please follow the standard GitHub flow.

## License

This project is licensed under the MIT License.
This project is licensed under the [MIT License](LICENSE).
Loading