Skip to content
    ↑↓ select↵ openesc close
    English中文
    zaniluca

    Codex Usage

    v0.0.3Code Intelligence
    opencode-codex-usage-plugin

    OpenCode TUI plugin that shows Codex usage and reset times.

    GitHub stars

    0

    Monthly installs

    205

    10 in 7 days

    Composite scoreSCORE

    33.6

    Multi-signal model

    Last commit

    17 days ago

    2026-08-02

    Install and configure

    opencode.json

    Writes to this project's opencode.json — applies to this repository only.

    opencode.json

    {
      "$schema": "https://opencode.ai/config.json",
      "plugin": ["opencode-codex-usage-plugin@0.0.3"]
    }

    opencode loads npm dependencies through its embedded runtime on startup and caches them locally — no manual global install needed.

    Show your Codex usage and reset times directly in the OpenCode sidebar.

    opencode-codex-usage-plugin demo

    This plugin reads Codex usage from Codex App or the Codex CLI and renders the current 5-hour and weekly limits inside OpenCode, so you can keep an eye on quota without leaving the TUI.

    Install

    Use OpenCode's native plugin installer:

    opencode plugin opencode-codex-usage-plugin@latest --global
    

    This installs the plugin and updates your global OpenCode TUI config automatically.

    Alternatively, add the plugin manually to your OpenCode TUI config (~/.config/opencode/tui.json):

    // tui.json
    {
      "$schema": "https://opencode.ai/tui.json",
      "plugin": ["opencode-codex-usage-plugin@latest"]
    }
    

    Restart OpenCode after changing the config.

    [!IMPORTANT] This is a TUI plugin, so configure it in tui.json, not in opencode.json. The plugin field in opencode.json is for server/runtime plugins and will not load this sidebar plugin.

    Requirements

    Install either Codex App or the Codex CLI. The plugin looks for Codex in common locations and on your PATH.

    If your Codex command lives somewhere else, set OPENCODE_CODEX_USAGE_COMMAND in your shell config:

    # ~/.zshrc or ~/.bashrc
    export OPENCODE_CODEX_USAGE_COMMAND="/path/to/codex"
    

    Then reload your shell config or open a new terminal before starting OpenCode.

    Contributing

    Contributions are welcome! Please open an issue or submit a pull request on GitHub. To get started fork the repo, install the dependencies and in your OpenCode TUI config add the local path to the output of the plugin like so:

    // tui.json
    {
      "$schema": "https://opencode.ai/tui.json",
      "plugin": ["file:///Users/<your_username>/path/to/your-clone/opencode-codex-usage-plugin/dist/tui.js"]
    }
    

    The plugin logic is made with Effect. There is no particular reason I chose it, it was simply an excuse to try it out.