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
{{ message }}
Repository navigation
Add support for environment variable configuration #634
Currently, Python Fire CLI tools require all configuration to be passed via command-line arguments. For sensitive data or frequently used configurations, this can be cumbersome and insecure.
Proposed Solution
Add support for reading configuration values from environment variables with a naming convention like FIRE_<PARAM_NAME>.
Example Usage
python import fire
def deploy(api_key, region='us-east-1'):
"""Deploy application"""
print(f"Deploying to {region} with key {api_key}")
if __name__ == '__main__':
fire.Fire(deploy)
I can confirm that it's a good feature. In xonsh shell awesome CLI template the name of the env var formed from CLI app name (example) so if the app name myapp the env variable will be $MYAPP_<COMPONENT_NAME>_<ARGUMENT_NAME>.
Activity
anki-code commentedon Jan 26, 2026
I can confirm that it's a good feature. In xonsh shell awesome CLI template the name of the env var formed from CLI app name (example) so if the app name
myappthe env variable will be$MYAPP_<COMPONENT_NAME>_<ARGUMENT_NAME>.