Claude Code status line

waybar-ai-usage

Displays Claude Code and Codex usage in the Waybar status bar on Linux.

55 stars 10 forksStatus lines Source

Install

Install
uv tool install git+https://github.com/NihilDigit/waybar-ai-usage
From source
git clone https://github.com/NihilDigit/waybar-ai-usage.git

From the README

Waybar AI Usage

Monitor Claude Code, OpenAI Codex CLI, GitHub Copilot, OpenCode Zen, and Z.ai usage directly in your Waybar status bar.

This tool displays your AI coding assistant usage limits in real-time by reading browser cookies or API tokens. No API key needed for Claude, Codex, or OpenCode Zen — they use the browser session you're already signed into.

Contents

- What This Monitors
- Requirements
- Installation
- Setup — Claude, Codex, Copilot, Zen, Z.ai
- Usage
- Formatting Configuration — see also docs/formatting.md
- Display States
- Troubleshooting
- Contributing — see also CLAUDE.md

What This Monitors

- Claude Code: Claude's AI-powered code editor
  - 5-hour usage window
  - 7-day usage window
- OpenAI Codex CLI: OpenAI's command-line coding assistant
  - Primary (5-hour) window
  - Secondary (7-day) window
- GitHub Copilot: Monthly premium request quota (Pro/Pro+)
  - Requests consumed vs. included quota (default: 300)
  - Countdown to monthly reset (1st of month, 00:00 UTC)
- OpenCode Zen: Pay-as-you-go balance for curated coding models
  - Current account balance in USD
  - Color-coded warnings when balance is low
  - No API key needed - uses browser cookies
- Z.ai: Usage quota monitoring (GLM models)
  - 5-hour token usage window (percentage + reset timer)
  - Monthly tool quota (web search, web reader, ZRead)
  - Uses API token from config file

Requirements

- Linux with Waybar running
- A signed-in browser session for whichever cookie-based providers you monitor — Claude.ai, ChatGPT, OpenCode. See Setup for the supported browser list.
- GitHub fine-grained PAT — required for Copilot (see Setup)
- Z.ai API token — required for Z.ai (see Setup)
- Python 3.11+ and uv (install uv)

Installation

Method 0: AUR (Recommended on Arch)

Method 1: Using uv…
Read the full README on GitHub

How status lines work

  • A status line is a command Claude Code runs to draw the bar under the prompt. It gets the session as JSON on stdin (model, folder, cost, context) and prints one or more lines.
  • Point the statusLine setting in ~/.claude/settings.json at it: { "statusLine": { "type": "command", "command": "<the command from the README>" } }.
  • Or run /statusline inside Claude Code and describe what you want.
Claude Code docs

Details

Language
Python
License
MIT
Last updated
18 September 2026

FAQ

What is waybar-ai-usage?

Displays Claude Code and Codex usage in the Waybar status bar on Linux. It is a status line for Claude Code, from NihilDigit/waybar-ai-usage on GitHub.

How do I install waybar-ai-usage?

Run uv tool install git+https://github.com/NihilDigit/waybar-ai-usage, then follow the setup in the README.

Is waybar-ai-usage popular?

NihilDigit/waybar-ai-usage has 55 GitHub stars and 10 forks. It was last updated on 18 September 2026.

More status lines

Browse the most popular Claude Code mods, all status lines, or the skills and MCP server directories.