Skip to content

Conversation

@majiayu000
Copy link

Summary

  • Add support for CLAUDE_CONFIG_DIR environment variable for users with custom Claude Code configurations
  • Centralize marketplace path logic in paths.ts to avoid hardcoded ~/.claude paths

Problem

Users who use custom CLAUDE_CONFIG_DIR settings (e.g., ~/.claude_personal for multiple accounts) were unable to use claude-mem because plugin paths were hardcoded to ~/.claude.

As reported in #210 comments by @hffmnn:

I see error messages like this, where you can see that the plugin tries to load from .claude instead of .claude_personal

Changes

  • src/shared/paths.ts: Add MARKETPLACE_ROOT constant that respects CLAUDE_CONFIG_DIR
  • src/shared/worker-utils.ts: Use shared MARKETPLACE_ROOT instead of hardcoded path
  • src/services/context-generator.ts: Use shared MARKETPLACE_ROOT for version marker path
  • src/services/worker/BranchManager.ts: Use shared MARKETPLACE_ROOT for git operations

Test Plan

  • All 42 existing tests pass
  • Build succeeds
  • Manual test with custom CLAUDE_CONFIG_DIR (needs user verification)

Fixes #210 (partial - addresses the custom config directory issue reported in comments)

Users with custom CLAUDE_CONFIG_DIR settings (e.g., ~/.claude_personal for
multiple accounts) were unable to use claude-mem because plugin paths were
hardcoded to ~/.claude.

Changes:
- Add MARKETPLACE_ROOT constant in paths.ts that respects CLAUDE_CONFIG_DIR
- Update worker-utils.ts to use shared MARKETPLACE_ROOT
- Update context-generator.ts to use shared MARKETPLACE_ROOT
- Update BranchManager.ts to use shared MARKETPLACE_ROOT

This allows users who set CLAUDE_CONFIG_DIR environment variable to use
claude-mem with their custom Claude Code configuration directory.

Fixes thedotmack#210 (partial - addresses custom config dir issue reported in comments)
@majiayu000 majiayu000 force-pushed the fix/support-claude-config-dir branch from 748f04f to 68c8a56 Compare December 11, 2025 05:39
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.

Plugin hook error

1 participant