⛰️ LifeOS — The AI-powered Life Operating System that helps you hill climb to wherever you're going.
docs: Improve installation clarity and add bash shell support
Daniel Miesslerd34a134fed05
diff --git a/Bundles/Official/README.md b/Bundles/Official/README.mdindex 4dfa092a..daada10e 100644--- a/Bundles/Official/README.md+++ b/Bundles/Official/README.md@@ -4,7 +4,12 @@# The Official PAI Bundle v2.3.0-> **FOR AI AGENTS:** You are about to install the complete PAI bundle. Run the wizard, then install each pack in order.+> [!WARNING]+> **This wizard creates a SKELETON directory structure only.** After running the wizard, you must manually install each pack in order (pai-hook-system → pai-core-install → etc.) to have a working system.+>+> **Want a complete working system immediately?** Use the [Full Release Install](../../Releases/v2.3/) instead — it includes all packs pre-configured.++> **FOR AI AGENTS:** You are about to install the PAI bundle skeleton. Run the wizard, then install each pack in order. The wizard alone does NOT create a working system.**Origin:** This bundle is extracted from Daniel Miessler's production Kai system - a battle-tested Personal AI Infrastructure that has been refined through daily use since 2024.@@ -112,7 +117,10 @@ Update mode will:## What This Bundle Provides-When fully installed, the PAI bundle gives you:+> [!IMPORTANT]+> The features below are only available **after you install the required packs**. The wizard alone only creates the directory structure and configuration files.++When fully installed (wizard + all required packs), the PAI bundle gives you:- A custom **History system** - Automatically captures sessions, decisions, learnings, and research- A custom set of **Hooks** - Event-driven automation that triggers on session start, tool use, and task completion@@ -125,6 +133,9 @@ When fully installed, the PAI bundle gives you:## Installation Order (CRITICAL)+> [!CAUTION]+> **The wizard does NOT install these packs for you.** You must install them manually using your AI assistant after the wizard completes. Without these packs, you have an empty skeleton — not a working PAI system.+**After running the wizard, install these packs IN ORDER:**### Required Packsdiff --git a/INSTALL.md b/INSTALL.mdindex fc789217..82666fb7 100644--- a/INSTALL.md+++ b/INSTALL.md@@ -78,25 +78,33 @@ This helps you calibrate how much explanation to provide.#### Phase 3: Choosing What to Install-Explain the concepts of Bundles and Packs:--**What are Packs?**-> Packs are self-contained capability modules. Each pack adds a specific feature:-> - **Hook System** — Event-driven automation-> - **History System** — Automatic context tracking-> - **Voice System** — Spoken notifications-> - **Browser Skill** — Web automation and testing-> - And more...+PAI offers three installation paths. Explain each and help them choose:++**Option A: Full Release Install (Recommended)**+> The fastest path to a working system. You get a complete, pre-configured `.claude/` directory with all infrastructure packs already installed.+>+> Best for: First-time users, fresh setups, or when you want PAI working immediately.+>+> [See Releases/v2.3/README.md](Releases/v2.3/README.md)++**Option B: Bundle + Manual Packs**+> The Bundle wizard creates a skeleton directory structure. You then install each pack manually in order. This gives you understanding of how the system is built.+>+> Best for: Users who want to learn the system as they build it, or need customization.>-> You can install packs individually, picking exactly what you need.+> [See Bundles/Official/README.md](Bundles/Official/README.md)-**What are Bundles?**-> Bundles are curated collections of packs that work well together. Instead of choosing packs one-by-one, a bundle gives you a complete, tested experience.+**Option C: Individual Packs**+> Install only specific capabilities you need. Maximum flexibility, minimum overhead.+>+> Best for: Experienced users adding specific features to existing setups.+>+> [See Packs/README.md](Packs/README.md)**Ask: How would you like to proceed?**-- **Install the PAI Bundle** (Recommended) — The complete PAI experience with all core capabilities-- **Browse individual packs** — Choose specific capabilities you want-- **Minimal install** — Just the basics to get started+- **Full Release Install** (Recommended) — Complete working system in 5 minutes+- **Bundle + Manual Packs** — Build understanding as you install each pack+- **Individual Packs** — Cherry-pick specific capabilities---@@ -175,23 +183,47 @@ If you prefer to install PAI yourself without AI assistance:- An AI coding assistant (Claude Code, Cursor, etc.)- Git-### Quick Start+### Quick Start: Full Release Install (Recommended)++```bash+# Clone the repository+git clone https://github.com/danielmiessler/PAI.git+cd PAI/Releases/v2.3++# Back up your existing Claude Code configuration (if any)+[ -d ~/.claude ] && mv ~/.claude ~/.claude-backup-$(date +%Y%m%d)++# Copy the complete PAI installation+cp -r .claude ~/++# Run the configuration wizard+cd ~/.claude && bun run install.ts --setup+```++The wizard will ask for your name, DA name, timezone, and voice preferences. After completion, restart Claude Code to activate hooks.++**Shell support:** Works with both bash and zsh. The wizard auto-detects your shell and writes to the appropriate config file.++### Alternative: Bundle + Manual Packs++If you prefer to build understanding as you install:```bash# Clone the repositorygit clone https://github.com/danielmiessler/PAI.git-cd PAI+cd PAI/Bundles/Official-# Run the PAI Bundle installer-cd Bundles/Official+# Run the Bundle wizard (creates skeleton only)bun run install.ts++# Then install each pack manually IN ORDER:+# 1. pai-hook-system+# 2. pai-core-install+# 3. pai-statusline+# 4. pai-voice-system (optional)```-The installer will:-- Ask for your preferences (AI name, install location, timezone)-- Create the directory structure-- Configure environment variables-- Guide you through installing each pack+> **Warning:** The Bundle wizard alone does NOT create a working system. You must install the required packs afterward.### Installing Individual Packsdiff --git a/README.md b/README.mdindex 6cb26ec6..a80b3eca 100644--- a/README.md+++ b/README.md@@ -24,7 +24,7 @@-+<!-- Content -->@@ -332,34 +332,93 @@ Rich tab titles and pane management. Dynamic status lines show learning signals,> [!CAUTION]> **Project in Active Development** — PAI is evolving rapidly. Expect breaking changes, restructuring, and frequent updates. We are working on stable and development branches, but currently it's all combined.-### Option 1: Complete Bundle (Recommended)+### Which Install Path Should I Use?-The fastest way to get started is with the interactive bundle wizard:+```+┌─────────────────────────────────────────────────────────────────┐+│ Do you want a complete, working PAI system right now? │+│ │+│ YES ──────────► Option 1: Full Release Install │+│ (Complete .claude/ directory, ~5 min) │+│ │+│ NO, I want to customize or learn the system │+│ │ │+│ ├──► Option 2: Bundle + Packs (Build it yourself) │+│ │ (Skeleton structure, then install packs manually) │+│ │ │+│ └──► Option 3: Individual Packs (Cherry-pick) │+│ (Install only specific capabilities you need) │+└─────────────────────────────────────────────────────────────────┘+```++---++### Option 1: Full Release Install (Recommended)++> **This is the fastest path to a working PAI system.** You get a complete, pre-configured `.claude/` directory with all infrastructure packs already installed.++```bash+# Clone the repo+git clone https://github.com/danielmiessler/PAI.git+cd PAI/Releases/v2.3++# Back up your existing Claude Code configuration (if any)+[ -d ~/.claude ] && mv ~/.claude ~/.claude-backup-$(date +%Y%m%d)++# Copy the complete PAI installation+cp -r .claude ~/++# Run the configuration wizard+cd ~/.claude && bun run install.ts --setup+```++**The wizard will:**+- Ask for your name, DA name, and timezone+- Configure environment variables (works with both bash and zsh)+- Set up voice preferences (optional)+- Verify the installation++**After installation:** Restart Claude Code to activate hooks.++[**Full Release documentation →**](Releases/v2.3/README.md)++---++### Option 2: Bundle + Manual Pack Installation++> **For users who want to understand the system** as they build it, or need a customized setup.++> [!WARNING]+> The Bundle wizard creates a **skeleton directory structure only**. You must then install each pack manually in the correct order for a working system.```bash# Clone the repogit clone https://github.com/danielmiessler/PAI.gitcd PAI/Bundles/Official-# Run the interactive wizard+# Run the interactive wizard (creates skeleton structure)bun run install.ts```-**The wizard will:**-- Ask for your preferences (AI name, install location, timezone)-- Detect any existing installations and offer to merge or replace-- Create the required directory structure-- Configure environment variables-- Guide you through installing each pack in order+**After the wizard completes, you MUST install packs in this order:**-The `PAI_DIR` environment variable determines where your installation lives (defaults to `~/.claude`). The wizard will ask and set this up for you.+| Order | Pack | Command |+|-------|------|---------|+| 1 | pai-hook-system | "Install the pack at PAI/Packs/pai-hook-system/" |+| 2 | pai-core-install | "Install the pack at PAI/Packs/pai-core-install/" |+| 3 | pai-statusline | "Install the pack at PAI/Packs/pai-statusline/" |+| 4+ | Any skill packs | Install as needed |-### Option 2: AI-Assisted Pack Installation+[**Bundle documentation →**](Bundles/Official/README.md)++---++### Option 3: Individual Pack InstallationInstall individual packs by giving them to your DA:1. **Browse packs** - Find a pack you want in [Packs/](Packs/)-2. **Give it to your DA** - Provide the entire pack markdown file+2. **Give it to your DA** - Provide the pack directory path3. **Ask your DA to install it:**```@@ -367,13 +426,9 @@ Install this pack into my system. Use PAI_DIR="~/.claude"and DA="MyAI". Set up the hooks, save the code, and verify it works.```-### Option 3: Manual Installation--Each pack includes detailed manual installation instructions. Open the pack file and follow the "Installation → Manual" section.-### Option 4: Browse and Cherry-Pick-Packs are self-contained markdown files. You can:+Packs are self-contained. You can:- Read the code directly in the pack- Copy specific functions or workflows- Adapt the approach to your own system@@ -516,7 +571,7 @@ The modular design makes recovery easy:## 🌐 Community-**GitHub Discussions:** [Join the conversation](https://github.com/danielmiessler/Personal_AI_Infrastructure/discussions)+**GitHub Discussions:** [Join the conversation](https://github.com/danielmiessler/PAI/discussions)**UL Community Discord:** PAI is discussed in the [Unsupervised Learning community](https://danielmiessler.com/upgrade) along with other AI projectsdiff --git a/Releases/README.md b/Releases/README.mdindex 273b303e..0361113b 100644--- a/Releases/README.md+++ b/Releases/README.md@@ -49,33 +49,43 @@ v2.3/PAI offers two ways to install:-### Method 1: Release Install (Complete Installation)+### Method 1: Release Install (Complete Installation) ⭐ RECOMMENDED**Best for:** First-time users, fresh setups, or when you want the full PAI experience immediately.-**What happens:**-1. Back up your current `.claude` directory to `.claude-bak` or something similar.-2. Copy the entire `.claude` directory to your home folder-2. The `.claude` directory becomes `~/.claude` (PAI's home)-3. cd into the directory and run `bun run install.ts --setup`.-5. Follow the wizard.-6. Restart Claude Code to activate+> [!TIP]+> This is the **fastest path to a working PAI system**. You get a complete, pre-configured `.claude/` directory.++**Step-by-step:**-**How to do it:**```bash-# From the release directory+# 1. Clone the repo (if you haven't already)+git clone https://github.com/danielmiessler/PAI.git+cd PAI/Releases/v2.3++# 2. Back up your existing Claude Code configuration (if any)+[ -d ~/.claude ] && mv ~/.claude ~/.claude-backup-$(date +%Y%m%d)++# 3. Copy the complete PAI installation to your home directorycp -r .claude ~/-# Run configuration (optional - sets your name, DA name, timezone)-cd ~/.claude-./configure.sh+# 4. Run the configuration wizard+cd ~/.claude && bun run install.ts --setup++# 5. Restart Claude Code to activate hooks```-**Result:** Complete PAI installation with all skills, hooks, memory system, and default configuration.+**The wizard will ask for:**+- Your name (for personalization)+- Your DA's name (default: Kai)+- Your timezone (for date/time awareness)+- Voice preferences (optional, requires ElevenLabs API key)-After this point, you will want to go and collect your context from your existing AI system or systems and use your new PAI system to intelligently place that content into where it belongs inside of the PAI system, such as under the work directory, the user directory, or in the skills directory, etc.+**Shell support:** The wizard works with both **zsh** and **bash**. It auto-detects your shell and writes environment variables to the correct config file (`.zshrc` or `.bashrc`).++**Result:** Complete PAI installation with all skills, hooks, memory system, and default configuration.-We recommend you use AI to do this, after it thoroughly inspects your it's new PAI environment, your incoming data, etc.+**After installation:** If you have existing AI context (from ChatGPT, previous Claude conversations, etc.), use your new PAI system to help organize that content into the appropriate directories (MEMORY/, USER/, skills/).---diff --git a/Releases/v2.3/.claude/install.ts b/Releases/v2.3/.claude/install.tsindex 3e13841f..b99361a8 100755--- a/Releases/v2.3/.claude/install.ts+++ b/Releases/v2.3/.claude/install.ts@@ -37,7 +37,11 @@ const HOME = homedir();const CLAUDE_DIR = join(HOME, '.claude');const BACKUP_DIR = join(HOME, '.claude-BACKUP');const PAI_RELEASES = join(HOME, '.claude', 'PAI_RELEASES');-const ZSHRC = join(HOME, '.zshrc');+// Shell detection for bash/zsh support+const SHELL = process.env.SHELL || '/bin/zsh';+const IS_ZSH = SHELL.includes('zsh');+const SHELL_RC = join(HOME, IS_ZSH ? '.zshrc' : '.bashrc');+const SHELL_NAME = IS_ZSH ? 'zsh' : 'bash';const VOICE_SERVER_DIR = join(CLAUDE_DIR, 'VoiceServer');const VOICE_SERVER_PORT = 8888;const KITTY_CONFIG_DIR = join(HOME, '.config', 'kitty');@@ -325,38 +329,39 @@ async function verifyPort8888(): Promise<{ listening: boolean; canConnect: boole// ZSH ALIAS SETUP// ============================================================================-function setupZshAlias(): void {+function setupShellAlias(): void {const aliasLine = `alias pai='bun run ${CLAUDE_DIR}/skills/CORE/Tools/PAI.ts'`;const marker = '# PAI alias';+ const rcFileName = IS_ZSH ? '.zshrc' : '.bashrc';try {- let zshrcContent = '';- if (existsSync(ZSHRC)) {- zshrcContent = readFileSync(ZSHRC, 'utf-8');+ let shellRcContent = '';+ if (existsSync(SHELL_RC)) {+ shellRcContent = readFileSync(SHELL_RC, 'utf-8');}// Check if alias already exists- if (zshrcContent.includes('alias pai=')) {+ if (shellRcContent.includes('alias pai=')) {// Update existing alias- const lines = zshrcContent.split('\n');+ const lines = shellRcContent.split('\n');const updated = lines.map(line => {if (line.includes('alias pai=')) {return `${marker}\n${aliasLine}`;}return line;});- writeFileSync(ZSHRC, updated.join('\n'));- printSuccess('Updated PAI alias in .zshrc');+ writeFileSync(SHELL_RC, updated.join('\n'));+ printSuccess(`Updated PAI alias in ${rcFileName}`);} else {// Add new aliasconst addition = `\n${marker}\n${aliasLine}\n`;- appendFileSync(ZSHRC, addition);- printSuccess('Added PAI alias to .zshrc');+ appendFileSync(SHELL_RC, addition);+ printSuccess(`Added PAI alias to ${rcFileName}`);}- printInfo('Run "source ~/.zshrc" or restart terminal to use "pai" command');+ printInfo(`Run "source ~/${rcFileName}" or restart terminal to use "pai" command`);} catch (err: any) {- printWarning(`Could not update .zshrc: ${err.message}`);+ printWarning(`Could not update ${rcFileName}: ${err.message}`);printInfo(`Add manually: ${aliasLine}`);}}@@ -1443,7 +1448,7 @@ async function main(): Promise<void> {// Step 6: Setup ZSH alias and terminal// ================================================================printStep(6, 8, 'Setting up PAI command');- setupZshAlias();+ setupShellAlias();// ================================================================// Step 7: Kitty terminal setup (optional)@@ -1467,7 +1472,8 @@ async function main(): Promise<void> {print(`${c.blue}${c.bold}┃${c.reset} ${c.green}${c.bold}PAI v2.3 installed successfully!${c.reset} ${c.blue}${c.bold}┃${c.reset}`);print(`${c.blue}${c.bold}┃${c.reset} ${c.blue}${c.bold}┃${c.reset}`);print(`${c.blue}${c.bold}┃${c.reset} ${c.cyan}Next steps:${c.reset} ${c.blue}${c.bold}┃${c.reset}`);- print(`${c.blue}${c.bold}┃${c.reset} 1. Run ${c.green}source ~/.zshrc${c.reset} to enable 'pai' command ${c.blue}${c.bold}┃${c.reset}`);+ const rcFile = IS_ZSH ? '.zshrc' : '.bashrc';+ print(`${c.blue}${c.bold}┃${c.reset} 1. Run ${c.green}source ~/${rcFile}${c.reset} to enable 'pai' command ${c.blue}${c.bold}┃${c.reset}`);print(`${c.blue}${c.bold}┃${c.reset} 2. Run ${c.green}pai${c.reset} or ${c.green}claude${c.reset} in any directory to start ${c.blue}${c.bold}┃${c.reset}`);print(`${c.blue}${c.bold}┃${c.reset} ${c.blue}${c.bold}┃${c.reset}`);print(`${c.blue}${c.bold}┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛${c.reset}`);diff --git a/Releases/v2.3/README.md b/Releases/v2.3/README.mdindex 3c39d21d..3ebe747c 100644--- a/Releases/v2.3/README.md+++ b/Releases/v2.3/README.md@@ -266,19 +266,30 @@ v2.3 brings back **complete, functional releases**. Copy the `.claude/` director### Quick Start```bash-# 1. Backup existing installation-mv ~/.claude ~/.claude-backup+# 1. Clone the repo (if you haven't already)+git clone https://github.com/danielmiessler/PAI.git+cd PAI/Releases/v2.3-# 2. Copy the release+# 2. Backup existing installation (if any)+[ -d ~/.claude ] && mv ~/.claude ~/.claude-backup-$(date +%Y%m%d)++# 3. Copy the complete releasecp -r .claude ~/-# 3. Run setup wizard-cd ~/.claude && bun run install.ts+# 4. Run the configuration wizard+cd ~/.claude && bun run install.ts --setup-# 4. Start PAI-claude+# 5. Restart Claude Code to activate hooks```+**The wizard will ask for:**+- Your name (for personalization)+- Your DA's name (default: Kai)+- Your timezone (for date/time awareness)+- Voice preferences (optional)++**Shell support:** Works with both **bash** and **zsh**. The wizard auto-detects your shell.+---## 20 Skills, 11 Agents