VoiceServer reads ~/.env but PAI's source of truth is ~/.claude/.env
Description
VoiceServer reads API keys from ~/.env, but PAI's documented source of truth for API keys is ~/.claude/.env:
# ~/.claude/.env header:
# PAI Environment Variables
# ==========================
# SINGLE SOURCE OF TRUTH for all API keys and authentication.
This inconsistency causes ElevenLabs voice to fail on fresh installs even when the API key is correctly configured in ~/.claude/.env.
Current Behavior
// VoiceServer/server.ts reads from:
const ENV_FILE = "$HOME/.env"
Expected Behavior
VoiceServer should read from PAI's canonical location:
const ENV_FILE = "$HOME/.claude/.env"
// Or check both with PAI location taking precedence
Workaround
Copy/symlink the key:
grep "ELEVENLABS_API_KEY" ~/.claude/.env >> ~/.env
Environment
- PAI version: v2.3.0
- Platform: Ubuntu 24.04 / WSL2
Related
This is a design inconsistency rather than a missing file. PR #416 addresses this by loading from multiple locations, but the canonical location should be documented and consistent across PAI components.
This is fixed as of #472
We now use ~/.env (which is what the PAI installer was stating it will create, but then it never created it).
If the consensus is a different location, I'll make sure it's consistent across all scripts and documentation.
@fayerman-source Please vote here: https://github.com/danielmiessler/Personal_AI_Infrastructure/discussions/474 and share your thoughts.
Thanks for reporting this! We've been doing a major restructuring of PAI's core systems, including a complete redesign of the hook architecture (consolidated from 22 to ~19 hooks), a rewritten Algorithm (now v0.5.1 with PRD-based verification), removal of the observability system, and numerous path/configuration fixes.
This specific issue is addressed by those changes. We're targeting a v3.0 release soon that will include all of this. We appreciate your patience and your help in identifying these issues — it directly informed our redesign work. Stay tuned!
Thanks for reporting! The VoiceServer was restructured in v3.0 (now released) with corrected .env path handling. Please upgrade to v3.0 — if you still see .env path issues, please open a new issue.