<commit_before># Drupal VM Config Generator

[![Latest Stable Version](https://poser.pugx.org/opdavies/drupal-vm-config-generator/v/stable)](https://packagist.org/packages/opdavies/drupal-vm-config-generator) [![Total Downloads](https://poser.pugx.org/opdavies/drupal-vm-config-generator/downloads)](https://packagist.org/packages/opdavies/drupal-vm-config-generator) [![Latest Unstable Version](https://poser.pugx.org/opdavies/drupal-vm-config-generator/v/unstable)](https://packagist.org/packages/opdavies/drupal-vm-config-generator) [![License](https://poser.pugx.org/opdavies/drupal-vm-config-generator/license)](https://packagist.org/packages/opdavies/drupal-vm-config-generator)

A [Symfony Console](http://symfony.com/doc/current/components/console/introduction.html) application that manages and customises configuration files for [Drupal VM](http://www.drupalvm.com) projects.

## Installation

### Download the Phar

Downloading `drupalvm-generate.phar` is the quickest way to get up and running. You can download it like this.

    curl -LO https://github.com/opdavies/drupal-vm-config-generator/releases/download/1.1.0/drupalvm-generate.phar

Make it executable.

    chmod +x drupalvm-generate.phar

Rename it and move it into a location within your `$PATH`.

    mv drupalvm-generate.phar /usr/local/bin/drupalvm-generate

### Install via Composer

You can add the Drupal VM Config Generator into any existing Composer managed project by adding the following to your `composer.json` file.

```json
{
    "require": {
        "opdavies/drupal-vm-config-generator": "@stable"
    }
}
```

By default this will install to `vendor/bin/drupal-vm-config-generator`.

### Download via Git

For development purposes, you can clone the repository from GitHub to get the latest version.

```
git clone <EMAIL>:opdavies/drupal-vm-config-generator
cd drupal-vm-config-generator
composer install
```

At this point, `bin/drupalvm-generate` should be usable.

## Usage

With the `drupalvm-generate` command installed, you can now run it to generate your configuration file.

Each variable configurable with the application has an option that you can set when running the command.

Here is an example with all of the options set beforehand:

```
drupalvm-generate \
  --hostname=example.com \
  --machine-name=example \
  --ip-address=192.168.88.88 \
  --cpus=1 \
  --memory=512 \
  --webserver=nginx \
  --domain=example.com \
  --path=../site \
  --destination=/var/www/site \<commit_msg>The domain option was removed<commit_after># Drupal VM Config Generator

[![Latest Stable Version](https://poser.pugx.org/opdavies/drupal-vm-config-generator/v/stable)](https://packagist.org/packages/opdavies/drupal-vm-config-generator) [![Total Downloads](https://poser.pugx.org/opdavies/drupal-vm-config-generator/downloads)](https://packagist.org/packages/opdavies/drupal-vm-config-generator) [![Latest Unstable Version](https://poser.pugx.org/opdavies/drupal-vm-config-generator/v/unstable)](https://packagist.org/packages/opdavies/drupal-vm-config-generator) [![License](https://poser.pugx.org/opdavies/drupal-vm-config-generator/license)](https://packagist.org/packages/opdavies/drupal-vm-config-generator)

A [Symfony Console](http://symfony.com/doc/current/components/console/introduction.html) application that manages and customises configuration files for [Drupal VM](http://www.drupalvm.com) projects.

## Installation

### Download the Phar

Downloading `drupalvm-generate.phar` is the quickest way to get up and running. You can download it like this.

    curl -LO https://github.com/opdavies/drupal-vm-config-generator/releases/download/1.1.1/drupalvm-generate.phar

Make it executable.

    chmod +x drupalvm-generate.phar

Rename it and move it into a location within your `$PATH`.

    mv drupalvm-generate.phar /usr/local/bin/drupalvm-generate

### Install via Composer

You can add the Drupal VM Config Generator into any existing Composer managed project by adding the following to your `composer.json` file.

```json
{
    "require": {
        "opdavies/drupal-vm-config-generator": "@stable"
    }
}
```

By default this will install to `vendor/bin/drupal-vm-config-generator`.

### Download via Git

For development purposes, you can clone the repository from GitHub to get the latest version.

```
git clone <EMAIL>:opdavies/drupal-vm-config-generator
cd drupal-vm-config-generator
composer install
```

At this point, `bin/drupalvm-generate` should be usable.

## Usage

With the `drupalvm-generate` command installed, you can now run it to generate your configuration file.

Each variable configurable with the application has an option that you can set when running the command.

Here is an example with all of the options set beforehand:

```
drupalvm-generate \
  --hostname=example.com \
  --machine-name=example \
  --ip-address=192.168.88.88 \
  --cpus=1 \
  --memory=512 \
  --webserver=nginx \
  --path=../site \
  --destination=/var/www/site \
{'fraction_non_alphanumeric': 0.1285973032803381, 'fraction_numerical': 0.006842423022740994, 'mean_word_length': 4.226077812828602, 'pattern_counts': {'":': 4, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 18, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7071059', 'n_tokens_mistral': 1638, 'n_tokens_neox': 1558, 'n_words': 391}