# cain-cli

> a tool to generate projects from git or gitlab

Latest version **2.0.3** (published 2018-04-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install cain-cli
pnpm add cain-cli
yarn add cain-cli
bun add cain-cli
```

Provides the command `cain`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.3 |
| Published | 2018-04-26 |
| First published | 2018-04-25 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 17 |
| Unpacked size | 19.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | xielei |
| Maintainers | james-cain |
| Keywords | javascript, nodejs, cli |

## Links

- npm: https://www.npmjs.com/package/cain-cli
- Repository: https://github.com/james-cain/cain-cli
- Homepage: https://github.com/james-cain/cain-cli#readme
- Issues: https://github.com/james-cain/cain-cli/issues
- npm.io page: https://npm.io/package/cain-cli

## Dependencies (17)

- [ora](https://npm.io/package/ora.md) ^1.3.0
- [async](https://npm.io/package/async.md) ^2.5.0
- [chalk](https://npm.io/package/chalk.md) ^2.2.0
- [rimraf](https://npm.io/package/rimraf.md) ^2.6.2
- [tildify](https://npm.io/package/tildify.md) ^1.2.0
- [inquirer](https://npm.io/package/inquirer.md) ^3.3.0
- [cli-table](https://npm.io/package/cli-table.md) ^0.3.1
- [commander](https://npm.io/package/commander.md) ^2.11.0
- [minimatch](https://npm.io/package/minimatch.md) ^3.0.4
- [user-home](https://npm.io/package/user-home.md) ^2.0.0
- [handlebars](https://npm.io/package/handlebars.md) ^4.0.11
- [metalsmith](https://npm.io/package/metalsmith.md) ^2.3.0
- [multimatch](https://npm.io/package/multimatch.md) ^2.1.0
- [consolidate](https://npm.io/package/consolidate.md) ^0.14.5
- [read-metadata](https://npm.io/package/read-metadata.md) ^1.0.0
- [download-git-repo](https://npm.io/package/download-git-repo.md) ^1.0.1
- [validate-npm-package-name](https://npm.io/package/validate-npm-package-name.md) ^3.0.0

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 2.0.3 (latest) — 2018-04-26
- 2.0.1 — 2018-04-26
- 2.0.0 — 2018-04-25
- 1.0.1 — 2018-04-25
- 1.0.0 — 2018-04-25

## README

# cain-cli
#### 该工具实现对gitlab和github模板项目的统一下载并创建新项目

使用步骤很简单

首先本地环境要有nodejs的环境，并配置npm intall -g全局安装的目录位置

到node官网中[下载](https://nodejs.org/en/)，路径可以自己指定，安装完成后，在命令行窗口中执行命令

```
node -v

npm -v
```

有出现版本号即安装成功

接着安装该项目到本地

```
npm install cain-cli -g
```

当运行cain出现help信息，即安装成功！

接下来介绍命令列表

cain 后可带命令参数

- init <template-name> [project-name]根据模版生成一个新工程
- add 增加一个新模版配置信息，提供查阅
- list 提供查询已经有的模版信息
- delete 删除模版信息
- help 查看命令信息

其中 init 命令后带参数

- <template-name> 模板名，格式为owner/name，若安装的是我的目录的模板，可以直接输入name
- [project-name] 工程项目名，保存在当前的目录内，若不填该参数，则在当前目录之间创建模版内容，建议必填
- -c or --clone 代表克隆的仓库来自gitlab，内置的gitlab仓库写死gitlab仓库地址，不填下载的为github仓库模版
- -h or --help 查看cain init 命令信息

目前模板已经有

[cain-template-webpack-vue/PC端后台开发模板/](https://github.com/james-cain/cain-template-webpack-vue)

长远考虑，可以提供更多的开发模板使用，也可以继续完善该脚本功能。

The end~

---
_Source: https://npm.io/package/cain-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
