Unix: Windows:
Metrics:
Usage:
Overview
env-diff is a command-line to tool to generate reports to compare the value of environment variables in each of your environments against the defaults defined in various files. It will help you you find:
- variables absent from production, but will be required for a new feature in test
- production values that shouldn't be shared to your staging environment
- variables set that are no longer referenced in any files
This tool was built with Heroku in mind, but should work with any infrastructure that supports running commands remotely.
Setup
Requirements
- Python 3.6+
Installation
Install env-diff with pip:
$ pip install env-diffor directly from the source code:
$ git clone https://github.com/jacebrowning/env-diff.git
$ cd env-diff
$ python setup.py installUsage
Generate a sample config file:
$ env-diff --initCustomize this file to match your project:
sourcefiles: contain references to environment variables used in your projectpath: relative path to source file
environments: the environments in which your project runsname: name of the environmentcommand: command to display currently set environment variables
Generate reports to show the differences between each environment variable:
$ env-diffDemo
Input YAML config file:
Running in a terminal:
Output (as viewed in TableTool):


