function promptUserForUri() {
  let prompt;
  try {
    prompt = require("prompt");
  } catch(ex) {
    console.error("Error! Missing dependencies:")
    console.error("You need to first run: npm install");
    process.exit(1);
  }
  
  console.log("Enter the URI from Google Authenticator QR code.")
  console.log("The URI looks like otpauth-migration://offline?data=... \n")

  console.log("You can get it by exporting from Google Authenticator app, then scanning the QR with");
  console.log("e.g. https://play.google.com/store/apps/details?id=com.google.zxing.client.android")
  console.log("and copying the text to your pc, e.g. with Google Keep ( https://keep.google.com/ )")

  require("colors");
  console.log("By using online QR decoders or untrusted ways of transferring the URI text,".red)
  console.log("you risk someone storing the QR code or URI text and stealing your 2FA codes!".red)
  console.log("Remember that the data contains the website, your email and the 2FA code!".red)

  // Future improvement: add capability to upload/select QR jpg and scan it.
  // I took a picture of the QR with my camera, because Google Authenticator prevents screenshots.
  // I then uploaded the picture to my pc via the SD-card and scanned with my phone...
  // Very many steps

  const resultType = {
    QRCODE: "qrcode",
    JSON: "json",
  }

  const mode = process.argv.includes('-q') ? resultType.QRCODE : resultType.JSON

  const promptVariables = ["totpUri"]

  if(mode === resultType.JSON){
    promptVariables.push("saveToFile")
    promptVariables.push("filename")
  }

  prompt.start();
  prompt.get(promptVariables, (err, result) => {
    if (err) { return console.error(err); }

    const uri = result.totpUri;
    const accounts = decodeExportUri(uri);

    switch(mode){
      case resultType.QRCODE:
        saveToQRCodes(accounts)
        break
      case resultType.JSON:
        const saveToFileInput = result.saveToFile.toLowerCase().startsWith("y")
        toJson(result.filename, saveToFileInput, accounts);
        break
    }
  })
}
Act as a CLI and ask for `otpauth-migration://` uri and optionally file to store in.