<commit_before>var cli = require("../")
var Test = new cli.Command({
	description:"diaplays a simple hello world command"
	,usage:[
		cli.bold("Usage:") + " cli hello --interactive",
		cli.bold("Usage:") + " cli hello --name=john",
		cli.bold("Usage:") + " cli hello --name=john --name=marry --name=paul -v screaming"
	]
	,flags:{
		name:{
			type:[ String, Array ]
			,shorthand:'n'
			,description:"The name of the person to say hello to"
		}
		,excited: {
			type:Boolean
			,shorthand: 'e'
			,description:"Say hello in a very excited manner"
			,default:false
		}
		,volume:{
			type:String
			,choices:['normal', 'screaming']
			,description:"Will yell at each person"
			,default:'normal'
			,shorthand:'v'
		}
	}
	,run: function( cmd, data, cb ){
		var out = [];

		var names = Array.isArray( data.name ) ? data.name : [ data.name ]
		for( var x =0; x< names.length; x++ ){
			var value = "Hello, " + names[x]
			if( data.excited ){
				value += '!'
			}

			out.push( value );

		}
		out = out.join('\n');

		out = data.volume == 'screaming' ? out.toUpperCase() : out;
		cb( null, out );
	}
});
cli.use('hello', Test)
cli.run();
<commit_msg>add a required flag to example command<commit_after>var cli = require("../")
var Test = new cli.Command({
	description:"diaplays a simple hello world command"
	,usage:[
		cli.bold("Usage:") + " cli hello --interactive",
		cli.bold("Usage:") + " cli hello --name=john",
		cli.bold("Usage:") + " cli hello --name=john --name=marry --name=paul -v screaming"
	]
	,flags:{
		name:{
			type:[ String, Array ]
			,shorthand:'n'
			,description:"The name of the person to say hello to"
			,required:true
		}
		,excited: {
			type:Boolean
			,shorthand: 'e'
			,description:"Say hello in a very excited manner"
			,default:false
		}
		,volume:{
			type:String
			,choices:['normal', 'screaming']
			,description:"Will yell at each person"
			,default:'normal'
			,shorthand:'v'
		}
	}
	,run: function( cmd, data, cb ){
		var out = [];

		var names = Array.isArray( data.name ) ? data.name : [ data.name ]
		for( var x =0; x< names.length; x++ ){
			var value = "Hello, " + names[x]
			if( data.excited ){
				value += '!'
			}

			out.push( value );

		}
		out = out.join('\n');

		out = data.volume == 'screaming' ? out.toUpperCase() : out;
		cb( null, out );
	}
});
cli.use('hello', Test)
cli.run();

{'fraction_non_alphanumeric': 0.18693982074263765, 'fraction_numerical': 0.0008536064874093043, 'mean_word_length': 3.1340388007054676, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4365705', 'n_tokens_mistral': 1001, 'n_tokens_neox': 854, 'n_words': 227}