Package: evm-fm-python
evm-fm-pythonEnvironment variable manager for Mac, written in PythonNOTE: This project is still in the alpha phase of developmentObjectivesThis project is a configuration management tool for Mac aimed at keeping a local environment variable file up-to-date with values stored in external secret/key management systems.Supported Secret/Key Management SystemsAWS Parameter StoreOverviewThis project takes advantage of the launchd daemon on Mac operating systems to continually monitor external secret/key management systems to keep a local environment variable file up-to-date. This project allows users to create/load/unload a launchd LaunchAgent that accomplishes just that. All you need to do is provide a configuration file and specify an action andevm-fm-pythontakes care of the rest.Basic UsageAvailable actions:Create
This action creates the LaunchAgent$evm-fm--config-file<path_to_configuration_file>Load
This action creates, loads, and starts the LaunchAgent$evm-fm--config-file<path_to_configuration_file>--loadUnload
This action unloads and stops the LaunchAgent$evm-fm--config-file<path_to_configuration_file>--unloadArgumentsCommand LineMetadataRequiredDescription-f, --config-filefile pathTrueLocation of configuration file-l, --loadFalseWhether the LaunchAgent should be loaded-u, --unloadFalseWhether the evm LaunchAgent should be unloadedConfiguration FileThis file contains all necessary configurations forevm-fm-pythonto perform the available actions. The configuration file can be located anywhere that can be accessed by theevm-fm-pythonproject.NOTE: The configuration fileneedsto be a.tomlfile. Seehttps://github.com/toml-lang/tomlfor additional information about this file typeKeyValue TypeRequiredDefaultChildrenParentDescriptionenv_file_pathStringTrue---File path of the environment variable file you wishevm-fm-pythonto updateparam_store_prefixesList of StringsTrue---Prefixes you wantevm-fm-pythonto use when pulling secret/key values from the supported secret/key management systemsconfig_file_locStringTrue---Path of the configuration filelaunchd_std_out_log_locStringFalse/usr/local/bin/log/env_var_manager.log--Path of the stdout log file you want the LaunchAgent to write tolaunchd_python_pathStringFalse/usr/bin/python--Path of the Python executable you want the LaunchAgent to uselaunchd_std_err_log_locStringFalse/usr/local/bin/log/env_var_manager.log--Path of the stderr log file you want the LaunchAgent to write tolaunchd_start_intervalIntegerFalse120--Time interval you want the LaunchAgent to run on in Secondspost_commandsList of DictionariesFalse-command, shell-List of commands you want to be executed after the local environment file has been updatedcommandStringTrue--post_commandsThe post command you wish to be executedshellStringTrue--post_commandsWhether you wish the post command to be executed in a shell environmentExample Configuration Fileenv_file_path = "/Users/user/example/envs/.env"
param_store_prefixes = ["/Development/Test/", "/Production/Test/"]
launchd_python_path = "/Users/user/.virtualenvs/example/bin/python"
config_file_loc = '/Users/user/example/configuration_file.toml'
launchd_std_out_log_loc = "/Users/user/example/logs/env_var_manager.log"
launchd_std_err_log_loc = "/Users/user/example/logs/env_var_manager.log"
launchd_start_interval = 340

[[post_commands]]
command = "source /Users/user/example/envs/.env"
shell = true