provisionApiKeyConfigDir
provisionApiKeyConfigDir(
opts):string
Defined in: src/auth-config-dir.ts:80
(Re)build destDir as a symlink-mirror of sourceClaudeDir that omits
CREDENTIAL_FILE. Idempotent and self-healing:
- Stale entries in
destDir(no longer present insourceClaudeDir, or previously-present real files/dirs left by bad prior state) are removed. - For each entry in
sourceClaudeDirexceptCREDENTIAL_FILE, a symlink pointing at the absolute source path is created (or left if already correct). destDir/.credentials.jsonis explicitly removed even if somehow present.- If
sourceClaudeDirdoes not exist, an emptydestDiris created and returned (graceful degrade — a fresh, login-less config dir).
Never copies file contents. Returns destDir.
Parameters
Section titled “Parameters”destDir
Section titled “destDir”string
sourceClaudeDir
Section titled “sourceClaudeDir”string
Returns
Section titled “Returns”string