Documentation
¶
Overview ¶
Package claudeauth mints the long-lived Claude subscription token that headless claude reads from CLAUDE_CODE_OAUTH_TOKEN.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotInstalled = errors.New("claude is not installed")
ErrNotInstalled reports that claude is not on PATH, which needs different advice from a flow that ran and produced no token.
Functions ¶
func SetupToken ¶
func SetupToken(ctx context.Context, streams iostream.Streams, prompter func(string) (string, error)) (string, error)
SetupToken runs `claude setup-token` and returns the token it prints.
stdin and stderr stay on the terminal so the browser flow and its prompts work. Stdout is captured to scrape the token, and echoed back with any token redacted so the secret never reaches a scrollback or a CI log. If stdout holds no token, prompter collects it instead.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.