@entelligentsia/pi-ollama-cloud-usage-tracker
v1.1.0
Published
Pi extension: live Ollama Cloud usage tracker in the footer with Claude-style quota bars
Maintainers
Readme
pi-ollama-cloud-usage-tracker
Pi extension that shows live Ollama Cloud usage in the footer status line with Claude-style quota bars.
5h ▕███░░░░░░░▏ 34% ⟳ 3h14m 7d ▕████░░░░░░▏ 45% ⟳ 3d16h- 5h — session (5-hour window) percentage bar with reset countdown
- 7d — weekly (7-day window) percentage bar with reset countdown
- Bar color reflects pace (usage% vs elapsed%): green if under budget, cyan if on track, yellow/red if burning fast
- Countdown shows time remaining until the window resets
How it works
- Extracts Chrome cookies from the local cookie database using
@steipete/sweet-cookie - If the Chrome cookie encryption key is locked in the system keyring,
falls back to a tiny Python helper (
get-keyring-password.py) that triesgi→secret-tool→browser_cookie3to unlock it - Fetches
https://ollama.com/settingswith those cookies - Parses usage percentages and reset timestamps from the dashboard HTML
- Refreshes every 5 minutes and after each agent turn
- Only activates when
ollama-cloudis the active provider
Installation
pi install npm:@entelligentsia/pi-ollama-cloud-usage-trackerOr add to ~/.pi/agent/settings.json:
{
"packages": ["npm:@entelligentsia/pi-ollama-cloud-usage-tracker"]
}Reload with /reload in pi.
Requirements
Node.js ≥ 22 (for
node:sqliteused by sweet-cookie)Chrome with an active Ollama Cloud login session
One of (for Linux keyring access):
libsecret-tools(secret-toolCLI) — install withsudo apt install libsecret-toolspython3-gi+gir1.2-secret-1(PyGObject) — pre-installed on most GNOME desktopsbrowser_cookie3(Python, uses jeepney/dbus-python) —pip install browser-cookie3
On macOS and Windows, sweet-cookie handles keyring access natively — no extra packages needed.
Files
src/
index.ts # Pi extension entry — footer rendering + events
scraper.ts # Cookie extraction + HTML scraping (TypeScript)
get-keyring-password.py # Linux keyring fallback (Python shim)
package.json # npm package manifest + pi extension config
tsconfig.json # TypeScript configurationLicense
MIT
