Skip to content

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

Open
lightzt99 wants to merge 3 commits into
mainfrom
feat/default-data-dir-powermem-home
Open

feat(init): change default data dir to ~/.powermem#4
lightzt99 wants to merge 3 commits into
mainfrom
feat/default-data-dir-powermem-home

Conversation

@lightzt99

@lightzt99 lightzt99 commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • Change default PowerMem data directory from ~/.claude/plugins/data/memory-powermem-powermem to ~/.powermem — shorter, provider-neutral, no longer tied to Claude Code plugin directory layout
  • Stop respecting CLAUDE_PLUGIN_DATA for data directory resolution: both common.sh and run-hook.sh now hardcode $HOME/.powermem regardless of CC runtime injection
  • Add ~/.powermem/.env to settings.py auto-discovery candidates
  • Fix a bug introduced in fix(init): include server,seekdb extras and improve LLM auto-detection oceanbase/powermem#1016: model prefix (e.g. anthropic/) was not stripped from raw_model when provider is detected via API key instead of model name prefix

Changes

File Change
scripts/common.sh powermem_data_dir() default → $HOME/.powermem, CLAUDE_PLUGIN_DATA check removed
hooks/run-hook.sh DATA_DIR$HOME/.powermem, CLAUDE_PLUGIN_DATA check removed
SETUP.md Update documented default path
settings.py Add ~/.powermem/.env to auto-discovery candidates
scripts/init.sh Strip provider prefix from raw_model unconditionally (fixes model validation failure when provider comes from key detection)

Test plan

  • init.sh with CLAUDE_PLUGIN_DATA injected: Data dir resolves to ~/.powermem
  • .env created at ~/.powermem/.env with auto-detected config from settings.json
  • LLM validation passes (model name correctly stripped of anthropic/ prefix)
  • run-hook.sh resolves DATA_DIR to ~/.powermem and reads runtime.env
  • Full /memory-powermem:init flow: server installs, starts healthy on port 8848, log at ~/.powermem/powermem-server.log

@lightzt99
lightzt99 force-pushed the feat/default-data-dir-powermem-home branch 3 times, most recently from 494bd84 to 6b6ce65 Compare June 12, 2026 07:41
- 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
@lightzt99
lightzt99 force-pushed the feat/default-data-dir-powermem-home branch from 6b6ce65 to fd65938 Compare June 12, 2026 07:51
@lightzt99 lightzt99 changed the title feat(init): change default data dir to ~/.powermem with auto-migration feat(init): change default data dir to ~/.powermem Jun 12, 2026
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.
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