You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add project-specific environment variable runtime support (#68)
Implements Issue #41 - Project-specific environment variable runtime support
Changes:
- Add PersistedEnvVariable type and envVars field to PersistedProject
- Add .env file parsing utility with parseEnvFile and mergeEnvVars functions
- Add env-resolution helper for terminal spawn with variable expansion
- Extend DialogApi with selectFile method for .env file selection
- Update ProjectSettings to support .env import with error handling
- Pass resolved env vars through all terminal spawn paths:
- WorkspaceLayout handleCreateTerminalInPane
- use-terminal-restore restoreFromLayout and createDefaultTerminal
- use-snapshots restoreFromSnapshot
- Print one-time terminal info line when env vars are applied
- Add comprehensive test coverage for env-parser utility
Technical details:
- Supports Unix ($VAR, ${VAR}) and Windows (%VAR%) variable references
- Only expands against inherited system/process env, not other project vars
- Normalizes env vars on save (trims keys, filters empty)
- Shows warnings for invalid lines during .env import
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
0 commit comments