Personal_AI_Infrastructure
Personal_AI_Infrastructure copied to clipboard
fix: Write .env to both ~/.claude/ and ~/.config/pai/
Summary
Fixes installer to write .env to the canonical PAI location where components actually look for it.
Problem
The installer wrote .env to ~/.claude/, but PAI components (voice server, hooks, etc.) look in ~/.config/pai/. This caused voice and other features to fail silently.
Solution
Single source of truth - write .env only to ~/.config/pai/:
| Component | Reads from |
|---|---|
| Voice server | ~/.config/pai/.env ✓ |
| Hooks | ~/.config/pai/.env ✓ |
| Installer (update mode) | ~/.config/pai/.env ✓ |
Changes
readExistingConfig()now reads from~/.config/pai/.envwritten only to~/.config/pai/.env- Removed duplicate write to
~/.claude/.env
Test Plan
- [ ] Fresh install: verify
.envcreated at~/.config/pai/.env - [ ] Update install: verify existing config read from
~/.config/pai/.env - [ ] Voice server finds API keys correctly
Fixes #336
🤖 Generated with Claude Code