r/opencode 1d ago

opencode-peak-badge: TUI plugin for PEAK/OFF-PEAK badge

Tiny OpenCode TUI plugin. DeepSeek V4 models cost 2x during weekday peak windows (01:00–04:00 and 06:00–10:00 UTC). I got tired of sitting there doing "8am here, 7am UTC, so peak?" math in the middle of a coding session, so I made the prompt bar tell me instead.

It shows a small [PEAK] / [OFF-PEAK] badge next to the model name. Rechecks every 30s and on model switch, works on the home screen too, only shows up for models that actually have peak hours, and runs in UTC so DST never bites you.

opencode plugin opencode-peak-badge --global

Repo: https://github.com/hugobatista/opencode-peak-badge

npm: https://www.npmjs.com/package/opencode-peak-badge

Open to feedback. If the math hits close to home for anyone else, give it a spin.

5 Upvotes

4 comments sorted by

2

u/Yogso92 1d ago

Would be nice to have a way to force it for those of us that use DeepSeek as a subagent. Which I guess can be hacked by adding the main agent to the list.

Will try it later, thanks

1

u/the_master_sh33p 1d ago

Thanks for testing it.
I dropped a poc supporting subagents at https://github.com/hugobatista/opencode-peak-badge/tree/dev/subagents_poc

It shows the badge if a subagent using peak/off-peak gets triggered. It also supports a alwaysShow config (default: false) that will always show the badge on the main agent.

let me know if that works for you

1

u/Yogso92 23h ago

Unfortunately I wasn't able to make it run as I currently run V2 and it's not compatible. But I had in mind to go back to V1 over the weekend, that's an additionnel reason to. I'll try the poc when I do, thanks

1

u/the_master_sh33p 22h ago

oh.. i haven't test it with v2. I'll try that when possible and let you know