AsharFatmi/ollama-usage-widget

Native macOS menu bar widget for Ollama Cloud usage — weekly/session quotas, per-model requests, cost, local server state

5

stars

45

commits

Swift

primary language

Aug 20, 2026

updated

README

🦙 Ollama Usage Widget

A native macOS menu bar widget that tracks your Ollama Cloud usage (weekly & session quotas, per-model request counts, cost) and your local Ollama server state — right from the menu bar.

Menu bar pill preview

Popover preview

Features

  • Menu bar pill — black iPhone-island style pill showing session % + weekly % at a glance
  • Weekly & Session rings — hollow progress rings with percentages centered inside
  • Activity by model — horizontal bar chart of request counts per model
  • 7-day activity chart — usage trend over the last week (day-of-month labels)
  • Local Ollama state — loaded models and VRAM usage via GET /api/ps
  • Auto-refresh — polls every 5 minutes; manual refresh via the top-right icon
  • Collapsible sections — Ollama Cloud / Local Ollama, state remembered
  • Secure key storage — API key held in the macOS Keychain (with .env fallback)

Requirements

  • macOS 14.0+ (Apple Silicon or Intel)
  • Ollama account with Cloud usage enabled
  • An Ollama Cloud API key

⚠️ Note: The widget uses the undocumented https://ollama.com/api/usage endpoint. It may change or become gated at any time. If it breaks, please open an issue.

Install

curl -fsSL https://raw.githubusercontent.com/AsharFatmi/ollama-usage-widget/master/install.sh | bash

Downloads the latest release DMG, installs to /Applications, and registers a LaunchAgent so the widget starts at login and restarts if it crashes. Because the file comes via curl (no quarantine attribute), you won't see a Gatekeeper "unidentified developer" prompt.

Already installed? Re-run the same command to upgrade. Remove with curl -fsSL …/install.sh | bash -s uninstall.

Homebrew

brew tap asharfatmi/tap
brew install --cask ollama-usage-widget

From source

git clone https://github.com/AsharFatmi/ollama-usage-widget.git
cd ollama-usage-widget
./scripts/deploy.sh

The script builds with SwiftPM, wraps the binary in an .app bundle, and registers a LaunchAgent so the widget starts at login and restarts if it crashes.

Toolchain note: macOS Command Line Tools can ship a stale SwiftPM manifest library that breaks swift build. If you hit manifest/linker errors, install Swift via Homebrew (brew install swift) and ensure /opt/homebrew/bin comes first in PATH.

Manual

swift build -c release
cp -R .build/release/OllamaUsageWidget.app ~/Applications/
open ~/Applications/OllamaUsageWidget.app

Set your API key

  1. Click the 🦙 pill → Set Key…
  2. Paste your Ollama Cloud API key (stored in the macOS Keychain)

Alternative: create ~/.ollama-usage-widget/.env (or ~/.ollama-usage-widget.env) containing:

OLLAMA_API_KEY=ollama-xxxxxxxx

For compatibility with Hermes-agent environments, ~/.hermes/.env is also read as a fallback.

Uninstall

curl -fsSL https://raw.githubusercontent.com/AsharFatmi/ollama-usage-widget/master/install.sh | bash -s uninstall

Or manually:

launchctl bootout gui/$(id -u)/com.asharfatmi.ollama-usage-widget
rm -rf ~/Applications/ollama-usage-widget
rm -rf /Applications/OllamaUsageWidget.app
rm ~/Library/LaunchAgents/com.asharfatmi.ollama-usage-widget.plist

How it works

DataSource
Weekly / session usage, per-model requests, costGET https://ollama.com/api/usage (Bearer token)
Local models + VRAMGET http://localhost:11434/api/ps
7-day activity historylocally accumulated daily deltas (the API exposes no history)

The API key is never stored in the app bundle — it lives in your Keychain or env file only.

License

MIT © 2026 Ashar Fatmi

Contributors

AsharFatmi

45 commits

AsharFatmi/ollama-usage-widget

Native macOS menu bar widget for Ollama Cloud usage — weekly/session quotas, per-model requests, cost, local server state

5

stars

45

commits

Swift

primary language

Aug 20, 2026

updated

README

🦙 Ollama Usage Widget

A native macOS menu bar widget that tracks your Ollama Cloud usage (weekly & session quotas, per-model request counts, cost) and your local Ollama server state — right from the menu bar.

Menu bar pill preview

Popover preview

Features

  • Menu bar pill — black iPhone-island style pill showing session % + weekly % at a glance
  • Weekly & Session rings — hollow progress rings with percentages centered inside
  • Activity by model — horizontal bar chart of request counts per model
  • 7-day activity chart — usage trend over the last week (day-of-month labels)
  • Local Ollama state — loaded models and VRAM usage via GET /api/ps
  • Auto-refresh — polls every 5 minutes; manual refresh via the top-right icon
  • Collapsible sections — Ollama Cloud / Local Ollama, state remembered
  • Secure key storage — API key held in the macOS Keychain (with .env fallback)

Requirements

  • macOS 14.0+ (Apple Silicon or Intel)
  • Ollama account with Cloud usage enabled
  • An Ollama Cloud API key

⚠️ Note: The widget uses the undocumented https://ollama.com/api/usage endpoint. It may change or become gated at any time. If it breaks, please open an issue.

Install

curl -fsSL https://raw.githubusercontent.com/AsharFatmi/ollama-usage-widget/master/install.sh | bash

Downloads the latest release DMG, installs to /Applications, and registers a LaunchAgent so the widget starts at login and restarts if it crashes. Because the file comes via curl (no quarantine attribute), you won't see a Gatekeeper "unidentified developer" prompt.

Already installed? Re-run the same command to upgrade. Remove with curl -fsSL …/install.sh | bash -s uninstall.

Homebrew

brew tap asharfatmi/tap
brew install --cask ollama-usage-widget

From source

git clone https://github.com/AsharFatmi/ollama-usage-widget.git
cd ollama-usage-widget
./scripts/deploy.sh

The script builds with SwiftPM, wraps the binary in an .app bundle, and registers a LaunchAgent so the widget starts at login and restarts if it crashes.

Toolchain note: macOS Command Line Tools can ship a stale SwiftPM manifest library that breaks swift build. If you hit manifest/linker errors, install Swift via Homebrew (brew install swift) and ensure /opt/homebrew/bin comes first in PATH.

Manual

swift build -c release
cp -R .build/release/OllamaUsageWidget.app ~/Applications/
open ~/Applications/OllamaUsageWidget.app

Set your API key

  1. Click the 🦙 pill → Set Key…
  2. Paste your Ollama Cloud API key (stored in the macOS Keychain)

Alternative: create ~/.ollama-usage-widget/.env (or ~/.ollama-usage-widget.env) containing:

OLLAMA_API_KEY=ollama-xxxxxxxx

For compatibility with Hermes-agent environments, ~/.hermes/.env is also read as a fallback.

Uninstall

curl -fsSL https://raw.githubusercontent.com/AsharFatmi/ollama-usage-widget/master/install.sh | bash -s uninstall

Or manually:

launchctl bootout gui/$(id -u)/com.asharfatmi.ollama-usage-widget
rm -rf ~/Applications/ollama-usage-widget
rm -rf /Applications/OllamaUsageWidget.app
rm ~/Library/LaunchAgents/com.asharfatmi.ollama-usage-widget.plist

How it works

DataSource
Weekly / session usage, per-model requests, costGET https://ollama.com/api/usage (Bearer token)
Local models + VRAMGET http://localhost:11434/api/ps
7-day activity historylocally accumulated daily deltas (the API exposes no history)

The API key is never stored in the app bundle — it lives in your Keychain or env file only.

License

MIT © 2026 Ashar Fatmi

Contributors

AsharFatmi

45 commits

Languages

Swift

85.3%

Shell

12.9%

Ruby

1.7%