explaingit

dennykim123/claude-codex-battery

Analysis updated 2026-05-18

79SwiftAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

A macOS menu bar widget showing remaining Claude Code and Codex usage limits as battery icons, ships as both a native app and a SwiftBar plugin.

Mindmap

mindmap
  root((Claude Codex Battery))
    What it shows
      Claude usage
      Codex usage
      Reset times
    Tech stack
      Swift
      JavaScript
      Bun
    Distribution
      Native app
      SwiftBar plugin
    Data source
      Anthropic usage API
      OpenAI usage API

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

Check remaining Claude Code and Codex usage without running /usage manually.

USE CASE 2

Get a menu bar warning before hitting a Claude Code or Codex usage limit.

USE CASE 3

See a cost and token breakdown of daily Claude Code usage with ccusage.

What is it built with?

SwiftJavaScriptBunSwiftBar

How does it compare?

dennykim123/claude-codex-batteryashertrockman/touchscalelicoy/codex-runway
Stars798276
LanguageSwiftSwiftSwift
Last pushed2015-11-03
MaintenanceDormant
Setup difficultyeasyeasyeasy
Complexity2/51/53/5
Audiencedevelopergeneraldeveloper

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

How do you get it running?

Difficulty · easy Time to first run · 5min

Native app needs no setup beyond a Claude Code login, the SwiftBar variant needs SwiftBar and bun installed first.

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

In plain English

Claude Codex Battery is a macOS menu bar widget that shows how much of your Claude Code and Codex usage allowance you have left, displayed as battery icons so you do not have to keep running the /usage command to check. One battery is labeled C for Claude and another X for Codex, and each one shows the remaining percentage of a usage window, going from full and green when there is plenty left down to red when you are almost out. Clicking the widget opens a dropdown with more detail, including when each limit resets. It ships in two forms. The first is a signed and notarized native Mac app that you can just download and double-click to install, with no other setup needed beyond having Claude Code logged in on the same Mac. The second is a SwiftBar plugin, a single self-contained script with no third-party libraries, which needs SwiftBar and the bun JavaScript runtime installed first. The battery icon images themselves are drawn from scratch in plain JavaScript rather than pulled from an image library. The widget works by calling the official usage endpoints that Anthropic and OpenAI already expose, reusing your existing local login for each tool rather than asking for new credentials. This is the same data shown by Claude Code's own /usage command and Codex's /status command. An optional daily check looks for a newer version of the widget and can install it automatically. The optional ccusage tool can be added for a more detailed cost and token breakdown, but the widget works fully without it. The project is released under the MIT license and only runs on macOS.

Copy-paste prompts

Prompt 1
Walk me through installing the Claude Codex Battery SwiftBar plugin with bun.
Prompt 2
Explain how this widget reads my Claude Code usage without a new login.
Prompt 3
Set up the native macOS app version of Claude Codex Battery on my Mac.

Frequently asked questions

What is claude-codex-battery?

A macOS menu bar widget showing remaining Claude Code and Codex usage limits as battery icons, ships as both a native app and a SwiftBar plugin.

What language is claude-codex-battery written in?

Mainly Swift. The stack also includes Swift, JavaScript, Bun.

What license does claude-codex-battery use?

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

How hard is claude-codex-battery to set up?

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

Who is claude-codex-battery for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.