<p align="center">
  <img src="http://file.blueanchor.io/index.php/apps/files_sharing/ajax/publicpreview.php?x=3360&y=1134&a=true&file=Caporl%2520Logo.png&t=GN2P3t5MmFShh14&scalingup=0" width="650"/>
</p>

## Caporl CLI (aka fcs / First Class Soldier)
### CLI for Caporl applications based on the [Vorpal](http://http://vorpal.js.org/) immersive command-line.

<!-- Badges section here. -->
[![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)
[![Caretaker](https://img.shields.io/badge/caretaker-materasu-blue.svg)](https://github.com/materasu)

## Table of Contents

* [Installation](#installation)
* [Usage](#usage)
* [Autocomplete and direct call](#autocomplete-and-direct-call)
* [Generating and serving a Caporl project](#generating-and-serving-a-caporl-project)
* [Availabled commandes](#availabled-commands)
* [Updating](#updating)
* [Contributing](#contributing)
* [License](#license)

## Installation

```bash
npm install -g @caporl/cli
```

## Usage

You can access `fcs` wherever you want, with the command

```bash
fcs
```

You will enter in the FCS mode, on the folder of your native cli, and you can get help with

```bash
caporl [your-actual-path] help
```

Beware, if you are not in a caporl project folder, you will only be able to use the project create command.

## Autocomplete and direct call

You want to use command directly, without enter the fcs mode? yes you can!

It's just simple as typing a command, try to test

```bash
fcs help
```

To facilitate your work with Caporl over fcs, we given you the abaility to install the autocomplete of commands, just do :

```bash
fcs --install-autocomplete
```

Don't forget to reload your terminal or just `source ~/.zshrc` (`.bashrc` for bash)

## Generating and serving a Caporl project

```bash
caporl [your-actual-path] create:project MyApp
caporl [your-actual-path/MyApp] start:dev
```

Navigate to [http://localhost:4200/](http://localhost:4200/) for the `front`.

Navigate to [http://localhost:3333/](http://localhost:3333/) for the `api`.

Both apps will automatically reload if you change any of the source files.

## Availabled commands

You can find all possible commands in the table below

Command | Usage
--- | ---
[Create new project](https://github.com/caporl/cli/wiki/create-project) | `create:project [name]`
[Add a project part](https://github.com/caporl/cli/wiki/add-part) | `add:part (model, page, service) [name]`
[Start dev server](https://github.com/caporl/cli/wiki/start-dev) | `start:dev --front --back`

## Updating

To update Caporl CLI to a new version, you must update both the global package and your project's local package.

## Contributing

First of all, we recommand you to generate the doc with `node_modules/documentation/bin/documentation.js build bin/fcs -f html -o docs`.
You can check our issues, and contribute to our Schematics.
We follow a git flow workflow, and trying to make cross reviews.

## License

MIT
