m0squared-indicator
v1.0.4
Published
M0² — Universal AI Agent Token Usage HUD for Claude Code, Codex CLI & Gemini CLI
Maintainers
Readme
M0² — M-zero-Squared
Real-time token usage indicator for AI coding agents
What is M0²?
M0² is a live HUD that sits inside your AI coding agent and shows you exactly how much of your token quota you've consumed — in real time, right where you work.
No more getting cut off mid-task. No more opening dashboards. No more guessing.
Start full. Watch it drain. Know when to stop.
Supported Agents
| Agent | Status | Integration |
|---|---|---|
| Claude Code | ✅ Full support | Native statusLine hook — live in the status bar |
| Codex CLI | ✅ Supported | PostToolUse hook — tracks every response |
| Gemini CLI | ✅ Supported | AfterTool hook — tracks every response |
More agents coming. PRs welcome.
Install
Pick your method — they all do the same thing.
npx (recommended — no install needed)
npx m0squared-indicator installnpm
npm install -g m0squared-indicator
m0squared-indicator installpip
pip install m0squared-indicator
m0squared-indicator installcurl (Linux / macOS)
curl -sSL https://raw.githubusercontent.com/m0squared/m0s-indicator/main/scripts/install.sh | bashPowerShell (Windows)
irm https://raw.githubusercontent.com/m0squared/m0s-indicator/main/scripts/install.ps1 | iexHow it works
M0² auto-detects which AI agents are installed on your machine and patches their config files silently. After a restart, the HUD appears automatically.
Usage
Configuration
After install, a config file is created at ~/.m0squared/config.json:
| Key | Values | Description |
|---|---|---|
| plan | auto pro max payg free | Override plan auto-detection |
| bar_width | number | Width of the progress bar (default: 20) |
| *.session_token_limit | number | Token limit for Codex / Gemini sessions |
Auto-detection: Claude Code Pro/Max is detected automatically via the
rate_limitsfield. Set"plan": "max"manually if you're on Max.
Uninstall
npx m0squared-indicator uninstallThis removes all hooks from your agent configs and deletes ~/.m0squared/.
Why M0²?
Built out of pure love for Claude Code — and frustration with hitting token limits mid-session without any warning.
M0² was born from a simple idea: your tools should tell you when you're running out of fuel.
Built by a Claude Code lover, with Claude Code.
— haddad med / morius
License
MIT © 2026 morius (M-zero-Squared / haddad med)
See LICENSE for full terms.
Made with ❤️ by haddad med · github.com/m0squared
If M0² saved your session — give it a ⭐
