Skip to content
Closed
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion apps/claude-code-plugin/SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ PyPI package.
Installed-plugin init is idempotent and uses plugin-local state:

```text
${CLAUDE_PLUGIN_DATA:-$HOME/.claude/plugins/data/memory-powermem-powermem}/
$HOME/.powermem/
.env
runtime.env
server.pid
Expand Down
6 changes: 1 addition & 5 deletions apps/claude-code-plugin/hooks/run-hook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
# Select the correct native binary for macOS / Linux. Pass-through args (e.g. "poll" for file watcher).
ROOT=$(CDPATH= cd -- "$(dirname "$0")" && pwd)
PLUGIN_ROOT=$(CDPATH= cd -- "$ROOT/.." && pwd)
if [ -n "${CLAUDE_PLUGIN_DATA:-}" ]; then
DATA_DIR=$CLAUDE_PLUGIN_DATA
else
DATA_DIR="$HOME/.claude/plugins/data/memory-powermem-powermem"
fi
DATA_DIR="$HOME/.powermem"
if [ -f "$DATA_DIR/runtime.env" ]; then
# shellcheck disable=SC1090
. "$DATA_DIR/runtime.env"
Expand Down
6 changes: 1 addition & 5 deletions apps/claude-code-plugin/scripts/common.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ SCRIPT_DIR=$(CDPATH= cd -- "$(dirname "$0")" && pwd)
PLUGIN_ROOT=$(CDPATH= cd -- "$SCRIPT_DIR/.." && pwd)

powermem_data_dir() {
if [ -n "${CLAUDE_PLUGIN_DATA:-}" ]; then
printf '%s\n' "$CLAUDE_PLUGIN_DATA"
else
printf '%s\n' "$HOME/.claude/plugins/data/memory-powermem-powermem"
fi
printf '%s\n' "$HOME/.powermem"
}

DATA_DIR=$(powermem_data_dir)
Expand Down
4 changes: 3 additions & 1 deletion apps/claude-code-plugin/scripts/init.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ provider = (
or key_provider
or model_prefix
)
model = os.environ.get("POWERMEM_INIT_LLM_MODEL", raw_model).strip()
# Strip provider prefix from raw model name (e.g. "anthropic/claude-sonnet-4-6" -> "claude-sonnet-4-6")
raw_model_clean = raw_model.split("/", 1)[1].strip() if "/" in raw_model else raw_model
model = os.environ.get("POWERMEM_INIT_LLM_MODEL", raw_model_clean).strip()
if provider and model:
model = normalize_model(provider, model)

Expand Down
1 change: 1 addition & 0 deletions src/powermem/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ def _get_default_env_file() -> Optional[str]:
project_root = Path(__file__).resolve().parents[2]
candidates = (
Path.cwd() / ".env",
Path.home() / ".powermem" / ".env",
project_root / ".env",
project_root / "examples" / "configs" / ".env",
)
Expand Down
Loading