claudeauth

package
v0.7.194 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2026 License: MIT Imports: 11 Imported by: 0

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.

Jump to

Keyboard shortcuts

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