<commit_before>#! /usr/bin/env node

var program = require("commander");
var prompt = require("cli-prompt");

var ImpConfig = require("../lib/impConfig.js");
var config = new ImpConfig();

var imp;

program
  .option("-u, --url [baseUrl]", "Overrides base URL for the API (e.g. -u canary-api.electricimp.com)")

program.parse(process.argv);

function apiKeyPrompt(apiKey) {
  var promptText = "Dev Tools Api-Key";
  if (apiKey) {
    promptText += " (" + apiKey + "): ";
  } else {
    promptText += ": ";
  }

  prompt(promptText, function(val) {
    if (apiKey && !val) val = apiKey;

    var url = "api.electricimp.com";
    if ("url" in program) url = program.url;

    config.setGlobal("apiKey", val);
    config.setGlobal("apiBase", url);<commit_msg>Updated base URL for Electric Imp API<commit_after>#! /usr/bin/env node

var program = require("commander");
var prompt = require("cli-prompt");

var ImpConfig = require("../lib/impConfig.js");
var config = new ImpConfig();

var imp;

program
  .option("-u, --url [baseUrl]", "Overrides base URL for the API (e.g. -u canary-api.electricimp.com)")

program.parse(process.argv);

function apiKeyPrompt(apiKey) {
  var promptText = "Dev Tools Api-Key";
  if (apiKey) {
    promptText += " (" + apiKey + "): ";
  } else {
    promptText += ": ";
  }

  prompt(promptText, function(val) {
    if (apiKey && !val) val = apiKey;

    var url = "build.electricimp.com";
    if ("url" in program) url = program.url;

    config.setGlobal("apiKey", val);
    config.setGlobal("apiBase", url);
{'fraction_non_alphanumeric': 0.1755526657997399, 'fraction_numerical': 0.0, 'mean_word_length': 3.5667655786350148, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4463859', 'n_tokens_mistral': 539, 'n_tokens_neox': 530, 'n_words': 135}