Skip to content

feat(init): change default data dir to ~/.powermem#1019

Merged
wayyoungboy merged 3 commits into
oceanbase:mainfrom
lightzt99:feat/default-data-dir-powermem-home
Jun 12, 2026
Merged

feat(init): change default data dir to ~/.powermem#1019
wayyoungboy merged 3 commits into
oceanbase:mainfrom
lightzt99:feat/default-data-dir-powermem-home

Conversation

@lightzt99

@lightzt99 lightzt99 commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Remove CLAUDE_PLUGIN_DATA dependency from common.sh, run-hook.sh
  • Hardcode data directory to $HOME/.powermem
  • Add ~/.powermem/.env to settings.py auto-discovery candidates
  • Fix model prefix stripping bug in init.sh (prefix not stripped when provider detected from key)
  • Update SETUP.md documented default path
  • Add CLAUDE_PLUGIN_ROOT discovery guide to SETUP.md to prevent bash variable scoping errors when running plugin scripts

Test plan

  • common.sh sources correctly with DATA_DIR=$HOME/.powermem
  • run-hook.sh reads runtime.env from $HOME/.powermem/runtime.env
  • settings.py discovers .env from ~/.powermem/.env
  • .env created at ~/.powermem/.env by init.sh
  • init.sh → LLM validation → pip install with extras → server startup healthy
  • Model prefix stripping: anthropic/claude-sonnet-4-6 correctly becomes model=claude-sonnet-4-6 with provider detected from key
  • CLAUDE_PLUGIN_ROOT discovery: two-step invocation avoids empty $VAR expansion on single-line VAR=val sh "$VAR/..."

- Change default PowerMem data directory from
  ~/.claude/plugins/data/memory-powermem-powermem to ~/.powermem
- Add ~/.powermem/.env to settings.py auto-discovery candidates
- Update SETUP.md to reflect the new default path
Prevent bash scoping bug where `VAR=val sh "$VAR/..."` expands before
assignment. Give the AI a two-step fallback for discovering the plugin root.
…in init

The plugin is installed by Claude Code so only Anthropic credentials
are expected. Non-Anthropic keys (OpenAI, DeepSeek, Qwen) could be
present for other tools and would cause incorrect provider detection.
@wayyoungboy

Copy link
Copy Markdown
Member

LGTM

@wayyoungboy wayyoungboy merged commit f7503d2 into oceanbase:main Jun 12, 2026
20 checks passed
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.

2 participants