Remove hardcoded values and implement environment-based configuration #2
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
This PR removes all hardcoded values throughout the codebase and implements a comprehensive environment-variable-based configuration system, making the application fully configurable for production deployment and open-source distribution.
Key Changes
Configuration System Overhaul
/Users/jessytsui/.nvm/...) with configurableCLAUDE_CLI_PATHEmail System Improvements
Re: [Claude-Code-Remote #TOKEN] ...[Claude-Code-Remote #TOKEN]format (resolves "No token found in email" errors)SMTP_TIMEOUTenvironment variable for connection reliabilitySecurity & Reliability
Environment Variables Added
Core Email Configuration
System & Timeout Configuration
Files Modified
Core Configuration
src/core/config.js- Environment-first configuration loadingclaude-remote.js- Added dotenv integration.env.example- Complete configuration documentationEmail & Communication
src/channels/email/smtp.js- Configurable SMTP timeoutssrc/relay/relay-pty.js- Fixed token extraction for Claude-Code-Remote format + email reply supportsrc/channels/local/desktop.js- Configurable notification timeoutsconfig/channels.json- Removed hardcoded email settingsSystem Integration
claude-control.js- Configurable Claude CLI pathsend-test-reply.js- Dynamic token generationtest-smtp.js- New comprehensive testing utilityRecent Updates
Email Reply Fix (Latest Commit)
[Claude-Code-Remote #TOKEN]andRe: [Claude-Code-Remote #TOKEN]formatsTesting Results
Migration Guide
Existing users: Copy
.env.exampleto.envand configure your settings. All functionality preserved.New users: Follow the setup guide in
.env.examplefor complete configuration.Important: After updating, restart the relay process to load the new email reply fix:
node src/relay/relay-pty.jsType of Change