opencode-crof-sidebarOpenCode TUI plugin that displays CrofAI usage (requests/day, credits) in the sidebar
2
7
1 in 7 days
22.6
Multi-signal model
4 months ago
2026-04-12
Install and configure
opencode.jsonWrites to this project's opencode.json — applies to this repository only.
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-crof-sidebar@0.1.2"]
}Writes to ~/.config/opencode/opencode.json — applies to every project.
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-crof-sidebar@0.1.2"]
}If you want to modify the plugin locally, install it into the project and reference the local path.
shell
pnpm add -D opencode-crof-sidebaropencode loads npm dependencies through its embedded runtime on startup and caches them locally — no manual global install needed.
CrofAI usage stats in the OpenCode sidebar. Shows requests/day and credits.
Install
git clone https://github.com/Red44/crofai-opencode.git
cd crofai-opencode
bun install
bun install automatically registers the plugin in your global OpenCode tui.json.
It also configures the global OpenCode opencode.json CrofAI provider automatically using the live https://crof.ai/v1/models API.
On plugin startup it also performs a best-effort live refresh of the running OpenCode config, so newly fetched CrofAI models can apply without a restart.
Updating
On every OpenCode start the plugin runs git pull --ff-only in the background. If new commits are found it runs bun install automatically. No manual steps needed.
Requirements
- CrofAI must be configured as an OpenCode provider in your
opencode.json bun installauto-configures the CrofAI provider inopencode.json- The plugin reads the API key from the configured CrofAI provider automatically
CROFAI_API_KEYcan still be used as a fallback override- Existing
provider.CrofAI.options.apiKeyvalues are preserved and never overwritten
Behavior
- Shows
Requests: XXX/dayandCredits: $X.XXXX - Shows current model speed as
~XX t/susing data extracted from the CrofAI pricing page HTML - Only appears for sessions that already have CrofAI message history
- Updates in real-time after every message
- Falls back to 30-second interval if no messages are sent
- Refreshes the CrofAI model list from
/v1/modelsand pushes a best-effort live config update on plugin startup - Auto-updates from git on every OpenCode start (non-blocking)
License
MIT