npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

openrouter-menubar

v1.0.0

Published

OpenRouter balance menu bar app

Readme

🟣 OpenRouter Balance

A lightweight macOS menu bar app that displays your OpenRouter API balance and usage stats in real time.

macOS Electron Node License


🎯 What it does

Lives quietly in your menu bar and shows your remaining OpenRouter credit at a glance. Click it to expand a panel with detailed usage stats — daily, weekly, and monthly. No browser tab needed.

Menu bar:  $10.26   ←  remaining balance, color-coded

Clicking opens a beautifully designed popup with a dark glassmorphism theme:

  • Remaining balance (green → yellow → red based on percentage)
  • Progress bar against your daily limit
  • Daily / weekly / monthly / all-time usage breakdown
  • API key label
  • Auto-refreshes every 30 seconds

📸 Preview

(Add a screenshot here after first run — Command+Shift+4 to capture the popup)


🚀 Features & Capabilities

  • UI-based Configuration: No need to tinker with shell variables or system paths. Simply open the app and paste your API key in the settings panel. Your key is stored securely within the app's local userData config.
  • Auto Launch at Login: Seamlessly start the app when your Mac boots up. Just toggle the switch in settings—no manual LaunchAgent plist files required!
  • Dark Glassmorphism Theme: A premium, modern, and blurred interface that looks native on macOS.

⚙️ Requirements


💻 Installation & Development

# 1. Clone the repository
git clone https://github.com/yourusername/openrouter-menubar.git
cd openrouter-menubar

# 2. Install dependencies
npm install

# 3. Run directly (development)
npm start

When you first run the app, the settings panel will automatically open and prompt you for an OpenRouter API key.


📦 Build as a standalone .app

To create a distributable disk image (.dmg) and macOS Application (.app):

npm run build

The output will be placed in the dist/ folder (e.g., OpenRouter Balance-1.0.0-arm64.dmg). You can drag the generated app into your /Applications folder!


🛠️ Project Structure

openrouter-menubar/
├── main.js        # Electron main process (tray, API polling, IPC, config & auto-launch)
├── popup.html     # Popup UI (glassmorphism dark theme, settings view toggle)
├── package.json   # Dependencies and build configuration
└── README.md

🌐 API

Uses the official OpenRouter authenticated endpoint:

GET https://openrouter.ai/api/v1/auth/key
Authorization: Bearer sk-or-v1-...

Response fields parsed and used: limit, limit_remaining, limit_reset, usage, usage_daily, usage_weekly, usage_monthly, label.


🔧 Troubleshooting

"API_KEY_NOT_SET" message / Settings panel keeps appearing Open the settings by clicking the gear icon in the top right corner, paste your valid OpenRouter API key, and click "Save Configuration".

App doesn't appear in the menu bar Make sure you're running macOS 12+. Try quitting the Electron process and restarting with npm start to check for terminal errors.


📄 License

MIT.