claude

package
v0.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2026 License: MIT Imports: 14 Imported by: 0

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

View Source
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

func (Provider) BrandBg() string

BrandBg returns the background color used on button faces.

func (Provider) BrandColor

func (Provider) BrandColor() string

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.

func (Provider) ID

func (Provider) ID() string

ID returns the provider identifier used by the registry.

func (Provider) MetricIDs

func (Provider) MetricIDs() []string

MetricIDs enumerates every metric this provider can emit.

func (Provider) Name

func (Provider) Name() string

Name returns the human-readable provider name.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL