Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion src/core/paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ export function storeFile(): string {
/* --- Claude Code (Anthropic) live locations --- */

export function claudeDir(): string {
const override = process.env.CLAUDE_CONFIG_DIR?.trim();
if (override) {
return path.resolve(override);
}
return path.join(os.homedir(), ".claude");
}

Expand All @@ -39,8 +43,16 @@ export function claudeCredentialsFile(): string {
return path.join(claudeDir(), ".credentials.json");
}

/** Claude Code's main config; holds the signed-in account's profile. */
/**
* Claude Code's main config; holds the signed-in account's profile.
* With `CLAUDE_CONFIG_DIR` set, it lives inside that directory alongside the
* credentials; otherwise it sits at `~/.claude.json`.
*/
export function claudeConfigFile(): string {
const override = process.env.CLAUDE_CONFIG_DIR?.trim();
if (override) {
return path.join(path.resolve(override), ".claude.json");
}
return path.join(os.homedir(), ".claude.json");
}

Expand Down