<commit_before># metalpress-cli

CLI for Metalpress (Official)

## Structure and Templating

metalpress works from a specific directory structure. It contains a `templates` and `src` directory. Within the src directory it will load data from `data` as `yaml` or `json` files. You can create folders for collections and use markdown files for pages. You should store all assets in `assets`.

For templating, metalpress uses liquid. You can learn more about the [syntax here](https://github.com/leizongmin/tinyliquid).

Here's an example structure:

```sh
├── package.json
├── src
│   ├── data
│       ├── site.yaml
│       ├── projects.json
│   ├── assets
│       ├── sass
│       ├── img
│       ├── fonts
│       ├── js
│           ├── index.js
│   ├── index.md
│   ├── pages
│       ├── about.md
│   └── posts
│       ├── 2016-08-25-how-to-use-metalpress.md
├── templates
│   ├── _includes
│       ├── header.liquid
│       ├── footer.liquid
│   └── _layouts
│       ├── home.liquid
```


### CLI Usage

#### Install CLI

```sh
npm install metalpress-cli -g
```

#### Initialize a New Project

> Prompts a series of questions and creates a new `.metalpress` config.

```sh
metalpress init
```

#### Start a Browser-sync Server

> Serve the project on automatically assigned browser-sync port. (default: http://localhost:3000)

```
metalpress serve
```

#### Deploy a Project

To deploy your site, you'll need to have your `aws.json` set up. It includes:

```
{
  "key":"AWS_ACCESS_KEY_HERE",
  "secret":"AWS_SECRET_KEY_HERE",
  "stagingBucket":"staging.example.com",
  "productionBucket":"example.com"
}
```

> Deploy a `dist` and deployed to AWS S3.

*Staging*
```
metalpress deploy
```

*Production*
```
metalpress deploy -p
```
<commit_msg>docs(read): update installation<commit_after># metalpress-cli

CLI for Metalpress (Official)

## Structure and Templating

metalpress works from a specific directory structure. It contains a `templates` and `src` directory. Within the src directory it will load data from `data` as `yaml` or `json` files. You can create folders for collections and use markdown files for pages. You should store all assets in `assets`.

For templating, metalpress uses liquid. You can learn more about the [syntax here](https://github.com/leizongmin/tinyliquid).

Here's an example structure:

```sh
├── package.json
├── src
│   ├── data
│       ├── site.yaml
│       ├── projects.json
│   ├── assets
│       ├── sass
│       ├── img
│       ├── fonts
│       ├── js
│           ├── index.js
│   ├── index.md
│   ├── pages
│       ├── about.md
│   └── posts
│       ├── 2016-08-25-how-to-use-metalpress.md
├── templates
│   ├── _includes
│       ├── header.liquid
│       ├── footer.liquid
│   └── _layouts
│       ├── home.liquid
```


### Installation

```sh
npm install metalpress-cli -g
```


### CLI Usage

#### Initialize a New Project

> Prompts a series of questions and creates a new `.metalpress` config.

```sh
metalpress init
```

#### Start a Browser-sync Server

> Serve the project on automatically assigned browser-sync port. (default: http://localhost:3000)

```
metalpress serve
```

#### Deploy a Project

To deploy your site, you'll need to have your `aws.json` set up. It includes:

```
{
  "key":"AWS_ACCESS_KEY_HERE",
  "secret":"AWS_SECRET_KEY_HERE",
  "stagingBucket":"staging.example.com",
  "productionBucket":"example.com"
}
```

> Deploy a `dist` and deployed to AWS S3.

*Staging*
```
metalpress deploy
```

*Production*
```
metalpress deploy -p
```

{'fraction_non_alphanumeric': 0.15161014534055287, 'fraction_numerical': 0.007409518381305215, 'mean_word_length': 3.3279901356350186, 'pattern_counts': {'":': 8, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 2, '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': '5744031', 'n_tokens_mistral': 1250, 'n_tokens_neox': 1201, 'n_words': 435}