# How to Migrate from Pre-7.x PAI Installations to LifeOS: Complete Step-by-Step Guide

> Easily migrate from pre-7.x PAI to LifeOS. Rename directories, update aliases, and run the installer for a seamless transition. Get the complete step-by-step guide today.

- Repository: [Daniel Miessler 🛡️/LifeOS](https://github.com/danielmiessler/LifeOS)
- Tags: migration-guide
- Published: 2026-08-12

---

**Rename the `PAI/` directory to `LIFEOS/`, replace the `pai` shell alias with `lifeos`, and run the bootstrap installer to fully migrate from pre-7.x PAI to LifeOS.**

LifeOS is the direct continuation of the Personal AI Infrastructure (PAI) project—the only breaking change in the 7.x release is that the entire `PAI/` directory tree has been renamed to `LIFEOS/` and the launch alias `pai` has been superseded by `lifeos`. This migration guide walks you through the technical steps required to upgrade your installation while preserving your data and avoiding un-constituted Claude sessions.

## What Changes in the PAI to LifeOS Migration

The migration consists of three tightly-coupled architectural adjustments that you must apply together:

1. **Directory rename** — all user data, hooks, and memory now live under `~/.claude/LIFEOS/`. The old `PAI/` directory is no longer created. According to [`LifeOS/install/hooks/lib/paths.ts`](https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/install/hooks/lib/paths.ts) at line 32, a compatibility shim ensures that code still referencing `PAI/` falls back to the new location (e.g., `PAI_DIR` → `LIFEOS_DIR`).

2. **Launch-alias migration** — pre-7.x installations used a shell alias called `pai` that either executed `cd ~/.claude && claude` or ran `bun ~/.claude/PAI/ACTIONS/pai.ts`. After the rename, launching with a bare `claude` command bypasses the constitutional system prompt ([`LIFEOS_SYSTEM_PROMPT.md`](https://github.com/danielmiessler/LifeOS/blob/main/LIFEOS_SYSTEM_PROMPT.md)) and runs **un-constituted**—without the security banner, verification layer, or mode handling. As documented in [`LifeOS/Workflows/Setup.md`](https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/Workflows/Setup.md) at line 56, you must locate and replace the stale `pai` alias in your shell rc file.

3. **Bootstrap script assistance** — the top-level [`install.sh`](https://github.com/danielmiessler/LifeOS/blob/main/install.sh) script detects old aliases during bootstrap and rewrites them automatically. If you skip the bootstrap step and manually execute `bun <configRoot>/LIFEOS/TOOLS/lifeos.ts`, you must perform the alias migration manually. The auto-detection logic appears in [`LifeOS/install/install.sh`](https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/install/install.sh) at lines 271–328.

### Why the Alias Migration Matters

Running Claude without the `lifeos` alias has serious consequences:

- The constitutional system prompt ([`LIFEOS_SYSTEM_PROMPT.md`](https://github.com/danielmiessler/LifeOS/blob/main/LIFEOS_SYSTEM_PROMPT.md)) only loads when the harness starts with the `-s …` flag that the `lifeos` alias supplies
- Without the alias, you get a raw Claude session with no LifeOS mode banner, no verification, and no built-in skills
- All downstream tools (hooks, memory-reviewer, pulse UI) expect the `LIFEOS/` namespace; leaving old `PAI/` paths dangling causes silent failures or data written to wrong locations
- A shim continues reading legacy `PAI_*` environment variables for one release cycle, after which the installer retires them automatically ([`LifeOS/install/hooks/lib/paths.ts`](https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/install/hooks/lib/paths.ts) line 84)

## Migration Checklist for PAI to LifeOS

Follow these six steps to complete your migration:

| Step | Action |
|------|--------|
| **1. Backup shell rc** | Copy `~/.bashrc`, `~/.zshrc`, or your `$SHELL` rc file to a safe location |
| **2. Detect stale alias** | Search for `alias pai=` or `alias kai=` lines referencing `/PAI/` or bare `&& claude` — the [`install.sh`](https://github.com/danielmiessler/LifeOS/blob/main/install.sh) regex at line 301 detects these patterns |
| **3. Comment out old line** | Prefix the stale alias with `#` or remove it entirely |
| **4. Add new `lifeos` alias** | Insert the LifeOS launcher alias (see exact command below) |
| **5. Reload rc** | Run `source ~/.bashrc` (or your shell's equivalent) |
| **6. Verify** | Run `lifeos` — you should see the LifeOS mode banner and constitutional prompt |

## Automatic Migration with the Bootstrap Script

The simplest path is letting the official installer handle everything. According to [`LifeOS/INSTALL.md`](https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/INSTALL.md) at line 107, the bootstrap script backs up your rc file and fixes aliases automatically:

```bash

# Run the official installer – it will back-up your rc and fix the alias for you

curl -fsSL https://raw.githubusercontent.com/danielmiessler/LifeOS/main/LifeOS/install/install.sh | bash

```

The script prints **"Found stale pre-7.x alias – migrating to lifeos…"** and updates your rc file without manual intervention.

## Manual Migration: Editing Your RC File

If you prefer manual control or bypassed the bootstrap, follow this bash example:

```bash

# 1. Back up your rc

cp ~/.bashrc ~/.bashrc.backup

# 2. Open the file in an editor

nano ~/.bashrc

```

Find and comment out the old block:

```bash

# Old pre-7.x alias (do not use)

# alias pai='cd ~/.claude && claude'   # ← commented out

```

Add the new alias from [`LifeOS/INSTALL.md`](https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/INSTALL.md) step 7:

```bash

# New LifeOS launch alias – retains your muscle memory

alias lifeos='bun $HOME/.claude/LIFEOS/TOOLS/lifeos.ts -s $HOME/.claude/LIFEOS/LIFEOS_SYSTEM_PROMPT.md'

```

Reload and test:

```bash

# 3. Reload configuration

source ~/.bashrc

# 4. Verify the migration

lifeos   # should display the LifeOS banner and system prompt

```

## Verifying the Directory Migration

Confirm your filesystem reflects the new structure:

```bash

# Old PAI directory should no longer exist

[ -d ~/.claude/PAI ] && echo "PAI dir still present!" || echo "PAI dir cleaned."

# New LIFEOS directory should contain expected sub-folders

tree ~/.claude/LIFEOS | head -n 20   # glance at USER/, MEMORY/, HOOKS/, etc.

```

## Key Files in the Migration

| File | Role |
|------|------|
| [`LifeOS/INSTALL.md`](https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/INSTALL.md) | Describes upgrade path and exact alias to add |
| [`LifeOS/Workflows/Setup.md`](https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/Workflows/Setup.md) | Documents launch-command wiring and stale `pai` alias handling |
| [`LifeOS/install/install.sh`](https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/install/install.sh) | Bootstrap script that auto-detects and rewrites old aliases (lines 271–328) |
| [`LifeOS/install/hooks/lib/paths.ts`](https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/install/hooks/lib/paths.ts) | Compatibility shim mapping legacy `PAI/` to `LIFEOS/` |
| [`LifeOS/TOOLS/lifeos.ts`](https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/TOOLS/lifeos.ts) | The launcher invoked by the `lifeos` alias |

## Summary

- **LifeOS 7.x renames `PAI/` to `LIFEOS/` and replaces the `pai` alias with `lifeos`**
- **The `lifeos` alias is mandatory**—without it, Claude runs un-constituted without security features
- **Use [`install.sh`](https://github.com/danielmiessler/LifeOS/blob/main/install.sh) for automatic migration** or manually edit your shell rc file following the exact alias pattern
- **Verify with `lifeos` command**—look for the mode banner to confirm constitutional prompt loading
- **Legacy `PAI_*` environment variables work temporarily** via shim, but migrate paths before next release

## Frequently Asked Questions

### What happens if I keep using the old `pai` alias?

Your alias likely points to `cd ~/.claude && claude` or `bun ~/.claude/PAI/ACTIONS/pai.ts`. The first launches raw Claude without LifeOS features; the second fails when `PAI/` is removed. Neither loads [`LIFEOS_SYSTEM_PROMPT.md`](https://github.com/danielmiessler/LifeOS/blob/main/LIFEOS_SYSTEM_PROMPT.md), so you lose the security banner, verification layer, and mode handling.

### Do I need to move my data from `PAI/` to `LIFEOS/` manually?

No—the installer creates `~/.claude/LIFEOS/` and a compatibility shim in [`LifeOS/install/hooks/lib/paths.ts`](https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/install/hooks/lib/paths.ts) redirects legacy `PAI/` references automatically. However, new data writes go to `LIFEOS/`, so verify your tools point to the correct namespace.

### Can I keep both aliases during transition?

Technically yes, but the `pai` alias will break or run un-constituted once `PAI/` is gone. The migration shim supports legacy `PAI_*` environment variables for one release cycle only. Replace `pai` with `lifeos` immediately to avoid silent failures.

### How do I verify the migration succeeded?

Run `lifeos` and check for three indicators: (1) the LifeOS mode banner appears at startup, (2) the constitutional prompt loads with security warnings, and (3) `tree ~/.claude/LIFEOS` shows `USER/`, `MEMORY/`, `HOOKS/`, and other expected subdirectories.