@entelligentsia/pi-ollama-cloud-usage-tracker
Pi extension: live Ollama Cloud usage tracker in the footer with Claude-style quota bars
Package details
Install @entelligentsia/pi-ollama-cloud-usage-tracker from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@entelligentsia/pi-ollama-cloud-usage-tracker- Package
@entelligentsia/pi-ollama-cloud-usage-tracker- Version
1.0.1- Published
- May 26, 2026
- Downloads
- not available
- Author
- entelligentsia
- License
- MIT
- Types
- extension
- Size
- 26.2 KB
- Dependencies
- 1 dependency · 3 peers
Pi manifest JSON
{
"extensions": [
"./src/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
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 @entelligentsia/pi-ollama-cloud-usage-tracker
Or add to ~/.pi/agent/settings.json:
{
"packages": ["@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 configuration
License
MIT