Skip to content

lumenworksco/Tokn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tokn

Tokn icon

Track your Claude.ai session and weekly usage from the macOS menu bar — built from scratch so you know exactly what it does with your session key.

macOS 14+ Swift License Release


Download

Download for macOS
macOS 14.0 Sonoma or later  ·  Apple Silicon & Intel  ·  Free & open source

  1. Download the .dmg from the latest release
  2. Open it and drag Tokn into the Applications folder
  3. Launch it — a coloured dot and percentage appear in your menu bar

First launch: macOS may show a security prompt. Right-click → Open, or go to System Settings → Privacy & Security and click Open Anyway.


What it shows

  • Session (5h) — usage within the current 5-hour rolling window, with exact time until reset
  • Weekly (7d) — usage across the current 7-day window
  • Colour-coded status: green (safe) → orange (≥50%) → red (≥80%)
  • Menu bar dot updates colour in real time so you can tell at a glance without opening the popover
  • Auto-updates — checks for new versions on launch and installs them in one click

Setup

  1. Open claude.ai in Chrome or Safari
  2. Open DevTools (⌘⌥I)
  3. Go to Application → Cookies → claude.ai
  4. Copy the value of the sessionKey cookie — it starts with sk-ant-
  5. Click the Tokn icon in your menu bar and paste it in

Your session key is stored only in the macOS Keychain — never written to disk or sent anywhere other than claude.ai.


Usage

Action How
Open popover Click the Tokn dot/percentage in your menu bar
Refresh now Click the button in the top-right of the popover
Change refresh interval Settings → Refresh interval
Remove session key Settings → Remove session key
Quit Click Quit in the popover footer

Building from source

Requires Xcode 16+ and macOS 14+.

git clone https://github.com/lumenworksco/Tokn.git
cd Tokn
open Tokn.xcodeproj

Hit ⌘R in Xcode. No dependencies, no package manager.

Or from the command line:

xcodebuild -project Tokn.xcodeproj -scheme Tokn -configuration Release \
  CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO

To regenerate the app icon at all sizes:

swift scripts/generate_icons.swift

Architecture

Layer Files
Entry point Tokn/ToknApp.swift
App state Tokn/App/AppModel.swift
Models Tokn/Models/
Keychain + Settings Tokn/Repositories/
Network + Usage + Updates Tokn/Services/
UI Tokn/Views/

Two API endpoints are used — GET /api/organizations (resolves your org UUID on first run) and GET /api/organizations/{id}/usage (fetches the usage data). All source is plain Swift with zero third-party dependencies, so the full behaviour is auditable in a few hundred lines.


Contributing

Pull requests are welcome. For major changes please open an issue first to discuss the approach.

  1. Fork the repo
  2. Create a feature branch (git checkout -b feature/my-feature)
  3. Commit your changes (git commit -m 'Add my feature')
  4. Push to the branch (git push origin feature/my-feature)
  5. Open a Pull Request

License

MIT © 2026 lumenworksco

About

Claude.ai session and weekly usage in your macOS menu bar

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages