npm package: @incpad/incpad-ms-cli
Description: client for incpad team
Latest version: 1.0.14

<h1 align="center">Welcome to @incpad/incpad-ms-cli 👋</h1>
<p>
  <img alt="Version" src="https://img.shields.io/npm/v/@incpad/incpad-ms-cli.svg">
</p>

> client for incpad team

## Install

```sh
yarn global add @incpad/incpad-ms-cli
```

## Usage

```sh
incpadMS -h
```



### Init

* If you are a developer to develop a new service, you should init a empty service project with blow command:

  ```bash
  incpadMS init <projectName>
  ```

​		and you can get help with ```-h```  option:

```bash
incpadMS init -h
```

​		and it will output:

```bash
Usage: init [options] <name>

Options:
  --sentry-token <sentryToken>  specific the sentry project token
  --without-dep                 do not install dependence
  -t,--template                 init with template
  -b,--branch [branch]          branch of git repo
  -h, --help                    output usage information
```

* `--sentry-token` option can config the token of this project
* `--without-dep` option allow it init but will not install the dependence
* `-b` option can specific the branch of target repo
* `-t` option can init with exist template, not for new service developer



* If you are a service user, you can fork a template service peoject with bellow command:

* ```bash
  incpadMS init -t <projectName>
  ```

  

### credentials

​	You can use this cli to config your aws credentials

```bash
incpadMS credentials -h
```

​	and it will output:

```bash
Usage: credentials [options]

Options:
  -k,--key [key]                    the aws_access_key_id
  -s,--secret [secret]             the aws_secret_access_key
  -n,--profile-name [profileName]  the name of the profile which should be created
  -h, --help                       output usage information
```

​	just same as aws client



### deploy

​	You can easily deploy the project to aws serverless:

```bash
incpadMS deploy -h
```



```bash
Usage: deploy [options] [profile]

Options:
  -h, --help  output usage information
```

​	there is no any other config options, you just need pass you profile name with come from `incpadMS credentials -n [profileName]`



### error manager

​	You can manage you error code and error info with this command

```bash
incpadMS error -h
```

```bash
Usage: error [options]

Options:
  -l,--list                          list all local errors
  -p,--target-path [targetName]      error instance dir
  -c,--create-error [createError]    create a new error
  -t,--template-path [templatePath]  template dir
  -h, --help                         output usage information
```

* `-l` option will list all error defines in this project
* `-p` option just specific the error dir path, default `./src/error/`
* `-c` option just means you want to create a new error, new error will use the template from `-t` option
* `-t` option just specific the template file where the error template come from, default `./template/Errors.js.tpl`

## Author

👤 **incpad**

* Github: [@tankanglu](https://github.com/tankanglu)

## Show your support

Give a ⭐️ if this project helped you!

***
_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_