Skip to content

Instantly share code, notes, and snippets.

@vpzed
Last active February 7, 2026 14:07
Show Gist options
  • Select an option

  • Save vpzed/cf03c954811beef48519110e8bef22ec to your computer and use it in GitHub Desktop.

Select an option

Save vpzed/cf03c954811beef48519110e8bef22ec to your computer and use it in GitHub Desktop.

Setting up PAI v2.1.0 on a fresh Debian 13 virtual machine

IMPORTANT: As of January 09, 2025

This is a guide for humans. The intent is to cover pre-requisite items to smooth the PAI installation process.

Base Virtual Machine

Debian 13 virtual machine

  • Built with standard debian-13.*.*-amd64-netinst.iso
  • No desktop environment
  • SSH server
  • Note the standard user username you created during the install process

Login as root on the virtual machine's system console to update the OS after initial installation

# login as root
apt update
apt full-upgrade
reboot
# login as root again
apt install sudo
adduser normal_username sudo # replace normal_username with the standard user username you created
exit

IMPORTANT: If you have already SSH'd in as the standard user, exit and login again to pickup sudo group change

Login as the standard user and verify sudo access with sudo -l

The remaining work will be done as the standard user leveraging sudo.

Goal

Install PAI from scratch (fresh install)

Exclusions:

  • Only install packs and skills that are at least 1.0, so pai-algorithm-skill will not be installed
  • Voice system will not be installed

Repo URL: https://github.com/danielmiessler/Personal_AI_Infrastructure

Packs to be installed:

  • pai-core-install 1.4.0 Core skills, identity, MEMORY system, and response format
  • pai-hook-system 1.0.0 Event-driven automation and security validation
  • pai-observability-server 1.0.0 Real-time agent monitoring dashboard with live charts

Skills to be installed:

  • pai-agents-skill 1.1.1 Dynamic agent composition with personality mapping and parallel orchestration
  • pai-art-skill 1.1.0 Visual content generation with multi-reference image support
  • pai-browser-skill 1.2.0 Browser automation with Playwright for testing and verification
  • pai-prompting-skill 1.0.0 Meta-prompting system with templates, standards, and dynamic generation
  • pai-upgrades-skill 1.0.0 Track and manage PAI system upgrade opportunities

Install Pre-requisite system packages

  • unzip # needed for bun install
  • curl # needed for bun install
  • jq # needed for bun install
  • git # needed for PAI repo clone
  • fd-find # needed for statusline-command.sh, binary name is fdfind
  • ripgrep # useful for searching in code, binary name is rg
  • yt-dlp # needed for pai-upgrades-skill
  • libnss3 # needed for pai-browser-skill
  • libnspr4 # needed for pai-browser-skill
  • imagemagick # needed for art skill
sudo apt install unzip curl jq git libnss3 libnspr4 imagemagick fdfind ripgrep

Debian's yt-dlp version is too old, so the apt package won't work.

Create an alias in your .bashrc or .zshrc for fdfind as fd

alias fd='fdfind'

Optional - extra system packages

  • zip # since we installed unzip might as well have both
  • bat # cat alternative with syntax highlighting, batcat is binary name on Debian
  • glow # MarkDown viewer since many files are in MarkDown
  • tree # useful for reviewing pack and skill directories
sudo apt install zip bat glow tree

Create an alias for bat in your .bashrc or .zshrc

alias bat='batcat'

Install Bun for Typescript runtime and package management

https://bun.com/docs/installation

wget -O bun_install.sh https://bun.com/install
# review script
bash bun_install.sh
# verify bun path is added to .bashrc
tail ~/.bashrc
source ~/.bashrc
bun --version # check bun is working

Install Claude Code - it's the engine for PAI

https://code.claude.com/docs/en/setup

wget -O claude_install.sh https://claude.ai/install.sh
# review script
bash claude_install.sh
claude # check claude is working and do initial setup
# Choose theme like Dark mode
# claude will provide a URL to paste into the browser on your host system
# follow login process, copy provided code, and paste back into claude session
# exit with /exit

NOTE: claude installs in ~/.local/bin which is already in path

Install Node Version Manager and Node.js for Observability Server pack

Node.js changes frequently so using a version manager and a recent version is often better than installing the Debian system package

https://nodejs.org/en/download

wget -O nvm_install.sh https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh
# review script
bash nvm_install.sh
# restart shell to enable or 
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
# install LTS release
nvm install 24
node -v # check node is working

Gather API keys

## Packs/pai-art-skill (see section below on Skills installation)
REPLICATE_API_TOKEN  # Required for flux, nano-banana
GOOGLE_API_KEY       # Required for nano-banana-pro, Recommended
OPENAI_API_KEY       # Required for gpt-image-1
REMOVEBG_API_KEY     # Required for --remove-bg

NOTE: These will be added to ~/.claude/.env during the pai-art-skill install, but it's useful to know what you may need during the installation. The Google API key is Recommended, and at least one of Replicate, Google, or OpenAI is required for the Art Skill.

Optional - Fabric

Fabric is another of Daniel's projects that provides useful LLM tools

wget -O fabric_install.sh https://raw.githubusercontent.com/danielmiessler/fabric/main/scripts/installer/install.sh
bash fabric_install.sh
fabric --setup

NOTE: If you want to use the Youtube Video transcript summary pattern you'll need a Youtube API key

For example to summarize Daniel's video "A Conversation with Damien Lewke at Nebulock"

 fabric -y "https://www.youtube.com/watch?v=XO0y5pO0PGE" --stream --pattern summarize

Fabric API Keys go in ~/.config/fabric/.env

YOUTUBE_API_KEY=""

NOTE: I'm mentioning this because the pai-upgrades-skill wants yt-dlp which also uses the Youtube API key. I haven't used the pai-upgrades skill yet, but that API key came up in Fabric for yt-dlp.

Clone PAI repository

git clone https://github.com/danielmiessler/Personal_AI_Infrastructure.git

This will create a "Personal_AI_Infrastructure" directory. This path is your "PAI Repository" directory.

REMINDER: Thes guide was created on 9-Jan-2025 and PAI v2.1.0

PAI Specific Installation steps

Daniel currently recommends an AI focused approach for installing PAI. You'll use Claude Code to do the installation.

WARNING: This process is token heavy and may utilize the session quota for an entire day of Claude Pro. It is recommended to begin the install with a full session quota available.

Bootstrap

cd Personal_AI_Infrastructure/Bundles/Official
bun run install.ts

NOTE: This guide will use the recommended PAI_DIR of ~/.claude

NOTE: When complete the install.ts will return these Next Steps. These files do not exist at this time. We will instead use the Packs directory paths.

1. Install the packs IN ORDER by giving each pack file to your AI:
   - kai-hook-system.md
   - kai-history-system.md
   - kai-core-install.md
   - kai-voice-system.md (optional, requires ElevenLabs)
2. Restart Claude Code to activate hooks

Pack Installation

Review the contents of "Personal_AI_Infrastructure/Packs". At the time of this guide the contents were:

~/Personal_AI_Infrastructure/Packs$ ls -1F
fabric_install.sh
icons/
pai-agents-skill/
pai-algorithm-skill/
pai-art-skill/
pai-browser-skill/
pai-core-install/
pai-hook-system/
pai-observability-server/
pai-prompting-skill/
pai-upgrades-skill/
pai-voice-system/
README.md

We wil first install the Packs:

  • pai-hook-system
  • pai-observability-server
  • pai-core-install

REMINDER: For this guide we will not be installing the pai-voice-system

We will use Claude to perform the installation.

cd ~/.claude
claude

Provide Claude a prompt similar to this to start the installation.

Review the files and code in ~/Personal_AI_Infrastructure/Packs/pai-hook-system to create a todo list of actions. Once the install plan is ready, install the pack.

Claude will proceed through the installation steps and ask questions along the way. Exit Claude code after each Pack installation is completed. Repeat this process until pai-hook-system, pai-observability-server, and pai-core-install are complete. Again exit Claude.

NOTE: If Claude asks to backup any PAI files it is recommended to ask it to put the backup directory outside of ~/.claude such as ~/pai-backups so that they do not clutter the working folder.

Skill installation

Skills are more action oriented so it can be helpful to ask Claude to tell you about a skill to see if you'd want to install it.

Review the files and code in ~/Personal_AI_Infrastructure/Packs/pai-agents-skill and tell me about what it can do and why I would want to install it.

Work through the list of available skills and install those that look interesting. After telling you about the skill Claude will give you the option to install it.

  • pai-agents-skill
  • pai-art-skill
  • pai-browser-skill
  • pai-prompting-skill
  • pai-upgrades-skill

REMINDER: This guide does not cover the pai-algorithm-skill since it is not yet at a 1.0 release.

WARNING: I was not able to install both the Packs and the full list of Skills with one day's session quota. I think I was only able to install one skill before the session was used-up. After reset I was able to install the remaining Skills the next day.

TIP: After installation Claude will provide some examples on how to use the Skill. Copy these to a notes document so you can try things out once the installation process is completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment