<commit_before># mj

[![Build Status](https://travis-ci.org/mongodb-js/mj.svg?branch=master)](https://travis-ci.org/mongodb-js/mj)

WIP: mongodb-js tooling.

## Usage

```
mongodb-js tooling.

Usage:
   mj <command> [<args>...]
   mj --version
   mj -h | --help

Options:
   -h, --help     Print this help screen

Available commands are:
   check      Check if all requirements are met and tests pass
   create     Create a new mongodb-js repository
   ingest     Prepare ingestion of existing repository to mongodb-js
   help       Provide help on any command

See 'mj help <command>' for more information on a specific command.
```

## Installation

```
npm install -g mj
```

## Testing

```
npm test
```

## Dev

### Debugging

To enable debugging, set the `DEBUG` environment variable to `mj`:

```
DEBUG=mj mj check
```

### Adding commands

To add the command `foobar`, follow these steps:

1. add `./docopts/foobar.docopt`
2. add `./commands/foobar.js`

`foobar.js` needs to export a function like so:

```js
module.exports = function (args) {
  ...
}
```

where `args` is the already docopt-parsed result of your `foobar.docopt` definitions. No validation has been performed on args, other than it matched one of the defined docopt definitions.

Your command should exit either with `process.exit(0)` if everything was ok, or `process.exit(1)` if there was an error.

## License

MIT<commit_msg>fixed DEBUG var, fixed doc on adding commands async<commit_after># mj

[![Build Status](https://travis-ci.org/mongodb-js/mj.svg?branch=master)](https://travis-ci.org/mongodb-js/mj)

WIP: mongodb-js tooling.

## Usage

```
mongodb-js tooling.

Usage:
   mj <command> [<args>...]
   mj --version
   mj -h | --help

Options:
   -h, --help     Print this help screen

Available commands are:
   check      Check if all requirements are met and tests pass
   create     Create a new mongodb-js repository
   ingest     Prepare ingestion of existing repository to mongodb-js
   help       Provide help on any command

See 'mj help <command>' for more information on a specific command.
```

## Installation

```
npm install -g mj
```

## Testing

```
npm test
```

## Dev

### Debugging

To enable debugging, set the `DEBUG` environment variable to `mj:*`:

```
DEBUG=mj:* mj check
```

### Adding commands

To add the command `foobar`, follow these steps:

1. add `./docopts/foobar.docopt`
2. add `./commands/foobar.js`

`foobar.js` needs to export a function like so:

```js
module.exports = function (args, done) {
  ...
}
```

where `args` is the already docopt-parsed result of your `foobar.docopt` definitions, and `done` is the callback function to be called when the command finishes. Note that no validation has been performed on args, other than it matched one of the defined docopt definitions.

Your command should exit either with `process.exit(0)` if everything was ok, or `process.exit(1)` if there was an error.

## License

MIT
{'fraction_non_alphanumeric': 0.11998640380693405, 'fraction_numerical': 0.002719238613188307, 'mean_word_length': 3.4389140271493215, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 4, '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': '2783016', 'n_tokens_mistral': 999, 'n_tokens_neox': 921, 'n_words': 361}