⛰️ LifeOS — The AI-powered Life Operating System that helps you hill climb to wherever you're going.
Add comprehensive getting-started documentation with automated setup
Daniel Miesslerdb311b3f7012
diff --git a/START-HERE.md b/START-HERE.mdnew file mode 100644index 00000000..1f4c2765--- /dev/null+++ b/START-HERE.md@@ -0,0 +1,115 @@+# 👋 Welcome to PAI!++**You just cloned your Personal AI Infrastructure. Here's what to do next:**++---++## ⚡ Quick Setup (5 Minutes)++**Option 1: Automated Setup (Recommended)**++Just run this command and follow the prompts:++```bash+./setup.sh+```++The script will:+- ✅ Check what you need+- ✅ Install missing software+- ✅ Configure everything+- ✅ Test your setup++**Easy peasy!** 🎉++---++**Option 2: Manual Setup**++Prefer to do it yourself? Read the complete guide:++📖 **[How to Start Guide](./documentation/how-to-start.md)**++This friendly, step-by-step guide explains everything in detail.++---++## 📚 Documentation++| Document | When to Use It |+|----------|----------------|+| **[How to Start](./documentation/how-to-start.md)** | Setting up PAI for the first time |+| **[Quick Reference](./documentation/QUICK-REFERENCE.md)** | Daily usage, commands, troubleshooting |+| **[README](./README.md)** | Understanding PAI's vision and capabilities |+| **[Skills System](./documentation/skills-system.md)** | Learning how skills work |+| **[Architecture](./documentation/architecture.md)** | Understanding the system design |++---++## 🆘 Need Help?++**First time?** → Read [How to Start Guide](./documentation/how-to-start.md)++**Quick question?** → Check [Quick Reference](./documentation/QUICK-REFERENCE.md)++**Something broken?** → See the [Troubleshooting section](./documentation/how-to-start.md#-troubleshooting)++**Still stuck?** → [Open an issue](https://github.com/danielmiessler/Personal_AI_Infrastructure/issues)++---++## 🎯 What is PAI?++PAI (Personal AI Infrastructure) is a complete system for augmenting your life with AI. It:++- 🧠 **Knows about YOU** - Your projects, preferences, and goals+- 🎯 **Activates skills intelligently** - Based on what you're trying to do+- 🤖 **Uses specialized agents** - Research, development, design, security, etc.+- 🔌 **Integrates everything** - APIs, tools, services, all in one place+- 🌍 **Works anywhere** - Built on open standards, not locked to one vendor++**Think of it as your personal AI that actually understands your life.**++Read more: [Full README](./README.md)++---++## 🚀 Get Started Now++**Ready?** Pick your path:++1. **🤖 Just want it to work:** Run `./setup.sh`+2. **📖 Want to understand first:** Read [How to Start Guide](./documentation/how-to-start.md)+3. **⚡ Already know what you're doing:** Check [Quick Reference](./documentation/QUICK-REFERENCE.md)++---++## 🎬 Watch the Video++Prefer video? Watch the overview:++**[PAI Overview Video](https://youtu.be/iKwRWwabkEc)** (YouTube)++---++## ⭐ One More Thing++If PAI helps you, **star the repo** on GitHub! ⭐++It helps others discover this project and supports the mission to give AI capabilities to everyone on Earth.++**[★ Star on GitHub](https://github.com/danielmiessler/Personal_AI_Infrastructure)**++---++**Questions? Issues? Ideas?**++- 🐛 [Report a bug](https://github.com/danielmiessler/Personal_AI_Infrastructure/issues)+- 💬 [Start a discussion](https://github.com/danielmiessler/Personal_AI_Infrastructure/discussions)+- 📧 [Contact Daniel](https://danielmiessler.com)++---++*Welcome to the journey toward Human 3.0!* 🚀++*Built with ❤️ by [Daniel Miessler](https://danielmiessler.com)*diff --git a/documentation/QUICK-REFERENCE.md b/documentation/QUICK-REFERENCE.mdnew file mode 100644index 00000000..adc2f3e9--- /dev/null+++ b/documentation/QUICK-REFERENCE.md@@ -0,0 +1,430 @@+# PAI Quick Reference Card++**Bookmark this page!** This is your quick reference for common PAI commands and tasks.++---++## 🚀 Getting Started++### First Time Setup++```bash+# Run the automated setup script+curl -fsSL https://raw.githubusercontent.com/danielmiessler/Personal_AI_Infrastructure/main/setup.sh | bash++# Or manual setup - see documentation/how-to-start.md+```++### Environment Check++```bash+# Verify PAI is installed+echo $PAI_DIR # Should show: /Users/yourname/PAI++# Go to PAI directory+cd $PAI_DIR++# See what's available+ls -la+```++---++## 📁 Essential Directories++| Directory | What's There | Example |+|-----------|--------------|---------|+| `$PAI_DIR/skills/` | All available skills | `ls $PAI_DIR/skills/` |+| `$PAI_DIR/commands/` | Pre-built commands | `ls $PAI_DIR/commands/` |+| `$PAI_DIR/documentation/` | Help and guides | `open $PAI_DIR/documentation/` |+| `$PAI_DIR/agents/` | Specialized AI agents | `ls $PAI_DIR/agents/` |+| `$PAI_DIR/hooks/` | Automation scripts | `ls $PAI_DIR/hooks/` |+| `$PAI_DIR/.env` | Your API keys and settings | `open -e $PAI_DIR/.env` |++---++## ⚙️ Common Commands++### Update PAI++```bash+# Pull latest version+cd $PAI_DIR && git pull++# Check what changed+git log -5 --oneline++# See current version info+cat $PAI_DIR/README.md | head -50+```++### View Available Skills++```bash+# List all skills+ls $PAI_DIR/skills/++# See what a skill does+cat $PAI_DIR/skills/research/SKILL.md++# Search for a specific skill+find $PAI_DIR/skills -name "*research*"+```++### Manage Environment Variables++```bash+# Check current settings+echo $PAI_DIR # PAI location+echo $DA # AI assistant name+echo $DA_COLOR # Display color++# Edit environment variables+open -e ~/.zshrc # or ~/.bashrc++# Reload after changes+source ~/.zshrc # or source ~/.bashrc+```++### Configure API Keys++```bash+# Edit API keys+open -e $PAI_DIR/.env++# View current keys (safe - doesn't show values)+grep "^[A-Z]" $PAI_DIR/.env | cut -d= -f1++# Copy example env file+cp $PAI_DIR/.env.example $PAI_DIR/.env+```++---++## 🎯 Voice Server++### Start Voice Server++```bash+# Start in background+cd $PAI_DIR/voice-server && bun server.ts &++# Start in foreground (see logs)+cd $PAI_DIR/voice-server && bun server.ts+```++### Test Voice Server++```bash+# Check if running+curl -s http://localhost:8888/health++# Send test message+curl -X POST http://localhost:8888/notify \+ -H "Content-Type: application/json" \+ -d '{"message": "Hello from PAI!"}'+```++### Stop Voice Server++```bash+# Find process+lsof -i :8888++# Kill by port+kill $(lsof -t -i:8888)+```++---++## 🔍 Troubleshooting++### PAI_DIR Not Found++```bash+# Check if set+echo $PAI_DIR++# If empty, add to shell config+echo 'export PAI_DIR="$HOME/PAI"' >> ~/.zshrc+source ~/.zshrc+```++### Skills Not Loading++```bash+# Verify skills exist+ls -la $PAI_DIR/skills/++# Check permissions+chmod -R u+r $PAI_DIR/skills/++# Look for SKILL.md files+find $PAI_DIR/skills -name "SKILL.md"+```++### Environment File Issues++```bash+# Check if .env exists+ls -la $PAI_DIR/.env++# Create from template+cp $PAI_DIR/.env.example $PAI_DIR/.env++# Verify format (no quotes around values)+cat $PAI_DIR/.env+```++### Claude Code Not Recognizing PAI++```bash+# Check if settings are linked+ls -la ~/.claude/settings.json++# Create symbolic link+ln -sf $PAI_DIR/settings.json ~/.claude/settings.json++# Restart Claude Code+```++### Git Issues++```bash+# Check remote+cd $PAI_DIR && git remote -v++# Reset to latest+cd $PAI_DIR && git fetch && git reset --hard origin/main++# Check status+cd $PAI_DIR && git status+```++---++## 🎨 Customization++### Customize PAI Skill++```bash+# Open main PAI skill+open -e $PAI_DIR/skills/PAI/SKILL.md++# Look for [CUSTOMIZE:] markers+grep -n "CUSTOMIZE:" $PAI_DIR/skills/PAI/SKILL.md+```++### Change AI Assistant Name++```bash+# Edit shell config+open -e ~/.zshrc++# Find this line and change "Kai" to your preference:+export DA="Kai"++# Reload+source ~/.zshrc+```++### Change Display Color++```bash+# Edit shell config+open -e ~/.zshrc++# Options: purple, blue, green, cyan, red, yellow+export DA_COLOR="purple"++# Reload+source ~/.zshrc+```++---++## 📚 Skills Quick Reference++| Skill | Trigger Words | Example |+|-------|---------------|---------|+| **research** | research, investigate, find | "Research quantum computing" |+| **development** | build, create, implement | "Build a meditation app" |+| **fabric** | threat model, summarize, extract | "Summarize this article" |+| **blogging** | blog, write, publish | "Write a blog post about AI" |+| **design** | design, UI, UX | "Design a dashboard" |+| **ffuf** | pentest, security, fuzz | "Test this API endpoint" |+| **web-scraping** | scrape, extract, crawl | "Scrape data from this site" |+| **chrome-devtools** | browser, screenshot, debug | "Take a screenshot" |++---++## 🛠️ Useful One-Liners++```bash+# Quick PAI status check+echo "PAI: $PAI_DIR" && ls $PAI_DIR/skills | wc -l | xargs echo "Skills:"++# Count commands+find $PAI_DIR/commands -name "*.md" | wc -l++# Find all skill files+find $PAI_DIR/skills -name "SKILL.md"++# View recent PAI updates+cd $PAI_DIR && git log --oneline -10++# Search for a keyword in all skills+grep -r "keyword" $PAI_DIR/skills/++# Backup your .env file+cp $PAI_DIR/.env $PAI_DIR/.env.backup++# View all environment variables related to PAI+env | grep PAI+```++---++## 🆘 Emergency Commands++### Complete Reset++```bash+# WARNING: This removes your customizations!++# Backup first+cp $PAI_DIR/.env $PAI_DIR/.env.backup+cp ~/.zshrc ~/.zshrc.backup++# Re-clone PAI+cd ~ && mv PAI PAI.old+git clone https://github.com/danielmiessler/Personal_AI_Infrastructure.git PAI++# Restore your .env+cp PAI.old/.env PAI/.env+```++### Reinstall Everything++```bash+# Re-run setup script+cd ~ && curl -fsSL https://raw.githubusercontent.com/danielmiessler/Personal_AI_Infrastructure/main/setup.sh | bash+```++---++## 📞 Getting Help++### Check Logs++```bash+# System logs (if configured)+ls -la ~/Library/Logs/pai*++# Git history+cd $PAI_DIR && git log --oneline -20++# Voice server logs (if running in background)+tail -f ~/Library/Logs/pai-voice-server.log+```++### Documentation++```bash+# View all documentation+ls $PAI_DIR/documentation/++# Getting started guide+open $PAI_DIR/documentation/how-to-start.md++# Skills system explanation+open $PAI_DIR/documentation/skills-system.md++# Architecture overview+open $PAI_DIR/documentation/architecture.md+```++### Community++- 🐛 **Report Issues:** https://github.com/danielmiessler/Personal_AI_Infrastructure/issues+- 💬 **Discussions:** https://github.com/danielmiessler/Personal_AI_Infrastructure/discussions+- ⭐ **Star the Repo:** https://github.com/danielmiessler/Personal_AI_Infrastructure+- 📝 **Blog:** https://danielmiessler.com/blog/personal-ai-infrastructure+- 🎬 **Video:** https://youtu.be/iKwRWwabkEc++---++## 🔑 Environment Variables++| Variable | Purpose | Example |+|----------|---------|---------|+| `PAI_DIR` | PAI installation location | `/Users/daniel/PAI` |+| `PAI_HOME` | Your home directory | `/Users/daniel` |+| `DA` | AI assistant name | `Kai` |+| `DA_COLOR` | Display color | `purple` |+| `PORT` | Voice server port | `8888` |+| `PERPLEXITY_API_KEY` | Perplexity research | `pk-...` |+| `GOOGLE_API_KEY` | Gemini AI | `AIza...` |+| `REPLICATE_API_TOKEN` | AI generation | `r8_...` |+| `OPENAI_API_KEY` | GPT integration | `sk-...` |++---++## 💡 Pro Tips++### Aliases for Speed++Add these to your `~/.zshrc`:++```bash+# Quick navigation+alias pai='cd $PAI_DIR'+alias pskills='ls $PAI_DIR/skills'+alias pcmds='ls $PAI_DIR/commands'++# Quick edits+alias pai-env='open -e $PAI_DIR/.env'+alias pai-skill='open -e $PAI_DIR/skills/PAI/SKILL.md'+alias pai-shell='open -e ~/.zshrc'++# Updates+alias pai-update='cd $PAI_DIR && git pull'+alias pai-status='cd $PAI_DIR && git status'++# Voice+alias pai-voice='cd $PAI_DIR/voice-server && bun server.ts &'+alias pai-test='curl -X POST http://localhost:8888/notify -d "{\"message\":\"Test\"}"'+```++### Keyboard Shortcuts in Terminal++- `Ctrl+R` - Search command history+- `Ctrl+A` - Jump to start of line+- `Ctrl+E` - Jump to end of line+- `Ctrl+U` - Clear line+- `Ctrl+C` - Cancel current command+- `Ctrl+D` - Exit terminal++---++## 📱 Quick Access URLs++Keep these bookmarked:++- **GitHub Repo:** https://github.com/danielmiessler/Personal_AI_Infrastructure+- **Issues:** https://github.com/danielmiessler/Personal_AI_Infrastructure/issues+- **Discussions:** https://github.com/danielmiessler/Personal_AI_Infrastructure/discussions+- **Claude Code:** https://claude.ai/code+- **Perplexity API:** https://www.perplexity.ai/settings/api+- **Google AI Studio:** https://aistudio.google.com/app/apikey+- **Replicate:** https://replicate.com/account/api-tokens++---++**Last Updated:** October 2025++**Questions?** File an issue or start a discussion on GitHub!++---++*Keep this page bookmarked for quick reference!* 🔖diff --git a/documentation/README.md b/documentation/README.mdindex 60015682..37d9fedd 100644--- a/documentation/README.md+++ b/documentation/README.md@@ -4,8 +4,16 @@ Welcome to the Personal AI Infrastructure (PAI) documentation. PAI is a comprehe## 📚 Documentation Index+### 🚀 New to PAI? Start Here!++> **👉 [Complete Getting Started Guide](./how-to-start.md)** - Comprehensive, friendly guide with automated setup option+>+> **👉 [Quick Reference Card](./QUICK-REFERENCE.md)** - Bookmark this! Common commands and troubleshooting+### Getting Started-- [Quick Start Guide](./quick-start.md) - Get up and running in minutes+- **[How to Start Guide](./how-to-start.md) 🆕** - Step-by-step setup with friendly explanations (RECOMMENDED)+- [Quick Start Guide](./quick-start.md) - Fast technical setup for developers+- [Quick Reference](./QUICK-REFERENCE.md) 🆕 - Common commands and one-liners- [Installation Guide](./installation.md) - Detailed installation instructions- [Configuration Guide](./configuration.md) - System configuration optionsdiff --git a/documentation/how-to-start.md b/documentation/how-to-start.mdnew file mode 100644index 00000000..e53cc1e5--- /dev/null+++ b/documentation/how-to-start.md@@ -0,0 +1,637 @@+# 🚀 How to Get Started with PAI++**Welcome! Let's get your Personal AI Infrastructure up and running.**++---++## 👋 Hey there!++First things first: **Don't worry, this is easier than it looks.**++I know that setting up developer infrastructure can feel intimidating, especially if you're not super technical. But here's the thing - PAI is designed to be accessible to everyone, and this guide is going to walk you through everything step by step.++Think of this as having a friend guide you through the setup process. We'll go slow, explain everything, and by the end of this, you'll have your own personal AI assistant that actually knows about YOUR life, YOUR projects, and YOUR goals.++**Two ways to do this:**+1. 🤖 **Automated Setup** - Run one command and let the script handle everything (recommended if you're nervous!)+2. 📖 **Manual Setup** - Follow along step-by-step (recommended if you want to understand what's happening)++Choose whichever makes you comfortable. Both get you to the same place!++---++## 🤖 Option 1: Automated Setup (The Easy Button)++**Just want it to work? Run this:**++```bash+# Download and run the automated setup script+curl -fsSL https://raw.githubusercontent.com/danielmiessler/Personal_AI_Infrastructure/main/setup.sh | bash+```++That's it! The script will:+- ✅ Check what you have installed (and install what's missing)+- ✅ Clone the PAI repository+- ✅ Set up your environment variables+- ✅ Create all necessary directories+- ✅ Configure your shell+- ✅ Test everything to make sure it works++**The script will ask you questions along the way, so you're always in control.**++After it finishes, skip to the [🎉 You're Done!](#-youre-done) section.++---++## 📖 Option 2: Manual Setup (Step by Step)++**Want to understand what's happening? Let's do this together.**++---++### Step 1: Prerequisites (What You Need Installed)++Before we start, let's make sure you have the basics. Don't worry - we'll walk through installing each one.++#### Required:++**1. macOS** (PAI is primarily built for Mac)+ - You probably already have this! If you're reading this on a Mac, you're good.+ - **Version needed:** macOS 11 (Big Sur) or newer+ - **How to check:** Click the Apple menu → "About This Mac"++**2. Git** (for downloading PAI)+ - **What it is:** A tool for downloading and managing code+ - **Check if you have it:** Open Terminal and type: `git --version`+ - **Don't have it?** Install it:+ ```bash+ # Install Xcode Command Line Tools (includes Git)+ xcode-select --install+ ```+ - Click "Install" when the popup appears, wait a few minutes, done!++**3. Bun** (JavaScript runtime)+ - **What it is:** A fast JavaScript engine (like Node.js but better)+ - **Why you need it:** Powers the voice server and various PAI features+ - **Check if you have it:** `bun --version`+ - **Don't have it?** Install it:+ ```bash+ # Install Homebrew first (if you don't have it)+ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"++ # Then install Bun+ brew install oven-sh/bun/bun+ ```++**4. Claude Code** (or another AI assistant)+ - **What it is:** The AI interface you'll use to interact with PAI+ - **Get it:** Visit [https://claude.ai/code](https://claude.ai/code)+ - **Alternatives:** You can also use GPT, Gemini, or other AI platforms - PAI is designed to work with any of them++#### Optional (but recommended):++**5. API Keys** (for advanced features)+ - These unlock extra capabilities, but PAI works without them too+ - We'll set these up later - no need to worry about them now++---++### Step 2: Download PAI++Okay, you've got the prerequisites. Now let's grab PAI!++**Open your Terminal** (Applications → Utilities → Terminal) and run:++```bash+# Go to a good place to download PAI+# (You can change this to wherever you want - ~/Projects, ~/Documents, etc.)+cd ~++# Download PAI from GitHub+git clone https://github.com/danielmiessler/Personal_AI_Infrastructure.git PAI++# Go into the PAI directory+cd PAI++# Check that it worked - you should see a bunch of folders+ls -la+```++**What you should see:**+```+agents/+commands/+documentation/+hooks/+skills/+README.md+settings.json+... and more+```++**If you see that, you're doing great!** 🎉++---++### Step 3: Set Up Environment Variables++**What are environment variables?**+Think of them as settings your computer remembers every time you open Terminal. We need to tell your computer where PAI lives.++**Here's what we're going to do:**++1. **Open your shell configuration file:**+ ```bash+ # If you use zsh (default on modern Macs)+ open -e ~/.zshrc++ # If you use bash+ open -e ~/.bashrc+ ```++2. **Add these lines to the very bottom of the file:**+ ```bash+ # ========== PAI Configuration ==========+ # Where PAI is installed (change this to YOUR path!)+ export PAI_DIR="$HOME/PAI"++ # Your home directory (this is automatic)+ export PAI_HOME="$HOME"++ # (Optional) Your AI assistant's name+ export DA="Kai" # Change "Kai" to whatever you want to call your AI++ # (Optional) Display color for your AI+ export DA_COLOR="purple" # Options: purple, blue, green, cyan, red, yellow+ ```++3. **Save the file** (Command+S) and close it++4. **Load the new settings:**+ ```bash+ source ~/.zshrc # or source ~/.bashrc if you use bash+ ```++5. **Test that it worked:**+ ```bash+ echo $PAI_DIR+ ```+ **You should see:** `/Users/yourname/PAI` (or wherever you put it)++**If you see that path, you're golden!** ✨++---++### Step 4: Configure Your Environment File++PAI uses a `.env` file to store API keys and settings. Let's set that up.++```bash+# Go to your PAI directory+cd $PAI_DIR++# Copy the example environment file+cp .env.example .env++# Open it in a text editor+open -e .env+```++**What you'll see in the file:**++```bash+# ============ REQUIRED CONFIGURATION ============+PAI_DIR="/path/to/PAI" # Your PAI location+PAI_HOME="$HOME" # Your home directory++# ============ RESEARCH AGENTS (Optional) ============+PERPLEXITY_API_KEY="" # For web research+GOOGLE_API_KEY="" # For Gemini research+# Claude WebSearch is built-in - no key needed!++# ============ AI GENERATION (Optional) ============+REPLICATE_API_TOKEN="" # For AI images/videos+OPENAI_API_KEY="" # For GPT features++# ============ SYSTEM CONFIGURATION ============+PORT="8888" # Voice server port++# ============ YOUR AI ASSISTANT ============+DA="Assistant" # Your AI's name+DA_COLOR="purple" # Display color+```++**What to do:**++1. **Update PAI_DIR** to your actual PAI path (should already be correct if you followed Step 3)+2. **Leave the API keys blank for now** - PAI works without them!+3. **Customize DA name** if you want (I call mine "Kai")+4. **Save the file** (Command+S)++**Important:** Your `.env` file contains sensitive information! PAI automatically keeps it private (it's in `.gitignore`), so don't worry about accidentally sharing it.++---++### Step 5: Optional - Voice Server Setup++**Do you want your AI to talk to you?** This is totally optional but pretty cool!++PAI can use macOS's built-in Premium voices (they're free, high-quality, and work offline).++**To set this up:**++1. **Download a Premium voice:**+ - Go to: System Settings → Accessibility → Spoken Content+ - Click "System Voice" → "Manage Voices..."+ - Download a Premium or Enhanced voice (try "Zoe" or "Samantha" - they're great!)++2. **Start the voice server:**+ ```bash+ cd $PAI_DIR/voice-server+ bun install # Install dependencies+ bun server.ts & # Start in background+ ```++3. **Test it:**+ ```bash+ curl -X POST http://localhost:8888/notify \+ -H "Content-Type: application/json" \+ -d '{"message": "Hello! Your voice server is working!"}'+ ```++ **You should hear your computer speak!** 🔊++**Don't hear anything?** No worries - skip this for now. You can always set it up later. The voice server is completely optional.++---++### Step 6: Configure Your AI Assistant (Claude Code)++Almost there! Now let's connect Claude Code to PAI.++1. **Open Claude Code**+ - Download from [https://claude.ai/code](https://claude.ai/code) if you haven't already+ - Sign in with your Anthropic account++2. **Point Claude Code to your PAI settings:**++ Claude Code looks for settings in `~/.claude/settings.json`. We need to tell it to use PAI's settings instead.++ ```bash+ # Create a symbolic link from Claude's settings location to PAI's settings+ ln -sf $PAI_DIR/settings.json ~/.claude/settings.json+ ```++3. **Restart Claude Code** (just close and reopen it)++4. **Test PAI:**++ Open Claude Code and say something like:+ ```+ "Hey, what's my name?"+ ```++ Claude should load PAI's context and know that it's operating as your personal AI infrastructure!++---++### Step 7: Understanding Your Setup++Congratulations! PAI is installed. But let's take a moment to understand what you just set up.++**Here's what you have now:**++```+PAI/+├── agents/ # Specialized AI agents (researcher, engineer, designer, etc.)+├── commands/ # Custom commands you can run+├── documentation/ # Help files (you're reading one!)+├── hooks/ # Automation that runs when you do things+├── skills/ # Specialized capabilities (research, coding, design, etc.)+├── settings.json # Your Claude Code configuration+├── .env # Your API keys and settings+└── voice-server/ # Voice notification system+```++**How it works:**++1. **You talk to Claude Code** (or your AI of choice)+2. **PAI recognizes your intent** ("I want to research something", "Build an app", etc.)+3. **PAI loads the right context** (skills, tools, knowledge)+4. **Specialized agents help** if needed (researcher for research, engineer for coding, etc.)+5. **You get smart, personalized assistance** that knows about YOUR projects and YOUR life++---++### Step 8: Customize PAI for YOU++This is where it gets fun! PAI is completely customizable. Here are some things you can do:++**Add your own projects:**+```bash+# Create a new project context+mkdir -p $PAI_DIR/skills/my-project+echo "# My Amazing Project" > $PAI_DIR/skills/my-project/SKILL.md+# Then edit that file with information about your project+```++**Customize the PAI skill** (tells PAI who you are):+```bash+# Open the main PAI skill+open -e $PAI_DIR/skills/PAI/SKILL.md++# Look for lines that say [CUSTOMIZE:] and update them with YOUR information+```++**Add API keys for advanced features:**+```bash+# Open your .env file+open -e $PAI_DIR/.env++# Add API keys for services you want to use:+# - PERPLEXITY_API_KEY for web research+# - GOOGLE_API_KEY for Gemini AI+# - REPLICATE_API_TOKEN for AI image generation+```++**Create custom commands:**+```bash+# Look at existing commands for inspiration+ls $PAI_DIR/commands/++# Create your own!+touch $PAI_DIR/commands/my-custom-command.md+```++---++## 🎉 You're Done!++**Seriously! Your Personal AI Infrastructure is ready to go.**++Here's what you can do now:++### Try These to Test Your Setup:++1. **Just chat:**+ ```+ "Hey, tell me about yourself"+ ```+ PAI should introduce itself as your personal AI assistant!++2. **Do some research:**+ ```+ "Research the latest developments in quantum computing"+ ```+ PAI will launch research agents and find information for you!++3. **Start a project:**+ ```+ "Help me build a meditation timer app"+ ```+ PAI will load development skills and start helping you build!++4. **Explore skills:**+ ```+ "What skills do you have available?"+ ```+ PAI will show you all the specialized capabilities it has!++---++## 🆘 Troubleshooting++**Something not working? Don't panic.** Here are the most common issues:++### "PAI_DIR not found" or "command not found: PAI_DIR"++**Fix:**+```bash+# Make sure you added the environment variables to your shell config+open -e ~/.zshrc # or ~/.bashrc++# Make sure you see these lines:+export PAI_DIR="$HOME/PAI"+export PAI_HOME="$HOME"++# Save the file, then reload:+source ~/.zshrc # or source ~/.bashrc++# Test it:+echo $PAI_DIR # Should show /Users/yourname/PAI+```++### Claude Code doesn't seem to know about PAI++**Fix:**+```bash+# Make sure the symbolic link is created:+ls -la ~/.claude/settings.json++# If it's not pointing to PAI, create it:+ln -sf $PAI_DIR/settings.json ~/.claude/settings.json++# Restart Claude Code+```++### Voice server not working++**Fix:**+```bash+# Check if Bun is installed:+bun --version++# Try starting the voice server manually:+cd $PAI_DIR/voice-server+bun server.ts++# Check for errors in the output++# Make sure you have a Premium voice installed:+# System Settings → Accessibility → Spoken Content → System Voice → Manage Voices+```++### API Keys not working++**Fix:**+```bash+# Make sure your .env file exists:+ls -la $PAI_DIR/.env++# Open it and check the keys:+open -e $PAI_DIR/.env++# API keys should NOT have quotes around them:+# ✅ CORRECT: PERPLEXITY_API_KEY=pk-abc123def456+# ❌ INCORRECT: PERPLEXITY_API_KEY="pk-abc123def456"+```++### Skills not loading++**Fix:**+```bash+# List your skills:+ls -la $PAI_DIR/skills/++# Make sure each skill has a SKILL.md file:+find $PAI_DIR/skills -name "SKILL.md"++# Check permissions:+chmod -R u+r $PAI_DIR/skills+```++**Still stuck?**+- Check the [full documentation](./README.md)+- Look at [architecture.md](./architecture.md) to understand how things work+- File an issue on [GitHub](https://github.com/danielmiessler/Personal_AI_Infrastructure/issues)+- Review the logs: `ls -la ~/Library/Logs/`++---++## 🎓 What's Next?++Now that PAI is set up, here's how to get the most out of it:++### 1. **Learn about Skills** (5 minutes)+Skills are the core of PAI - they're like apps for your AI.++Read: [skills-system.md](./skills-system.md)++**Quick overview:**+- `research` - Multi-source research with parallel agents+- `development` - Full-stack app building+- `fabric` - 242+ AI patterns for everything+- `blogging` - Write and publish blog posts+- And many more!++### 2. **Explore Commands** (10 minutes)+Commands are pre-built tasks you can run.++```bash+# See what's available:+ls $PAI_DIR/commands/++# Try one:+# (Ask Claude: "Show me the available commands")+```++### 3. **Customize Your Experience** (30 minutes)+Make PAI truly yours:++**Edit the PAI skill:**+```bash+open -e $PAI_DIR/skills/PAI/SKILL.md+```++Look for `[CUSTOMIZE:]` markers and update:+- Your key contacts+- Your preferences (tech stack, coding style, etc.)+- Your security settings+- Your voice preferences++**Create your first custom skill:**+```bash+# Use the create-skill skill to guide you!+# In Claude Code, just say:+"Help me create a custom skill for [your use case]"+```++### 4. **Read the Deep Dive** (Optional, 30+ minutes)+Want to really understand how PAI works?++- [architecture.md](./architecture.md) - How PAI is structured+- [skills-system.md](./skills-system.md) - Deep dive on skills+- [hook-system.md](./hook-system.md) - Automation with hooks+- [agent-system.md](./agent-system.md) - How agents work++---++## 🎯 Quick Reference++**Essential Commands:**++```bash+# Check if PAI is set up correctly+echo $PAI_DIR # Should show your PAI path++# Go to PAI directory+cd $PAI_DIR # Quick way to navigate to PAI++# Update PAI to latest version+cd $PAI_DIR && git pull # Get latest features and fixes++# Start voice server (optional)+cd $PAI_DIR/voice-server && bun server.ts &++# Reload shell configuration+source ~/.zshrc # Apply any changes you made++# View available skills+ls $PAI_DIR/skills/ # See what PAI can do++# View available commands+ls $PAI_DIR/commands/ # See pre-built tasks+```++**File Locations:**++| What | Where |+|------|-------|+| PAI main directory | `$PAI_DIR` (usually `~/PAI`) |+| Your settings | `$PAI_DIR/.env` |+| Skills | `$PAI_DIR/skills/` |+| Commands | `$PAI_DIR/commands/` |+| Documentation | `$PAI_DIR/documentation/` |+| Voice server | `$PAI_DIR/voice-server/` |+| Logs | `~/Library/Logs/` |++**Important Environment Variables:**++| Variable | What it does | Example |+|----------|--------------|---------|+| `PAI_DIR` | Where PAI is installed | `/Users/daniel/PAI` |+| `PAI_HOME` | Your home directory | `/Users/daniel` |+| `DA` | Your AI's name | `Kai` |+| `DA_COLOR` | Display color | `purple` |++---++## 💬 Final Thoughts++**You did it!** You now have a personal AI infrastructure that grows with you.++This is just the beginning. PAI is designed to adapt to YOUR life, YOUR projects, and YOUR goals. As you use it, you'll discover new ways to customize it, automate your workflows, and make your AI assistant truly personal.++**Remember:**+- ✅ Start simple - you don't need to use everything at once+- ✅ Customize as you go - add things when you need them+- ✅ Don't be afraid to experiment - you can't break anything permanently+- ✅ The community is here to help - ask questions if you get stuck++**Welcome to the PAI community!** 🎉++You're now part of the journey toward Human 3.0 - humans augmented with AI to amplify their capabilities.++---++## 📚 Additional Resources++- **Official PAI Blog Post:** [Read the deep-dive on danielmiessler.com](https://danielmiessler.com/blog/personal-ai-infrastructure)+- **GitHub Repository:** [Star the repo to stay updated](https://github.com/danielmiessler/Personal_AI_Infrastructure)+- **Human 3.0 Vision:** [How PAI fits into the bigger picture](https://danielmiessler.com/blog/how-my-projects-fit-together)+- **Claude Code Docs:** [Learn more about Claude Code](https://claude.ai/code)+- **Video Walkthrough:** [Watch the PAI overview video](https://youtu.be/iKwRWwabkEc)++---++**Questions? Issues? Ideas?**++- 🐛 [Report bugs](https://github.com/danielmiessler/Personal_AI_Infrastructure/issues)+- 💬 [Join discussions](https://github.com/danielmiessler/Personal_AI_Infrastructure/discussions)+- ⭐ [Star the repo](https://github.com/danielmiessler/Personal_AI_Infrastructure) to support the project!++---++*Built with ❤️ by [Daniel Miessler](https://danielmiessler.com) and the PAI community*++*Last updated: October 2025*diff --git a/setup.sh b/setup.shnew file mode 100755index 00000000..c1fa4a70--- /dev/null+++ b/setup.sh@@ -0,0 +1,728 @@+#!/bin/bash++# ============================================+# PAI (Personal AI Infrastructure) Setup Script+# ============================================+#+# This script automates the entire PAI setup process.+# It's designed to be friendly, informative, and safe.+#+# Usage:+# curl -fsSL https://raw.githubusercontent.com/danielmiessler/Personal_AI_Infrastructure/main/setup.sh | bash+#+# Or download and run manually:+# ./setup.sh+#+# ============================================++set -e # Exit on error++# Colors for output+RED='\033[0;31m'+GREEN='\033[0;32m'+YELLOW='\033[1;33m'+BLUE='\033[0;34m'+PURPLE='\033[0;35m'+CYAN='\033[0;36m'+NC='\033[0m' # No Color++# Emoji support+CHECK="✅"+CROSS="❌"+WARN="⚠️"+INFO="ℹ️"+ROCKET="🚀"+PARTY="🎉"+THINKING="🤔"+WRENCH="🔧"++# ============================================+# Helper Functions+# ============================================++print_header() {+ echo ""+ echo -e "${PURPLE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"+ echo -e "${PURPLE} $1${NC}"+ echo -e "${PURPLE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"+ echo ""+}++print_success() {+ echo -e "${GREEN}${CHECK} $1${NC}"+}++print_error() {+ echo -e "${RED}${CROSS} $1${NC}"+}++print_warning() {+ echo -e "${YELLOW}${WARN} $1${NC}"+}++print_info() {+ echo -e "${CYAN}${INFO} $1${NC}"+}++print_step() {+ echo -e "${BLUE}${WRENCH} $1${NC}"+}++ask_yes_no() {+ local question="$1"+ local default="${2:-y}"++ if [ "$default" = "y" ]; then+ local prompt="[Y/n]"+ else+ local prompt="[y/N]"+ fi++ while true; do+ echo -n -e "${CYAN}${THINKING} $question $prompt: ${NC}"+ read -r response+ response=${response:-$default}+ case "$response" in+ [Yy]* ) return 0;;+ [Nn]* ) return 1;;+ * ) echo "Please answer yes or no.";;+ esac+ done+}++ask_input() {+ local question="$1"+ local default="$2"+ local response++ if [ -n "$default" ]; then+ echo -n -e "${CYAN}${THINKING} $question [$default]: ${NC}"+ else+ echo -n -e "${CYAN}${THINKING} $question: ${NC}"+ fi++ read -r response+ echo "${response:-$default}"+}++command_exists() {+ command -v "$1" >/dev/null 2>&1+}++# ============================================+# Welcome Message+# ============================================++clear+echo -e "${PURPLE}"+cat << "EOF"+╔═══════════════════════════════════════════════════════╗+║ ║+║ PAI - Personal AI Infrastructure Setup ║+║ ║+║ Welcome! Let's get you set up in a few minutes. ║+║ ║+╚═══════════════════════════════════════════════════════╝+EOF+echo -e "${NC}"++echo ""+echo "This script will:"+echo " • Check your system for prerequisites"+echo " • Install any missing software (with your permission)"+echo " • Download or update PAI"+echo " • Configure your environment"+echo " • Test everything to make sure it works"+echo ""+echo "The whole process takes about 5 minutes."+echo ""++if ! ask_yes_no "Ready to get started?"; then+ echo ""+ echo "No problem! When you're ready, just run this script again."+ echo ""+ exit 0+fi++# ============================================+# Step 1: Check Prerequisites+# ============================================++print_header "Step 1: Checking Prerequisites"++print_step "Checking for macOS..."+if [[ "$OSTYPE" == "darwin"* ]]; then+ macos_version=$(sw_vers -productVersion)+ print_success "Running macOS $macos_version"+else+ print_warning "This script is designed for macOS. You're running: $OSTYPE"+ if ! ask_yes_no "Continue anyway? (Some features may not work)"; then+ exit 1+ fi+fi++print_step "Checking for Git..."+if command_exists git; then+ git_version=$(git --version | awk '{print $3}')+ print_success "Git $git_version is installed"+ HAS_GIT=true+else+ print_warning "Git is not installed"+ HAS_GIT=false+fi++print_step "Checking for Homebrew..."+if command_exists brew; then+ brew_version=$(brew --version | head -n1 | awk '{print $2}')+ print_success "Homebrew $brew_version is installed"+ HAS_BREW=true+else+ print_warning "Homebrew is not installed"+ HAS_BREW=false+fi++print_step "Checking for Bun..."+if command_exists bun; then+ bun_version=$(bun --version)+ print_success "Bun $bun_version is installed"+ HAS_BUN=true+else+ print_warning "Bun is not installed"+ HAS_BUN=false+fi++# ============================================+# Step 2: Install Missing Software+# ============================================++NEEDS_INSTALL=false++if [ "$HAS_GIT" = false ] || [ "$HAS_BREW" = false ] || [ "$HAS_BUN" = false ]; then+ NEEDS_INSTALL=true+fi++if [ "$NEEDS_INSTALL" = true ]; then+ print_header "Step 2: Installing Missing Software"++ # Install Homebrew if needed+ if [ "$HAS_BREW" = false ]; then+ echo ""+ print_warning "Homebrew is not installed. Homebrew is a package manager for macOS."+ print_info "We need it to install other tools like Bun."+ echo ""++ if ask_yes_no "Install Homebrew?"; then+ print_step "Installing Homebrew..."+ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"++ # Add Homebrew to PATH for this session+ if [ -f "/opt/homebrew/bin/brew" ]; then+ eval "$(/opt/homebrew/bin/brew shellenv)"+ fi++ print_success "Homebrew installed successfully!"+ HAS_BREW=true+ else+ print_error "Homebrew is required to continue. Exiting."+ exit 1+ fi+ fi++ # Install Git if needed+ if [ "$HAS_GIT" = false ]; then+ echo ""+ print_warning "Git is not installed. Git is needed to download PAI."+ echo ""++ if ask_yes_no "Install Git?"; then+ print_step "Installing Git..."+ if [ "$HAS_BREW" = true ]; then+ brew install git+ else+ xcode-select --install+ fi+ print_success "Git installed successfully!"+ HAS_GIT=true+ else+ print_error "Git is required to continue. Exiting."+ exit 1+ fi+ fi++ # Install Bun if needed+ if [ "$HAS_BUN" = false ]; then+ echo ""+ print_warning "Bun is not installed. Bun is a fast JavaScript runtime."+ print_info "It's needed for PAI's voice server and other features."+ echo ""++ if ask_yes_no "Install Bun?"; then+ print_step "Installing Bun..."+ brew install oven-sh/bun/bun+ print_success "Bun installed successfully!"+ HAS_BUN=true+ else+ print_warning "Bun is optional, but recommended. Continuing without it."+ fi+ fi+else+ print_success "All prerequisites are already installed!"+fi++# ============================================+# Step 3: Choose Installation Directory+# ============================================++print_header "Step 3: Choose Installation Location"++echo "Where would you like to install PAI?"+echo ""+echo "Common locations:"+echo " 1) $HOME/PAI (recommended)"+echo " 2) $HOME/Projects/PAI"+echo " 3) $HOME/Documents/PAI"+echo " 4) Custom location"+echo ""++DEFAULT_DIR="$HOME/PAI"+choice=$(ask_input "Enter your choice (1-4)" "1")++case $choice in+ 1)+ PAI_DIR="$HOME/PAI"+ ;;+ 2)+ PAI_DIR="$HOME/Projects/PAI"+ ;;+ 3)+ PAI_DIR="$HOME/Documents/PAI"+ ;;+ 4)+ PAI_DIR=$(ask_input "Enter custom path" "$HOME/PAI")+ ;;+ *)+ PAI_DIR="$DEFAULT_DIR"+ ;;+esac++print_info "PAI will be installed to: $PAI_DIR"++# ============================================+# Step 4: Download or Update PAI+# ============================================++print_header "Step 4: Getting PAI"++if [ -d "$PAI_DIR/.git" ]; then+ print_info "PAI is already installed at $PAI_DIR"++ if ask_yes_no "Update to the latest version?"; then+ print_step "Updating PAI..."+ cd "$PAI_DIR"+ git pull+ print_success "PAI updated successfully!"+ else+ print_info "Using existing installation"+ fi+else+ print_step "Downloading PAI from GitHub..."++ # Create parent directory if it doesn't exist+ mkdir -p "$(dirname "$PAI_DIR")"++ # Clone the repository+ git clone https://github.com/danielmiessler/Personal_AI_Infrastructure.git "$PAI_DIR"++ print_success "PAI downloaded successfully!"+fi++# ============================================+# Step 5: Configure Environment Variables+# ============================================++print_header "Step 5: Configuring Environment"++# Detect shell+if [ -n "$ZSH_VERSION" ]; then+ SHELL_CONFIG="$HOME/.zshrc"+ SHELL_NAME="zsh"+elif [ -n "$BASH_VERSION" ]; then+ SHELL_CONFIG="$HOME/.bashrc"+ SHELL_NAME="bash"+else+ print_warning "Couldn't detect shell type. Defaulting to .zshrc"+ SHELL_CONFIG="$HOME/.zshrc"+ SHELL_NAME="zsh"+fi++print_info "Detected shell: $SHELL_NAME"+print_info "Configuration file: $SHELL_CONFIG"++# Check if PAI environment variables are already configured+if grep -q "PAI_DIR" "$SHELL_CONFIG" 2>/dev/null; then+ print_info "PAI environment variables already exist in $SHELL_CONFIG"++ if ask_yes_no "Update them?"; then+ # Remove old PAI configuration+ sed -i.bak '/# ========== PAI Configuration ==========/,/# =========================================/d' "$SHELL_CONFIG"+ SHOULD_ADD_CONFIG=true+ else+ SHOULD_ADD_CONFIG=false+ fi+else+ SHOULD_ADD_CONFIG=true+fi++if [ "$SHOULD_ADD_CONFIG" = true ]; then+ print_step "Adding PAI environment variables to $SHELL_CONFIG..."++ # Ask for AI assistant name+ AI_NAME=$(ask_input "What would you like to call your AI assistant?" "Kai")++ # Ask for color+ echo ""+ echo "Choose a display color:"+ echo " 1) purple (default)"+ echo " 2) blue"+ echo " 3) green"+ echo " 4) cyan"+ echo " 5) red"+ echo ""+ color_choice=$(ask_input "Enter your choice (1-5)" "1")++ case $color_choice in+ 1) AI_COLOR="purple" ;;+ 2) AI_COLOR="blue" ;;+ 3) AI_COLOR="green" ;;+ 4) AI_COLOR="cyan" ;;+ 5) AI_COLOR="red" ;;+ *) AI_COLOR="purple" ;;+ esac++ # Add configuration to shell config+ cat >> "$SHELL_CONFIG" << EOF++# ========== PAI Configuration ==========+# Personal AI Infrastructure+# Added by PAI setup script on $(date)++# Where PAI is installed+export PAI_DIR="$PAI_DIR"++# Your home directory+export PAI_HOME="\$HOME"++# Your AI assistant's name+export DA="$AI_NAME"++# Display color+export DA_COLOR="$AI_COLOR"++# =========================================++EOF++ print_success "Environment variables added to $SHELL_CONFIG"+else+ print_info "Keeping existing environment variables"+fi++# Source the configuration for this session+export PAI_DIR="$PAI_DIR"+export PAI_HOME="$HOME"++# ============================================+# Step 6: Create .env File+# ============================================++print_header "Step 6: Configuring API Keys"++if [ -f "$PAI_DIR/.env" ]; then+ print_info ".env file already exists"++ if ! ask_yes_no "Keep existing .env file?"; then+ rm "$PAI_DIR/.env"+ SHOULD_CREATE_ENV=true+ else+ SHOULD_CREATE_ENV=false+ fi+else+ SHOULD_CREATE_ENV=true+fi++if [ "$SHOULD_CREATE_ENV" = true ]; then+ print_step "Creating .env file from template..."++ if [ -f "$PAI_DIR/.env.example" ]; then+ cp "$PAI_DIR/.env.example" "$PAI_DIR/.env"++ # Update PAI_DIR in .env+ if [[ "$OSTYPE" == "darwin"* ]]; then+ sed -i '' "s|PAI_DIR=\"/path/to/PAI\"|PAI_DIR=\"$PAI_DIR\"|g" "$PAI_DIR/.env"+ else+ sed -i "s|PAI_DIR=\"/path/to/PAI\"|PAI_DIR=\"$PAI_DIR\"|g" "$PAI_DIR/.env"+ fi++ print_success ".env file created"+ print_info "You can add API keys later by editing: $PAI_DIR/.env"+ else+ print_warning ".env.example not found. Skipping .env creation."+ fi+fi++echo ""+print_info "PAI works without API keys, but some features require them:"+echo " • PERPLEXITY_API_KEY - For advanced web research"+echo " • GOOGLE_API_KEY - For Gemini AI integration"+echo " • REPLICATE_API_TOKEN - For AI image/video generation"+echo ""++if ask_yes_no "Would you like to add API keys now?" "n"; then+ echo ""+ print_info "Opening .env file in your default editor..."+ sleep 1+ open -e "$PAI_DIR/.env" 2>/dev/null || nano "$PAI_DIR/.env"+ echo ""+ print_info "When you're done editing, save and close the file."+ read -p "Press Enter when you're ready to continue..."+else+ print_info "You can add API keys later by editing: $PAI_DIR/.env"+fi++# ============================================+# Step 7: Voice Server Setup (Optional)+# ============================================++print_header "Step 7: Voice Server (Optional)"++echo "PAI includes a voice server that can speak notifications to you."+echo "It uses macOS's built-in Premium voices (free, high-quality, offline)."+echo ""++if ask_yes_no "Would you like to set up the voice server?" "n"; then+ print_step "Setting up voice server..."++ # Check if voice server directory exists+ if [ -d "$PAI_DIR/voice-server" ]; then+ cd "$PAI_DIR/voice-server"++ # Install dependencies+ print_step "Installing voice server dependencies..."+ bun install++ print_success "Voice server configured!"+ print_info "To start the voice server, run:"+ echo " cd $PAI_DIR/voice-server && bun server.ts &"+ echo ""++ if ask_yes_no "Start the voice server now?"; then+ bun server.ts &+ sleep 2++ # Test the voice server+ if curl -s http://localhost:8888/health >/dev/null 2>&1; then+ print_success "Voice server is running!"++ if ask_yes_no "Test the voice server?"; then+ curl -X POST http://localhost:8888/notify \+ -H "Content-Type: application/json" \+ -d '{"message": "Hello! Your voice server is working perfectly!"}' \+ 2>/dev/null++ sleep 2+ print_success "You should have heard a message!"+ fi+ else+ print_warning "Voice server may not have started correctly."+ print_info "Check the logs for details."+ fi+ fi+ else+ print_warning "Voice server directory not found. Skipping."+ fi+else+ print_info "Skipping voice server setup. You can set it up later."+fi++# ============================================+# Step 8: Claude Code Integration+# ============================================++print_header "Step 8: AI Assistant Integration"++echo "PAI works with various AI assistants (Claude Code, GPT, Gemini, etc.)"+echo ""++if ask_yes_no "Are you using Claude Code?"; then+ print_step "Configuring Claude Code integration..."++ # Create Claude directory if it doesn't exist+ mkdir -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!"+ fi+ else+ ln -sf "$PAI_DIR/settings.json" "$HOME/.claude/settings.json"+ print_success "Claude Code configured to use PAI!"+ fi++ echo ""+ print_info "Next steps for Claude Code:"+ echo " 1. Download Claude Code from: https://claude.ai/code"+ echo " 2. Sign in with your Anthropic account"+ echo " 3. Restart Claude Code if it's already running"+ echo ""+else+ print_info "For other AI assistants, refer to the documentation:"+ echo " $PAI_DIR/documentation/how-to-start.md"+fi++# ============================================+# Step 9: Test Installation+# ============================================++print_header "Step 9: Testing Installation"++print_step "Running system checks..."++# Test 1: PAI_DIR exists+if [ -d "$PAI_DIR" ]; then+ print_success "PAI directory exists: $PAI_DIR"+else+ print_error "PAI directory not found: $PAI_DIR"+fi++# Test 2: Skills directory exists+if [ -d "$PAI_DIR/skills" ]; then+ skill_count=$(find "$PAI_DIR/skills" -maxdepth 1 -type d | wc -l | tr -d ' ')+ print_success "Found $skill_count skills"+else+ print_warning "Skills directory not found"+fi++# Test 3: Commands directory exists+if [ -d "$PAI_DIR/commands" ]; then+ command_count=$(find "$PAI_DIR/commands" -type f -name "*.md" | wc -l | tr -d ' ')+ print_success "Found $command_count commands"+else+ print_warning "Commands directory not found"+fi++# Test 4: Environment variables+if [ -n "$PAI_DIR" ]; then+ print_success "PAI_DIR environment variable is set"+else+ print_warning "PAI_DIR environment variable not set in this session"+ print_info "It will be available after you restart your terminal"+fi++# Test 5: .env file+if [ -f "$PAI_DIR/.env" ]; then+ print_success ".env file exists"+else+ print_warning ".env file not found"+fi++# Test 6: Claude Code integration+if [ -L "$HOME/.claude/settings.json" ]; then+ print_success "Claude Code integration configured"+elif [ -f "$HOME/.claude/settings.json" ]; then+ print_info "Claude Code settings exist (not linked to PAI)"+else+ print_info "Claude Code settings not configured"+fi++# ============================================+# Final Success Message+# ============================================++print_header "${PARTY} Installation Complete! ${PARTY}"++echo -e "${GREEN}"+cat << "EOF"+┌─────────────────────────────────────────────────────┐+│ │+│ 🎉 Congratulations! PAI is ready to use! 🎉 │+│ │+└─────────────────────────────────────────────────────┘+EOF+echo -e "${NC}"++echo ""+echo "Here's what was set up:"+echo " ✅ PAI installed to: $PAI_DIR"+echo " ✅ Environment variables configured"+echo " ✅ Skills and commands ready to use"+if [ -f "$PAI_DIR/.env" ]; then+ echo " ✅ Environment file created"+fi+if [ -L "$HOME/.claude/settings.json" ]; then+ echo " ✅ Claude Code integration configured"+fi+echo ""++print_header "Next Steps"++echo "1. ${CYAN}Restart your terminal${NC} (or run: source $SHELL_CONFIG)"+echo ""+echo "2. ${CYAN}Open Claude Code${NC} and try these commands:"+echo " • 'Hey, tell me about yourself'"+echo " • 'Research the latest AI developments'"+echo " • 'What skills do you have?'"+echo ""+echo "3. ${CYAN}Customize PAI for you:${NC}"+echo " • Edit: $PAI_DIR/skills/PAI/SKILL.md"+echo " • Add API keys: $PAI_DIR/.env"+echo " • Read the docs: $PAI_DIR/documentation/how-to-start.md"+echo ""++print_header "Quick Reference"++echo "Essential commands to remember:"+echo ""+echo " ${CYAN}cd \$PAI_DIR${NC} # Go to PAI directory"+echo " ${CYAN}cd \$PAI_DIR && git pull${NC} # Update PAI to latest version"+echo " ${CYAN}open -e \$PAI_DIR/.env${NC} # Edit API keys"+echo " ${CYAN}ls \$PAI_DIR/skills${NC} # See available skills"+echo " ${CYAN}source ~/.zshrc${NC} # Reload environment"+echo ""++print_header "Resources"++echo " 📖 Documentation: $PAI_DIR/documentation/"+echo " 🌐 GitHub: https://github.com/danielmiessler/Personal_AI_Infrastructure"+echo " 📝 Blog: https://danielmiessler.com/blog/personal-ai-infrastructure"+echo " 🎬 Video: https://youtu.be/iKwRWwabkEc"+echo ""++print_header "Support"++echo " 🐛 Report issues: https://github.com/danielmiessler/Personal_AI_Infrastructure/issues"+echo " 💬 Discussions: https://github.com/danielmiessler/Personal_AI_Infrastructure/discussions"+echo " ⭐ Star the repo to support the project!"+echo ""++echo -e "${PURPLE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"+echo -e "${GREEN}${ROCKET} Welcome to PAI! You're now ready to augment your life with AI. ${ROCKET}${NC}"+echo -e "${PURPLE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"+echo ""++# Optional: Open documentation+if ask_yes_no "Would you like to open the getting started guide?" "y"; then+ open "$PAI_DIR/documentation/how-to-start.md" 2>/dev/null || cat "$PAI_DIR/documentation/how-to-start.md"+fi++echo ""+print_success "Setup complete! Enjoy using PAI! 🎉"+echo ""