Add OpenCode Go usage sample#49
Conversation
Signed-off-by: 4xvgal <4xvgal@protonmail.com>
|
@4xvgal |
|
Thanks for the contribution! Before getting into the code, I want to raise a concern about the overall direction, because I think that needs to be resolved before this can be considered for merging regardless of code quality. The existing samples under
OpenCode is open source and, similar to Codex, keeps a local session store on disk. The far more natural sample here would mirror Would you be open to redirecting the PR along those lines? As it stands I don't think the scrape-based approach is one we can adopt as an official sample. Happy to discuss if you see it differently. |
|
Separately from the direction question above, I also went through the current code and found a few quality issues worth flagging, in case the sample lands somewhere similar. Bugs
Unused code
Nits
None of these are large to fix, but flagging so they don't carry over if the sample is redirected to a local-session-based approach. |

Context of Contribution
Summary of the Proposal
Add an OpenCode Go usage sample under
docs/samples/opencode-go/thattracks rolling, weekly, and monthly OpenCode Go subscription usage in
RunCat Neo's Custom Metrics card and Metrics Bar.
Reason for the new feature
OpenCode Go subscribers ($10/month) cannot see their usage limits from
the terminal — they must visit the web dashboard. This sample follows
the same launchd + JSON snapshot pattern as the existing Bitcoin sample,
so users can monitor their Go usage directly in their macOS menu bar
alongside system metrics.
Checklist