Lanternfish for VS Code
Your Claude Code and Codex usage limits in the status bar, so you see them while you code.
$(pulse) C 84% · X 42%
The numbers are what is left in each service's 5-hour window, the way the official usage pages show it. Hover for one card per service: the 5-hour and weekly windows as bars, % left, and when each resets. The item turns yellow at 20% left and red at 5%. Click it to refresh.
Claude Pro
5-hour ▓▓▓▓▓▓▓▓▓▓▓▓▓░░ 84% 4h 29m
Weekly ▓▓▓▓▓▓▓▓▓▓▓▓░░░ 80% 2d 21h
Codex Plus
5-hour ▓▓▓▓▓▓░░░░░░░░░ 42% 1h 12m
Weekly ▓▓▓▓▓▓▓▓▓▓▓▓▓░░ 87% 6d 2h
Where the numbers come from
Lanternfish reads no passwords and keeps no tokens of its own. By default it only uses channels the vendors provide:
| Service |
Source |
Updates |
| Codex |
codex app-server, the JSON-RPC server the Codex CLI ships (account/rateLimits/read). Lanternfish finds codex on PATH or the copy inside the OpenAI Codex extension or the ChatGPT app. |
Every 5 minutes |
| Claude |
The rate_limits Claude Code passes to its status line command (Pro, Max and Ultra plans). Run Lanternfish: Connect Claude Code once. |
After each reply of Claude Code in a terminal |
Connect Claude Code asks before it changes anything. It points the statusLine setting in ~/.claude/settings.json (or $CLAUDE_CONFIG_DIR) to a small script that saves the limits and then runs your previous status line command unchanged, so your status line looks the same. A backup of the file is kept as settings.json.lanternfish-backup. Lanternfish: Disconnect Claude Code puts your previous status line back. The script needs Node.js.
Several VS Code windows share one cache, so they make one request per refresh between them.
Optional: Claude without waiting for a reply
Claude Code runs status line commands only in a terminal: the Claude Code panel in VS Code and claude.ai do not, so the numbers stay as of your last terminal reply. To see them change wherever you use Claude, you can turn on lanternfish.claude.useOAuthToken: Lanternfish then reads Claude Code's sign-in token (macOS Keychain, or ~/.claude/.credentials.json) and asks Anthropic's unofficial usage endpoint every 5 minutes.
Off by default, on purpose. Anthropic's terms reserve Pro/Max sign-in tokens for Claude Code and Claude.ai, and the endpoint is undocumented and may change. Turn it on only if you accept that risk for your account. The token is sent only to api.anthropic.com, and never refreshed or stored by Lanternfish.
If the Lanternfish menu bar app is running, the extension shows its numbers instead and sends no requests itself. That also adds Gemini (Antigravity) and API spend to the hover.
Settings
| Setting |
Default |
|
lanternfish.codexPath |
empty |
Path to codex, if it is not found by itself |
lanternfish.claude.useOAuthToken |
false |
See above |
Build from source
cd vscode
npm install
npm test
npm run package # lanternfish.vsix
code --install-extension lanternfish.vsix