<commit_before>var inquirer = require('inquirer')
var util = require('./util')
var fs = require('fs')
var chalk = require('chalk')
var path = require('path')
var configFilePath = path.join(process.cwd(), 'mfly-interactive.config.json')

module.exports = function init() {
	var options = {}
	try {
		options = require(configFilePath)
	} catch (err) {}

	inquirer.prompt([{
		name: 'userId',
		message: 'Enter Airship User Id'  
	}, {
		name: 'password',
		message: 'Enter Airship password',
		type: 'password'
	}, {
		default: options.itemId,
		name: 'itemId',
		message: 'Enter Airship Item Id'
	}, {
		default: options.mcode || 'interactives',
		name: 'mcode',
		message: 'Enter Company Code'
	}, {
		default: options.filename || 'archive',
		name: 'filename',
		message: 'Enter the name of the .interactive file'
	}]).then(function (answers) {

		util.getAccessToken(answers.userId, answers.password, function(accessToken) {
			util.getProduct(answers.mcode, function(product) {
				util.getViewerItemSlug(answers.itemId, accessToken, product.id, function(slug) {

					var data = {
						filename: answers.filename + '.interactive',
						accessToken: accessToken,
						itemId: answers.itemId,
						mcode: answers.mcode,
						slug: slug,
						productId: product.id
					}
					
			    	fs.writeFile('mfly-interactive.config.json', JSON.stringify(data, null, 4), function() {
			    		console.log(chalk.green('Initialized successfully!'))
			    	})
				})
			})
		})
	})
}<commit_msg>default to the directory name of the interactive<commit_after>var inquirer = require('inquirer')
var util = require('./util')
var fs = require('fs')
var chalk = require('chalk')
var path = require('path')
var configFilePath = path.join(process.cwd(), 'mfly-interactive.config.json')

module.exports = function init() {
	var options = {}
	try {
		options = require(configFilePath)
	} catch (err) {}

	inquirer.prompt([{
		name: 'userId',
		message: 'Enter Airship User Id'  
	}, {
		name: 'password',
		message: 'Enter Airship password',
		type: 'password'
	}, {
		default: options.itemId,
		name: 'itemId',
		message: 'Enter Airship Item Id'
	}, {
		default: options.mcode || 'interactives',
		name: 'mcode',
		message: 'Enter Company Code'
	}, {
		default: options.filename ||  process.cwd().split(path.sep).pop(),
		name: 'filename',
		message: 'Enter the name of the .interactive file'
	}]).then(function (answers) {

		util.getAccessToken(answers.userId, answers.password, function(accessToken) {
			util.getProduct(answers.mcode, function(product) {
				util.getViewerItemSlug(answers.itemId, accessToken, product.id, function(slug) {

					var data = {
						filename: answers.filename + '.interactive',
						accessToken: accessToken,
						itemId: answers.itemId,
						mcode: answers.mcode,
						slug: slug,
						productId: product.id
					}
					
			    	fs.writeFile('mfly-interactive.config.json', JSON.stringify(data, null, 4), function() {
			    		console.log(chalk.green('Initialized successfully!'))
			    	})
				})
			})
		})
	})
}
{'fraction_non_alphanumeric': 0.15111695137976347, 'fraction_numerical': 0.000657030223390276, 'mean_word_length': 3.634703196347032, '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': '6144824', 'n_tokens_mistral': 1171, 'n_tokens_neox': 997, 'n_words': 225}