var core = require("./core");
var prompt = require("./bin/prompt");
var fs = require("fs");

var env = process.env.NODE_ENV || "development";

module.exports = function(filepath, password) {
  var out = fs.readFileSync(filepath).toString();
  var json = JSON.parse(out);

  if(!password) {
    if(env === "development") {
      password = prompt("Passpharse to decrypt config: ", filepath);
    } else {
      throw "No password to decrypt config"
    }
  }
  return core.decrypt(json, password, true);
}

var core = require("./core");
var prompt = require("prompt-sync")();
var fs = require("fs");

var env = process.env.NODE_ENV || "development";

module.exports = function(filepath, password) {
  var out = fs.readFileSync(filepath).toString();
  var json = JSON.parse(out);

  if(!password) {
    if(env === "development") {
      password = prompt("Passpharse to decrypt config: ", {echo: "*"});
    } else {
      throw "No password to decrypt config"
    }
  }
  return core.decrypt(json, password, true);
}

--- 
+++ 
@@ -1,5 +1,5 @@
 var core = require("./core");
-var prompt = require("prompt-sync")();
+var prompt = require("./bin/prompt");
 var fs = require("fs");
 
 var env = process.env.NODE_ENV || "development";
@@ -10,7 +10,7 @@
 
   if(!password) {
     if(env === "development") {
-      password = prompt("Passpharse to decrypt config: ", {echo: "*"});
+      password = prompt("Passpharse to decrypt config: ", filepath);
     } else {
       throw "No password to decrypt config"
     }
Fix for js API to store in key chain
