⛰️ LifeOS — The AI-powered Life Operating System that helps you hill climb to wherever you're going.
fix: setup.sh now automatically configures PAI_DIR in settings.json
Daniel Miesslerba76c8a05064
diff --git a/.claude/settings.json b/.claude/settings.jsonindex 8b5b21eb..379c2e08 100644--- a/.claude/settings.json+++ b/.claude/settings.json@@ -3,9 +3,10 @@"_envDocs": {"description": "Platform-agnostic environment variables used throughout the Personal AI system","DA": "Digital Assistant name - your AI's identity (e.g., 'Kai', 'PAI', 'Nova'). Used in statusline, hooks, and agent identification.",- "PAI_DIR": "Root directory for all PAI configuration, skills, hooks, and history. All paths resolve relative to this. CHANGE THIS to your actual path!",+ "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.","env": {"PAI_DIR": "/Users/YOURNAME/.claude","DA": "PAI",diff --git a/.claude/setup.sh b/.claude/setup.shindex c1fa4a70..b31b1255 100755--- a/.claude/setup.sh+++ b/.claude/setup.sh@@ -559,22 +559,29 @@ if ask_yes_no "Are you using Claude Code?"; then# Create Claude directory if it doesn't existmkdir -p "$HOME/.claude"- # Check if settings.json already exists- if [ -L "$HOME/.claude/settings.json" ]; then- print_info "Claude Code settings already linked to PAI"- elif [ -f "$HOME/.claude/settings.json" ]; then- print_warning "Claude Code settings file already exists"-- if ask_yes_no "Replace it with PAI's settings?"; then- mv "$HOME/.claude/settings.json" "$HOME/.claude/settings.json.backup"- print_info "Backed up existing settings to settings.json.backup"-- ln -sf "$PAI_DIR/settings.json" "$HOME/.claude/settings.json"- print_success "Claude Code configured to use PAI!"+ # Copy the .claude directory contents to ~/.claude+ print_step "Copying PAI configuration to ~/.claude..."++ # Copy hooks, skills, and other directories (but not settings.json yet)+ for dir in hooks skills commands Tools; do+ if [ -d "$PAI_DIR/.claude/$dir" ]; then+ cp -r "$PAI_DIR/.claude/$dir" "$HOME/.claude/"+ print_success "Copied $dir/"fi- else- ln -sf "$PAI_DIR/settings.json" "$HOME/.claude/settings.json"- print_success "Claude Code configured to use PAI!"+ done++ # Copy settings.json and update PAI_DIR with actual path+ if [ -f "$PAI_DIR/.claude/settings.json" ]; then+ cp "$PAI_DIR/.claude/settings.json" "$HOME/.claude/settings.json"++ # Update PAI_DIR to the actual home directory path+ if [[ "$OSTYPE" == "darwin"* ]]; then+ sed -i '' "s|/Users/YOURNAME/.claude|$HOME/.claude|g" "$HOME/.claude/settings.json"+ else+ sed -i "s|/Users/YOURNAME/.claude|$HOME/.claude|g" "$HOME/.claude/settings.json"+ fi++ print_success "Updated settings.json with your path: $HOME/.claude"fiecho ""