Personal_AI_Infrastructure icon indicating copy to clipboard operation
Personal_AI_Infrastructure copied to clipboard

fix: Write .env to both ~/.claude/ and ~/.config/pai/

Open nmitch17 opened this issue 10 months ago • 0 comments

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/
  • .env written only to ~/.config/pai/.env
  • Removed duplicate write to ~/.claude/.env

Test Plan

  • [ ] Fresh install: verify .env created 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

nmitch17 avatar Jan 07 '26 19:01 nmitch17