Skip to content

Support for  SWITCH_CONFIG_PATH  environment variable to specify config file location in kubeswitch #191

@posquit0

Description

@posquit0

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions