<commit_before># Cliopatra

  A lightweight solution for Node.js command-line interfaces, inspired by Perl's [Getopt](http://search.cpan.org/~jv/Getopt-Long-2.42/), and following the [POSIX syntax](http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html) for command line options.

## Installation

    $ npm install cliopatra



## Quick Start Example


```js
#!/usr/bin/env node
"use strict" 
  var clio      = require('cliopatra');
  var program   = clio.option('-s= ^we &ui --silly', 'description')
                      .option('-c, --color [ flag ]') 
                      .option('-v, --verbose [ flag ]')
                      .parse( process.argv );

  program.run();
```

## Style

  As a matter of style you can use the `clio` instead of `cliopatra`; code examples and API docs use these two interchangebly.

```js
  var clio = require('cliopatra');
```

## Cliopatra Settings

Cliopatra can be configured to use short-cut arguments and automatically parse and load option rules from an object or a JSON file to make some aspects of your executable more automated.

### Cliopatra#settings( String[,String...] )

* AUTO_SHORT
* AUTO_BOOLEAN
* AUTO_LOAD
* RULES_OVERWRITE
* USE_COMMON_FLAGS
* USE_DEBUG_FLAG
* MODE_INTERACTIVE
* MODE_PIPETHROUGH
<commit_msg>upd readme<commit_after># Cliopatra

  A lightweight solution for Node.js command-line interfaces, inspired by Perl's [Getopt](http://search.cpan.org/~jv/Getopt-Long-2.42/), and following the [POSIX syntax](http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html) for command line options.

## Installation

    $ npm install cliopatra



## Quick Start Example


```js
#!/usr/bin/env node
"use strict" 
  var clio      = require('cliopatra');
  var program   = clio.enable('autoshort')
                      .option('--short ! <arg1> <arg2>', 'This is a required flag with 2 reqd args')
                      .option('--trial ?!', 'This is a required boolean flag' )
                      .argv();

  program.run();
```

## Style

  As a matter of style you can use the `clio` instead of `cliopatra`; code examples and API docs use these two interchangebly.

```js
  var clio = require('cliopatra');
```

## Cliopatra Settings

Cliopatra can be configured to use short-cut arguments and automatically parse and load option rules from an object or a JSON file to make some aspects of your executable more automated.

### Cliopatra#enable( String[,String...] )

* AUTO_SHORT
* AUTO_BOOLEAN
* AUTO_LOAD
* RULES_OVERWRITE
* USE_COMMON_FLAGS
* USE_DEBUG_FLAG
* MODE_INTERACTIVE
* MODE_PIPETHROUGH

{'fraction_non_alphanumeric': 0.11685306594677979, 'fraction_numerical': 0.01349787890474354, 'mean_word_length': 3.3018242122719736, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6104162', 'n_tokens_mistral': 896, 'n_tokens_neox': 805, 'n_words': 255}