fix: Write .env to both ~/.claude/ and ~/.config/pai/#337
Closed
nmitch17 wants to merge 1 commit into
Closed
Conversation
The installer was writing .env to ~/.claude/, but PAI components (voice server, hooks, etc.) look in ~/.config/pai/. This fix: - Writes .env only to ~/.config/pai/.env (single source of truth) - Updates readExistingConfig() to read from ~/.config/pai/ for updates - No duplication, no sync issues Fixes danielmiessler#336 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
nmitch17
force-pushed
the
fix/env-file-location
branch
from
January 7, 2026 19:44
a367507 to
8c164e6
Compare
Owner
|
Thank you @nmitch17 for identifying this .env location issue! 🙏 PAI v2.1 just dropped with a major restructure including a new The installer paths have changed significantly ( See the release: https://github.com/danielmiessler/PAI/releases/tag/v2.1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes installer to write
.envto the canonical PAI location where components actually look for it.Problem
The installer wrote
.envto~/.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
.envonly to~/.config/pai/:~/.config/pai/.env✓~/.config/pai/.env✓~/.config/pai/.env✓Changes
readExistingConfig()now reads from~/.config/pai/.envwritten only to~/.config/pai/.env~/.claude/.envTest Plan
.envcreated at~/.config/pai/.env~/.config/pai/.envFixes #336
🤖 Generated with Claude Code