Skip to content

writeApiKeyHelper

writeApiKeyHelper(key, dir): string

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

Write an executable helper script into dir (created if missing) that prints EXACTLY key to stdout when executed. The key is embedded safely via POSIX single-quote escaping so shell metacharacters cannot escape. Returns the absolute path of the written script.

Throws if key is empty or whitespace-only.

string

string

string