recursively print an environment.
function printEnvironment(environment, path, outputFile) {
  // print sub-objects in an environment.
  if (path) environment = traverse(environment).get(path.split('.'));
  path = path ? '.' + path : '';

  if (argv.format === 'json' || outputFile) {
    var json = JSON.stringify(environment, null, 2);
    if (outputFile) fs.writeFileSync(outputFile, json, 'utf-8');
    else console.log(JSON.stringify(environment, null, 2));
  } else {
    environment = _.mapValues(environment, function(v) {
      return util.inspect(v, {colors: true});
    });
    console.log(chalk.blue('==> ') + chalk.bold(renv.environment + path));
    console.log(columnify(environment, {showHeaders: false, config: {
      key: {minWidth: parseInt(width * 0.4), maxWidth: parseInt(width * 0.4)},
      value: {minWidth: parseInt(width * 0.6), maxWidth: parseInt(width * 0.6)},
    }}));
  }
}