An xbar plugin that displays your current Claude Code usage on your Mac's toolbar This article describes a Python plugin for xbar, a macOS toolbar utility, that displays a user's daily Claude Code token usage. The script fetches usage statistics by running the `npx cusage@latest -j` command and formats the token count with human-readable suffixes like "K" or "M". If data is unavailable or an error occurs, the toolbar shows an error message or "0 tokens" for no usage. claude tokens.5m.py This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters Show hidden characters /usr/bin/env python3