Personal_AI_Infrastructure icon indicating copy to clipboard operation
Personal_AI_Infrastructure copied to clipboard

VoiceServer reads ~/.env but PAI's source of truth is ~/.claude/.env

Open fayerman-source opened this issue 10 months ago • 4 comments

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.

fayerman-source avatar Jan 17 '26 04:01 fayerman-source

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.

ksylvan avatar Jan 23 '26 06:01 ksylvan

@fayerman-source Please vote here: https://github.com/danielmiessler/Personal_AI_Infrastructure/discussions/474 and share your thoughts.

ksylvan avatar Jan 23 '26 06:01 ksylvan

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!

danielmiessler avatar Feb 10 '26 21:02 danielmiessler

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.

kaimagnus avatar Feb 15 '26 17:02 kaimagnus