OpenCode Codex quota sidebar powered by codexbar. opencode-codexbar adds a small animated CODEX widget to the OpenCode TUI sidebar so you can see Codex usage, Codex quota, session limits, weekly limits, plan details, and reset timers while you code.
This is for people searching for an OpenCode Codex sidebar, OpenCode Codex quota plugin, Codex usage bar for OpenCode, ChatGPT Codex limits in OpenCode, or a codexbar OpenCode TUI integration.
- A fancy
CODEXstatus block inside the OpenCode terminal UI sidebar. - Session quota in orange/gold and weekly quota in cyan.
- Animated glyph chains that update without freezing OpenCode.
- Last-read time, pace, reset timer, plan, and account details when
codexbar --statusprovides them. - Safe architecture: the OpenCode TUI plugin never spawns a process and never runs shell commands.
- Automatic macOS background updates through a user LaunchAgent, with a background-process fallback elsewhere.
- Friendly install path even if you do not have
codexbaryet.
curl -fsSL https://raw.githubusercontent.com/Tanwyhang/opencode-codexbar/main/install.sh | bashThen restart OpenCode.
If ~/.local/bin is not on your PATH, the installer prints the exact line to add to your shell profile.
You can install opencode-codexbar before installing codexbar.
The sidebar will still load. It will show an Install codexbar message instead of live quota data. Later, when codexbar --status works in your terminal, run:
opencode-codexbar restartThat is it. You do not need to reinstall this plugin.
- OpenCode installed and working.
codexbaris optional for install, but required for live Codex quota data.- The installer may use
npmorbunto install two small OpenCode TUI UI dependencies if they are not already available:solid-jsand@opentui/solid.
opencode-codexbar install # register the sidebar and enable background updates
opencode-codexbar start # start or re-enable background status updates
opencode-codexbar stop # stop background status updates
opencode-codexbar restart # restart background status updates
opencode-codexbar once # refresh the cache one time
opencode-codexbar status # show writer/cache status
opencode-codexbar doctor # debug your setupopencode-codexbar has two parts.
The OpenCode TUI plugin reads this JSON cache file:
~/.cache/opencode-codexbar-status.json
The external writer updates that cache by running:
codexbar --statusThe important safety detail: OpenCode only reads the cache. The TUI plugin does not call codexbar, does not spawn child processes, and does not execute shell commands.
On macOS, opencode-codexbar start installs a user LaunchAgent so updates start again after login. On other systems, it starts the same writer as a normal background process.
~/.config/opencode/plugin/codexbar-sidebar.tsx
~/.config/opencode/opencode-codexbar/bin/codexbar-status-writer
~/.local/bin/opencode-codexbar
~/Library/LaunchAgents/com.tanwyhang.opencode-codexbar.plist # macOS only
~/.cache/opencode-codexbar-status.json
~/.cache/opencode-codexbar-status-writer.pid
~/.cache/opencode-codexbar-status-writer.log
The installer also adds this plugin entry to ~/.config/opencode/tui.json:
"plugin": ["./plugin/codexbar-sidebar.tsx"]It creates a timestamped backup before editing an existing tui.json.
Run:
opencode-codexbar doctorIf the sidebar does not appear, restart OpenCode completely. OpenCode loads TUI plugins at startup.
If the sidebar says Install codexbar, install codexbar from its upstream project, confirm this works, then restart the writer:
codexbar --status
opencode-codexbar restartIf the sidebar says stale, the background writer stopped or cannot update the cache:
opencode-codexbar restart
opencode-codexbar statusClone the repo and run the installer locally:
git clone https://github.com/Tanwyhang/opencode-codexbar.git
cd opencode-codexbar
./install.shThen restart OpenCode.
Stop the writer:
opencode-codexbar stopThen remove the plugin entry from ~/.config/opencode/tui.json and delete the installed files listed above. On macOS, stop also unloads the LaunchAgent.
- No OpenCode session storage changes.
- No OpenCode provider or model changes.
- No OpenCode tool permission changes.
- The sidebar plugin is read-only and cache-only.
- The external writer is the only part that runs
codexbar --status.
OpenCode Codex quota sidebar, OpenCode Codex usage plugin, OpenCode TUI plugin for Codex, codexbar OpenCode integration, ChatGPT Codex usage limits, Codex session quota, Codex weekly quota, OpenCode sidebar status widget, Codex quota terminal UI.