Skip to content

spawnAuthSettings

spawnAuthSettings(authMode, helperPath): object

Defined in: src/auth-mode.ts:110

Return the fragment of a claude —settings JSON that wires up apiKeyHelper authentication. Callers spread this into their settings object.

Returns { apiKeyHelper: helperPath } ONLY when mode is “api-key” AND helperPath is a non-empty string; otherwise returns {}.

The empty-object-on-subscription contract is LOAD-BEARING: it guarantees the subscription default produces byte-for-byte-identical —settings (no extra keys) when callers spread the result.

AuthMode

string | null

object

optional apiKeyHelper?: string