explaingit

nanako0129/tokenbar

Analysis updated 2026-05-18

64SwiftAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

TokenBar is a macOS menu bar app that tracks AI token usage and cost across 25+ coding tools like Claude Code, Codex, and Cursor by reading local logs.

Mindmap

mindmap
  root((TokenBar))
    What it does
      Menu bar token monitor
      Tracks 25 plus AI tools
      Reads local session logs
    Tech stack
      Swift
      Rust
      Sparkle updates
    Use cases
      Watch token cost live
      Track subscription quota
      Compare models by cost
    Audience
      Developers using AI tools

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

See today's AI token usage and estimated cost at a glance from the menu bar.

USE CASE 2

Track how much of your subscription quota remains as a ring, bars, or a popsicle shape.

USE CASE 3

Compare cost across AI models and sub-agents in a popover dashboard.

USE CASE 4

View a full year of token usage on an interactive 3D graph.

What is it built with?

SwiftRustSwiftUISparkle

How does it compare?

nanako0129/tokenbarthanhng8/supertonic-tooljaydenjcpy/eeveespotifyreincarnated
Stars646168
LanguageSwiftSwiftSwift
Setup difficultyeasymoderatehard
Complexity2/53/54/5
Audiencedeveloperdevelopergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Requires Apple Silicon and macOS 14+, with macOS 26 needed for the full visual style.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

TokenBar is a macOS menu bar app that monitors how many AI tokens you are using across more than 25 different AI coding tools. Tokens are the unit AI models use to measure text input and output, and each token costs a small amount of money (or consumes a portion of a subscription quota). If you use tools like Claude Code, Codex, Cursor, or Gemini CLI regularly, this app tracks your usage by reading local session log files on your machine, with no data sent anywhere externally. The menu bar icon shows a small summary at a glance: today's token count, estimated cost, tokens-per-minute rate, or how much of your subscription window remains. The remaining quota can be displayed as signal bars, a ring, or a popsicle shape that gradually empties. There is also a running cat animation that moves faster the more tokens you are burning, an idea traced back to the RunCat app. Clicking the icon opens a popover dashboard with six views: a breakdown by AI model ranked by cost, a daily usage calendar, an hourly chart showing when during the day you use tokens, a summary of statistics and usage streaks, a ranking of AI sub-agents by cost, and settings. The dashboard also includes an interactive 3D graph displaying a full year of usage history that you can rotate. Keyboard shortcuts control navigation between tabs and toggle views. The app is built in two layers. A Rust library handles all the data work: parsing session logs from the supported tools, deduplicating entries, calculating costs based on per-model pricing, and fetching subscription quota information. Swift wraps that library and handles everything visual: the menu bar item, the SwiftUI interface, and automatic updates via Sparkle. Building from source requires running make to compile the Rust library first, then building the Swift package. Installation is via Homebrew with a single command. The app requires Apple Silicon and macOS 14 or later, macOS 26 is needed for the full visual style. It is MIT licensed.

Copy-paste prompts

Prompt 1
Walk me through installing TokenBar with Homebrew on my Apple Silicon Mac.
Prompt 2
Explain how TokenBar reads local session logs instead of sending data externally.
Prompt 3
Show me how the daily, hourly, and stats views in the dashboard differ.
Prompt 4
Help me build TokenBar from source using make and the Rust library.

Frequently asked questions

What is tokenbar?

TokenBar is a macOS menu bar app that tracks AI token usage and cost across 25+ coding tools like Claude Code, Codex, and Cursor by reading local logs.

What language is tokenbar written in?

Mainly Swift. The stack also includes Swift, Rust, SwiftUI.

What license does tokenbar use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is tokenbar to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is tokenbar for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.