⛰️ LifeOS — The AI-powered Life Operating System that helps you hill climb to wherever you're going.
fix: Platform-agnostic PAI_DIR placeholder for cross-platform installs
Daniel Miesslerdabaea9b7ec1
diff --git a/.claude/settings.json b/.claude/settings.jsonindex 379c2e08..bb6045f4 100644--- a/.claude/settings.json+++ b/.claude/settings.json@@ -6,9 +6,9 @@"PAI_DIR": "Root directory for all PAI configuration. The setup.sh script updates this automatically. If hooks fail with 'No such file or directory', update this to your actual path (e.g., /Users/john/.claude).","CLAUDE_CODE_MAX_OUTPUT_TOKENS": "Maximum tokens for Claude responses. Higher values allow longer outputs but cost more."},- "_setupNote": "IMPORTANT: Run 'bash .claude/setup.sh' to automatically configure PAI_DIR. If you see hook errors mentioning 'YOURNAME', the setup script was not run or you need to manually change PAI_DIR below to your actual home directory path.",+ "_setupNote": "IMPORTANT: Run 'bash .claude/setup.sh' to automatically configure PAI_DIR. If you see hook errors mentioning '__HOME__', the setup script was not run or you need to manually change PAI_DIR below to your actual home directory path (e.g., /Users/john/.claude on macOS or /home/john/.claude on Linux).","env": {- "PAI_DIR": "/Users/YOURNAME/.claude",+ "PAI_DIR": "__HOME__/.claude","DA": "PAI","CLAUDE_CODE_MAX_OUTPUT_TOKENS": "64000"},diff --git a/.claude/setup.sh b/.claude/setup.shindex b31b1255..302442a2 100755--- a/.claude/setup.sh+++ b/.claude/setup.sh@@ -574,14 +574,17 @@ if ask_yes_no "Are you using Claude Code?"; thenif [ -f "$PAI_DIR/.claude/settings.json" ]; thencp "$PAI_DIR/.claude/settings.json" "$HOME/.claude/settings.json"- # Update PAI_DIR to the actual home directory path+ # Get home directory robustly (fallback if $HOME is unset)+ USER_HOME="${HOME:-$(eval echo ~)}"++ # Update PAI_DIR to the actual home directory path (platform-agnostic)if [[ "$OSTYPE" == "darwin"* ]]; then- sed -i '' "s|/Users/YOURNAME/.claude|$HOME/.claude|g" "$HOME/.claude/settings.json"+ sed -i '' "s|__HOME__|${USER_HOME}|g" "$HOME/.claude/settings.json"else- sed -i "s|/Users/YOURNAME/.claude|$HOME/.claude|g" "$HOME/.claude/settings.json"+ sed -i "s|__HOME__|${USER_HOME}|g" "$HOME/.claude/settings.json"fi- print_success "Updated settings.json with your path: $HOME/.claude"+ print_success "Updated settings.json with your path: ${USER_HOME}/.claude"fiecho ""diff --git a/PAI_CONTRACT.md b/PAI_CONTRACT.mdindex aa2007f3..fb75c4a7 100644--- a/PAI_CONTRACT.md+++ b/PAI_CONTRACT.md@@ -142,7 +142,7 @@ bun ${PAI_DIR}/hooks/self-test.tsExpected output:```-✅ PAI_DIR resolves: /Users/yourname/.claude+✅ PAI_DIR resolves: /home/yourname/.claude # or /Users/yourname/.claude on macOS✅ Hooks directory exists✅ CORE skill loads✅ Settings.json validdiff --git a/PAI_SYNC_GUIDE.md b/PAI_SYNC_GUIDE.mdindex 807a8010..fc19c7ee 100644--- a/PAI_SYNC_GUIDE.md+++ b/PAI_SYNC_GUIDE.md@@ -91,7 +91,7 @@ bun .claude/hooks/self-test.tsExpected output:```-✅ PAI_DIR Resolution: /Users/yourname/Projects/PAI/.claude+✅ PAI_DIR Resolution: $HOME/.claude # Shows your actual resolved path✅ Hooks Directory: Found✅ CORE Skill: loads correctly...diff --git a/README.md b/README.mdindex dc799c2d..94d3c4e4 100644--- a/README.md+++ b/README.md@@ -394,7 +394,7 @@ Kai and I work hard to address issues and PRs throughout the week — we try not**PAI_DIR Auto-Configuration**- `setup.sh` now automatically configures `PAI_DIR` in `settings.json` with your actual home directory path-- No more manual editing of `/Users/YOURNAME/.claude` placeholder+- No more manual editing of `__HOME__/.claude` placeholder- Clear error messaging if hooks fail due to misconfigured paths**Improved Documentation**diff --git a/docs/QUICKSTART.md b/docs/QUICKSTART.mdindex ad0752aa..9a3c48d0 100644--- a/docs/QUICKSTART.md+++ b/docs/QUICKSTART.md@@ -283,9 +283,9 @@ If Bun isn't found, reinstall it and restart your terminal.</details><details>-<summary><strong>Hook Errors Mentioning "YOURNAME"</strong></summary>+<summary><strong>Hook Errors Mentioning "__HOME__"</strong></summary>-If you see errors like `No such file or directory: /Users/YOURNAME/.claude/...`, the `PAI_DIR` variable wasn't configured correctly.+If you see errors like `No such file or directory: __HOME__/.claude/...`, the `PAI_DIR` variable wasn't configured correctly.**Fix: Re-run the setup script**```bash@@ -300,10 +300,11 @@ This automatically configures `PAI_DIR` with your actual home directory path.nano ~/.claude/settings.json# Find this line:-"PAI_DIR": "/Users/YOURNAME/.claude"+"PAI_DIR": "__HOME__/.claude"-# Replace with your actual path:-"PAI_DIR": "/Users/youractualusername/.claude"+# Replace with your actual path (examples):+# macOS: "PAI_DIR": "/Users/yourusername/.claude"+# Linux: "PAI_DIR": "/home/yourusername/.claude"```</details>