<commit_before>import yargonaut from 'yargonaut';
import yargs from 'yargs';
import packageInfo from '../../package.json';
import * as Token from '../token';

yargonaut
    .style('blue')
    .helpStyle('green')
    .errorsStyle('red.bold');

var options = yargs
    .version(packageInfo.version)

    .command('token [ip]', 'generate token', {}, argv => {
        Token.create(argv.ip)
            .then(token => {
                console.log(token);
            });
    })

    .recommendCommands()
    .help()
    .argv;

if (options._.length === 0) {
    yargs.showHelp();
    process.exit();
}
<commit_msg>use config when generating token<commit_after>import yargonaut from 'yargonaut';
import yargs from 'yargs';
import packageInfo from '../../package.json';
import * as Token from '../token';
import setup from 'avanti-core/dist/setup';

setup().then(() => {
    yargonaut
        .style('blue')
        .helpStyle('green')
        .errorsStyle('red.bold');

    var options = yargs
        .version(packageInfo.version)

        .command('token [ip]', 'generate token', {}, async argv => {
            await Token.create(argv.ip)
                .then(token => {
                    console.log(token);
                });
            process.exit();
        })

        .recommendCommands()
        .help()
        .argv;

    if (options._.length === 0) {
        yargs.showHelp();
        process.exit();
    }
});

{'fraction_non_alphanumeric': 0.16549789621318373, 'fraction_numerical': 0.001402524544179523, 'mean_word_length': 2.0688172043010753, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, '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': '1019899', 'n_tokens_mistral': 436, 'n_tokens_neox': 420, 'n_words': 94}