Currently, kubeswitch requires users to specify the config file path via a command-line flag --config-path for using a custom switch configuration file. For smoother integration with directory-based environment management tools such as direnv , it would be very useful to support an environment variable like SWITCH_CONFIG_PATH.
This environment variable would allow users to automatically switch configuration files based on the current working directory without relying on shell aliases or additional wrapper scripts. This would simplify workflows where different projects or directories require different kubeswitch configurations.
Use case:
- Using
direnv to load environment variables per directory
- Setting
SWITCH_CONFIG_PATH in the .envrc file of each directory to point to the directory-specific kubeswitch config
- Invoking
switch directly without extra flags, automatically picking up the correct config for the current directory
Benefits
- Improved usability in multi-project environments
- Removes the complexity of shell function or alias workarounds
- Better support for directory-driven workflows popular with tools like direnv
Thank you for considering this enhancement.
Currently,
kubeswitchrequires users to specify the config file path via a command-line flag--config-pathfor using a custom switch configuration file. For smoother integration with directory-based environment management tools such asdirenv, it would be very useful to support an environment variable likeSWITCH_CONFIG_PATH.This environment variable would allow users to automatically switch configuration files based on the current working directory without relying on shell aliases or additional wrapper scripts. This would simplify workflows where different projects or directories require different kubeswitch configurations.
Use case:
direnvto load environment variables per directorySWITCH_CONFIG_PATHin the.envrcfile of each directory to point to the directory-specifickubeswitchconfigswitchdirectly without extra flags, automatically picking up the correct config for the current directoryBenefits
Thank you for considering this enhancement.