Skip to content

fix(paths): honor CLAUDE_CONFIG_DIR for Claude live locations - #1

Open
vic322 wants to merge 1 commit into
realjesset:mainfrom
vic322:fix/claude-config-dir-override
Open

vic322 wants to merge 1 commit into
realjesset:mainfrom
vic322:fix/claude-config-dir-override

Conversation

@vic322

@vic322 vic322 commented Jul 10, 2026

Copy link
Copy Markdown

What

claudeDir() and claudeConfigFile() now respect the CLAUDE_CONFIG_DIR
environment variable. When it is set, both the .claude directory and
.claude.json resolve inside that directory; otherwise the behavior is
unchanged (~/.claude and ~/.claude.json).

Why

Claude Code lets users relocate its config via CLAUDE_CONFIG_DIR. Without
this, toguru read/wrote the live credentials and config at the hardcoded home
paths, so it missed the active account entirely for anyone using a custom
config dir.

Testing

  • bun run typecheck — clean
  • bun test — 37 pass / 0 fail
  • bun run build — success

Claude Code relocates its credentials and main config into
$CLAUDE_CONFIG_DIR when that variable is set (common on WSL and
multi-config setups), but toguru hard-coded ~/.claude and
~/.claude.json. As a result `add`/`current` reported no active
session even while logged in.

Resolve claudeDir() and claudeConfigFile() from CLAUDE_CONFIG_DIR
when present, mirroring the existing CODEX_HOME/TOGURU_HOME handling.
claudeCredentialsFile() already derives from claudeDir(), so it
follows automatically.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant