OpenUsage WebUI & CLIOpenUsage WebUI & CLI
以 Bun 伺服器、React WebUI 與終端機 CLI 狀態工作流程取代僅支援 macOS 的 Tauri 選單列外殼,為 OpenUsage 新增 Ubuntu/Linux 支援。Added Ubuntu/Linux support to OpenUsage by replacing its macOS-only Tauri menu bar shell with a Bun server, React WebUI, and terminal CLI status workflow.
OpenUsage WebUI & CLI
OpenUsage 是一個用於監控 coding agent 與 AI 寫程式訂閱用量的開源工具,但原始應用程式是透過 Tauri 選單列應用程式針對 macOS 設計。我的貢獻是新增本機 WebUI 與終端機優先的 CLI 模式,讓這套工作流程能在 Ubuntu 與其他 Linux 系統上實際使用。

主要貢獻
- Ubuntu/Linux 支援:以可在 Linux 本機執行的 Bun HTTP 伺服器與 React WebUI,取代僅支援 macOS 的 Tauri 外殼。
- WebUI 與 CLI 模式:同時提供瀏覽器儀表板與終端機狀態指令,符合 agentic coding 使用者在儀表板與 shell 優先工作流程之間切換的習慣。
- 外掛宿主層適配:保留 OpenUsage 的供應商外掛模型,並為 HTTP、SQLite、keychain、檔案系統、加密與格式化 API 補上 Linux 宿主層相容介面(shim)。
- 終端機優先用量檢查:新增
ou-status與重新整理指令並搭配 ANSI 進度條,不需離開寫程式的工作階段即可查看用量。 - 本機資料執行環境:將 WebUI 資料儲存於
~/.openusage-webui,包含本機 SQLite、設定檔與供應商 keychain 相容儲存空間。
技術說明
這項工作的核心並不是重寫 OpenUsage 的產品概念,而是適配宿主層,讓同樣的 AI 用量監控工作流程能在 macOS 以外的環境運作。此分支保留了外掛式架構,並將平台外殼替換為相容於 Linux 的 WebUI 與 CLI 執行環境。

CLI 模式專為習慣長駐終端機的開發者與 agentic coding 工作階段設計,能以彩色進度條輸出用量摘要,並在繪製狀態檢視前重新整理供應商資料。
OpenUsage WebUI & CLI
OpenUsage is an open-source tool for monitoring coding agent and AI coding subscription usage, but the original application targets macOS through a Tauri menu bar app. My contribution was to make that workflow practical on Ubuntu and other Linux systems by adding a local WebUI and a terminal-first CLI mode.

Key Contributions
- Ubuntu/Linux Support: Replaced the macOS-only Tauri shell with a Bun HTTP server and React WebUI that runs locally on Linux.
- WebUI and CLI Modes: Added both a browser dashboard and terminal status commands, matching how agentic coding users switch between dashboards and shell-first workflows.
- Plugin Host Adaptation: Preserved OpenUsage’s provider plugin model while adding Linux host shims for HTTP, SQLite, keychain, filesystem, crypto, and formatting APIs.
- Terminal-First Usage Checks: Added
ou-statusand refresh commands with ANSI progress bars, so usage can be checked without leaving a coding session. - Local Data Runtime: Stored WebUI data under
~/.openusage-webuiwith local SQLite, config files, and provider keychain shim storage.
Technical Notes
The core work was not rewriting OpenUsage’s product idea. It was adapting the host layer so the same AI usage monitoring workflow can run outside macOS. The fork keeps the plugin-based model, but swaps the platform shell for a Linux-compatible WebUI and CLI runtime.

The CLI mode is designed for agentic coding sessions where developers already live in the terminal. It prints usage summaries with colored progress bars and can refresh provider data before rendering the status view.