Documentation
¶
Index ¶
- func AccountManager(id provider.ID, client httputil.Doer) provider.AccountManager
- func GetActiveCredentials() (token, email string)
- func PrintAccounts(id provider.ID, accounts []provider.Account, activeToken, activeEmail string)
- func PrintClaudeAccounts(accounts []provider.Account, activeEmail string)
- func PrintCodexAccounts(accounts []provider.Account)
- func RunAccounts(id provider.ID) error
- func RunCodexLogin(ctx context.Context, client httputil.Doer, activate bool) error
- func RunLogin(ctx context.Context, client httputil.Doer, activate bool) error
- func RunSwitch(id provider.ID, email string, client httputil.Doer) error
- type AggregateReport
- type Cache
- type Clock
- type ProviderReport
- type Renderer
- type Report
- type RunRequest
- type Runner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccountManager ¶
AccountManager returns the AccountManager for a provider, or nil if unsupported. The client is used for providers that refresh metadata on switch (e.g. Claude).
func GetActiveCredentials ¶
func GetActiveCredentials() (token, email string)
GetActiveCredentials reads the active Claude access token and email from the credentials file. Returns empty strings on any error.
func PrintAccounts ¶
PrintAccounts renders a list of accounts with active-account highlighting.
func PrintClaudeAccounts ¶
PrintClaudeAccounts renders Claude accounts with plan, multiplier, and active status.
func PrintCodexAccounts ¶
PrintCodexAccounts renders Codex accounts with plan and active status.
func RunAccounts ¶
RunAccounts lists discovered accounts for the given provider.
func RunCodexLogin ¶
RunCodexLogin performs the Codex OAuth PKCE login flow via Auth0. After login, it stores the account to ~/.codex/accounts/ for codex-auth interop.
Types ¶
type AggregateReport ¶
type AggregateReport struct {
ProviderID provider.ID `json:"provider_id"`
Kind string `json:"kind"`
Summary aggregate.AccountSummary `json:"summary"`
Windows map[quota.WindowName]quota.AggregateResult `json:"windows"`
}
type ProviderReport ¶
type Report ¶
type Report struct {
GeneratedAt time.Time `json:"generated_at"`
Providers []ProviderReport `json:"providers"`
}