refactor: update configuration to use ${ENV_VAR} syntax for environme… (#17)
* refactor: update configuration to use ${ENV_VAR} syntax for environment variable references
- Changed auth_token_env_ref to auth_token in endpoint configurations across README, example YAML, and documentation.
- Enhanced support for environment variable expansion in configuration files.
- Removed deprecated auth_token_env_ref references from code and tests, ensuring consistency in how tokens are handled.
- Added tests for environment variable expansion functionality.
* refactor: simplify environment variable expansion in configuration handling
- Replaced the previous ExpandEnvStrings function with ReadExpandedConfig to read and expand environment variables directly from the YAML config file.
- Improved handling of different file extensions and ensured compatibility with viper's configuration reading.
- Removed redundant environment variable expansion calls from the initConfig and loadRuntimeSnapshot functions.
* test: enhance ReadExpandedConfig tests for YAML configuration handling
- Updated tests to validate the ReadExpandedConfig function, ensuring proper expansion of environment variables from a YAML file.
- Added tests for handling literal dollar signs and unset variables.
- Included a test case for file not found scenarios to improve error handling.
* fix: use strict ${ENV_VAR}-only expander and warn on unset variables
Address PR #17 review feedback:
- Replace os.ExpandEnv with a regex-based expander that only matches
the ${NAME} form, leaving bare $VAR and bcrypt hashes untouched.
- Warn (not silently ignore) when ${ENV_VAR} references unset variables.
- Fix TestPatchInitConfigWithSetup_AppliesOverrides by using prefix-based
line replacement so it works with the new ${OPENAI_API_KEY} default.
- Remove .cursor/worktrees.json from tracking and add .cursor/ to .gitignore.
Made-with: Cursor