<commit_before>var colors = require('colors');
var fs = require('fs');
var jsonfile = require('jsonfile');
var path = require('path');

var utils = require('./utils');

exports.api = function(args, opts) {
  opts = opts || {};

  var action = args[0];
  var config = utils.config(opts.env);

  var actionObj = exports.load(action);

  var info = {
    'args': args,
    'opts': opts,
  };

  if(actionObj.login) {
    try {
      var login = jsonfile.readFileSync(config.apiFile);
      info.token = login.token;<commit_msg>If action isn't found, exit<commit_after>var colors = require('colors');
var fs = require('fs');
var jsonfile = require('jsonfile');
var path = require('path');

var utils = require('./utils');

exports.api = function(args, opts) {
  opts = opts || {};

  var action = args[0];
  var config = utils.config(opts.env);

  var actionObj = exports.load(action);

  if(!actionObj) {
    return;
  }

  var info = {
    'args': args,
    'opts': opts,
  };

  if(actionObj.login) {
    try {
      var login = jsonfile.readFileSync(config.apiFile);
      info.token = login.token;
{'fraction_non_alphanumeric': 0.16939890710382513, 'fraction_numerical': 0.0018214936247723133, 'mean_word_length': 3.396, 'pattern_counts': {'":': 0, '<': 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': '1278649', 'n_tokens_mistral': 368, 'n_tokens_neox': 360, 'n_words': 89}