Documentation
¶
Overview ¶
Package codex implements the Codex OAuth API usage provider.
Reads credentials from ~/.codex/auth.json (or $CODEX_HOME/auth.json), hits {base}/wham/usage for session/weekly metrics and credits balance, where {base} honors a chatgpt_base_url override in the Codex config (~/.codex/config.toml or $CODEX_HOME/config.toml) — matching the Codex CLI's own override plumbing — and defaults to chatgpt.com.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct{}
Provider fetches Codex usage data.
func (Provider) BrandBg ¶ added in v0.3.0
BrandBg returns the background color used on button faces.
func (Provider) BrandColor ¶
BrandColor is deep indigo #3941FF — the bottom stop of the lavender→ indigo gradient used on the loading reference card. A single hex (rather than a runtime gradient) keeps Codex's rendered buttons visually uniform with every other provider; the gradient only survives on the pre-data loading SVG as a subtle brand accent.
func (Provider) Fetch ¶
Fetch returns the latest Codex usage snapshot using the browser-proxied path when available and the OAuth direct path otherwise.