Replies: 2 comments
-
|
Thanks for sharing. As a portability test I got PAI running in a GitHub codespace recently. It was automatically installed alongside a separate project repo so that PAI could govern the development process there. One wrinkle I solved: it was tricky to make updates to PAI and push them to github when installed alongside another repo. One wrinkle I didn't solve: having the codespace launch and control the chrome-devtools mcp on my local machine. I made progress with tunneling but it got more involved and less portable than I wanted. (eg windows tunneling was different than macOs). |
Beta Was this translation helpful? Give feedback.
-
|
Hey, thank you so much for this submission. We're about to change the project significantly to solve a number of core issues. Once we do that, let's revisit if it makes sense. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
First off - huge thanks to Daniel for creating PAI. I've been using it daily and it's become central to how I work. Really appreciate the thought that's gone into the architecture.
My Setup
I run PAI across several machines:
This brought up a challenge: how do I make PAI "machine-aware" so it knows where things are on each system?
The Problem
Different machines have different paths:
/home/uservs/Users/user)My Approach (High Level)
I've ended up with a few key patterns:
1. Session Environment Capture
A hook runs at session start and captures the current machine context into a JSON file:
{ "hostname": "DESKTOP-WSL", "obsidian_vault": "/mnt/d/Obsidian/vault", "pai_dir": "/home/user/projects/PAI", "platform": "linux" }Skills and commands read this file instead of relying on environment variables (which Claude Code's sandbox doesn't always inherit).
2. Machine-Agnostic Hooks
Using relative paths in
settings.json(like.claude/hooks/run-hook.sh) works because Claude Code runs hooks from the project root. The hook scripts themselves derivePAI_DIRdynamically from their own script location usingdirname- so they don't rely on any hardcoded paths or environment variables to find the PAI directory.3. Chezmoi for Config Sync
I use chezmoi to manage configurations across machines:
dotsync push/dotsync pullcommands4. Platform-Specific Services
Some things have slightly different setup per platform. For example, I have a voice notification server (ElevenLabs TTS) that needs to run on both macOS and WSL - the service management differs (LaunchAgent vs shell profile auto-start), and each platform uses its native audio player. Same server code works on both, just different install steps.
5. Machine Tags in Commits
My
/synccommand adds the hostname to commits like"Update configs [DESKTOP-WSL]"- makes it easy to track which machine made which changes.Key Lessons
Questions for the Community
Happy to elaborate on any part of this. Just wanted to start a conversation since I imagine others might be running PAI across multiple machines too.
Beta Was this translation helpful? Give feedback.
All reactions