{"id":51425253,"url":"https://github.com/jgabor/opencode-neuralwatt","last_synced_at":"2026-07-05T02:01:38.747Z","repository":{"id":367949236,"uuid":"1282382873","full_name":"jgabor/opencode-neuralwatt","owner":"jgabor","description":"OpenCode TUI plugin that surfaces Neuralwatt account quota, usage, and burn rate as a sidebar widget and /nw panel.","archived":false,"fork":false,"pushed_at":"2026-06-28T13:01:00.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-28T13:04:50.847Z","etag":null,"topics":["neuralwatt","opencode","opencode-plugin","opencode-tui","quota","tui","tui-plugin","usage-dashboard"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jgabor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-27T17:40:19.000Z","updated_at":"2026-06-28T13:01:04.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jgabor/opencode-neuralwatt","commit_stats":null,"previous_names":["jgabor/opencode-neuralwatt"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/jgabor/opencode-neuralwatt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgabor%2Fopencode-neuralwatt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgabor%2Fopencode-neuralwatt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgabor%2Fopencode-neuralwatt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgabor%2Fopencode-neuralwatt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jgabor","download_url":"https://codeload.github.com/jgabor/opencode-neuralwatt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgabor%2Fopencode-neuralwatt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35141083,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-05T02:00:06.290Z","response_time":100,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["neuralwatt","opencode","opencode-plugin","opencode-tui","quota","tui","tui-plugin","usage-dashboard"],"created_at":"2026-07-05T02:01:37.603Z","updated_at":"2026-07-05T02:01:38.718Z","avatar_url":"https://github.com/jgabor.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# opencode-neuralwatt\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"./screenshot.png\" target=\"_blank\"\u003e\n    \u003cpicture\u003e\n      \u003cimg src=\"./screenshot.png\" alt=\"Sidebar widget\" width=\"100%\" /\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\nAn [OpenCode](https://opencode.ai/) TUI plugin that surfaces your [Neuralwatt](https://neuralwatt.com) account quota, usage, and burn rate directly inside the OpenCode terminal UI — as a sidebar widget and an on-demand `/nw` panel.\n\n## Install\n\nFrom the CLI:\n\n```\nopencode plugin @jgabor/opencode-neuralwatt --global\n```\n\nThis installs the package and registers it in your global OpenCode TUI config (`~/.config/opencode/tui.json`).\n\nOr, configure manually by editing `~/.config/opencode/tui.json`:\n\n```jsonc\n{\n  \"$schema\": \"https://opencode.ai/tui.json\",\n  \"plugin\": [\"@jgabor/opencode-neuralwatt\"],\n}\n```\n\nProject-scoped install (omits `--global`) writes to `\u003crepo\u003e/.opencode/tui.json` instead.\n\n## Configure\n\nSet your Neuralwatt API key in your environment:\n\n```\nexport NEURALWATT_API_KEY=\"nw_...\"\n```\n\nThe plugin reads `NEURALWATT_API_KEY` at startup and refreshes quota every 15s.\n\n## Usage\n\n\u003ca href=\"./screenshot-modal.png\" target=\"_blank\"\u003e\n  \u003cpicture\u003e\n    \u003cimg src=\"./screenshot-modal.png\" alt=\"Modal panel\" width=\"25%\" align=\"right\" /\u003e\n  \u003c/picture\u003e\n\u003c/a\u003e\n\n- **Sidebar widget** — always-visible credit/kWh/burn-rate summary with monthly efficiency metrics. Click it to open the detail panel.\n- **`/nw`** (alias `/neuralwatt`) — opens the full quota panel (balance, burn rate, subscription, monthly usage, key allowance, efficiency, lifetime usage). Use `refresh` / `close` footer buttons.\n\n## Update notifier\n\nThe plugin checks the npm registry on each startup and surfaces newer versions of itself inside the TUI — no third-party auto-update plugin required.\n\n- **Sidebar widget** — an `⤓ Update: \u003cversion\u003e` banner appears below the usage block when a newer version is published. Click to install.\n- **Quota panel** — an `update \u003cversion\u003e` button appears left of `refresh` in the modal footer. Click to install.\n- On click, the plugin clears the stale npm cache slot, installs the new version via `api.plugins.install`, rewrites any pinned spec in your config to the new version (so the upgrade is an auditable diff), and toasts a **Restart OpenCode to apply** reminder.\n- Local file-plugin installs (`file:` spec) skip update checks entirely.\n\nNo TTL — the check fires every restart, against the npm registry's `latest` dist-tag.\n\n## Status fields shown\n\n- Balance: remaining / used / total credits, accounting method (energy vs token), rate limit tier, overage cap with headroom bar\n- Subscription: plan (with billing interval), status, period start/end, reset countdown, auto-renew, kWh used/remaining, overage\n- Usage: current month and lifetime (cost, requests, tokens, energy)\n- Burn rate: cost/day and estimated runway for both credits and kWh\n- Efficiency: kWh per 1M tokens and cost per 1M tokens (current month and lifetime)\n- Key allowance: limit, period, spent, remaining, blocked\n\n## Alerts\n\nThe plugin toasts on quota state transitions — entering overage, exhausting credits, or an API key becoming blocked — so critical changes surface without watching the sidebar.\n\n## How it works\n\nThe plugin is a TUI-only OpenCode plugin module, which is automatically loaded and executed with Bun. Quota data is fetched from `https://api.neuralwatt.com/v1/quota` with Bearer auth, retry/backoff, and 429 handling.\n\n## Requirements\n\n- OpenCode `^1.0.0`\n- A Neuralwatt API key in `NEURALWATT_API_KEY`\n\n---\n\n**License:** [MIT](./LICENSE) · **Author:** [Jonathan Gabor](https://jgabor.se) · **Version:** 0.3.4\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjgabor%2Fopencode-neuralwatt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjgabor%2Fopencode-neuralwatt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjgabor%2Fopencode-neuralwatt/lists"}