Documentation
¶
Overview ¶
Package claude implements the Claude OAuth API usage provider.
Reads credentials from ~/.claude/.credentials.json, hits api.anthropic.com/api/oauth/usage for session/weekly/sonnet metrics, and optionally supplements with claude.ai cookie-based web API for the extra-usage block (spend limits, prepaid balance).
Index ¶
Constants ¶
This section is empty.
Variables ¶
var LogSink func(string)
LogSink is wired by the plugin for debug logging.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct{}
Provider fetches Claude usage data via OAuth + optional cookie web API.
func (Provider) BrandBg ¶ added in v0.3.0
BrandBg returns the background color used on button faces.
func (Provider) BrandColor ¶
BrandColor returns the accent color used on button faces.
func (Provider) Fetch ¶
Fetch returns the latest Claude usage snapshot, preferring the extension-proxied web API and falling back to OAuth.