claudesub

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package claudesub turns a Claude Pro/Max subscription into a memcode backend by reusing the login the Claude Code CLI already stored. It reads the OAuth token from ~/.claude/.credentials.json (and, on macOS, the Keychain), reconciles the two, refreshes an expired token, and returns the access token. The token is then used through the Anthropic adapter's Claude Code compatibility mode (internal/providers/anthropic/oauth.go), where the actual impersonation lives — this package only resolves the credential.

Consent-gated upstream: it activates only when the user explicitly selects the claude source. It reuses Claude Code's file; refreshed tokens are written back there (never the Keychain), atomically at 0600.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Available

func Available() bool

Available reports whether a Claude Code login is present (file, or the macOS Keychain), for the wizard's menu.

func Resolve

func Resolve() (string, error)

Resolve returns a usable Claude access token, refreshing it if expired. The returned token is an OAuth token (cc-*/eyJ…) that turns on the adapter's compatibility mode.

Types

This section is empty.

Jump to

Keyboard shortcuts

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