# deployment-cli

> A frontend deployment tool base on ssh2

Latest version **0.2.0** (published 2019-12-19) · MIT license · 0 weekly downloads

## Install

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

Provides the command `deployment-cli`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2019-12-19 |
| First published | 2019-05-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 7.6.0 |
| Dependencies | 6 |
| Unpacked size | 34.3 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Liang Shen |
| Maintainers | shenliangv |
| Keywords | deploy, deployment-tool, sftp-deploy, frontend |

## Links

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

## Dependencies (6)

- [del](https://npm.io/package/del.md) ^4.1.1
- [ssh2](https://npm.io/package/ssh2.md) ^0.8.4
- [chalk](https://npm.io/package/chalk.md) ^2.4.2
- [archiver](https://npm.io/package/archiver.md) ^3.0.0
- [inquirer](https://npm.io/package/inquirer.md) ^6.3.1
- [commander](https://npm.io/package/commander.md) ^2.20.0

## Recent versions

- 0.2.0 (latest) — 2019-12-19
- 0.1.3 — 2019-09-03
- 0.1.2 — 2019-09-03
- 0.1.1 — 2019-06-20
- 0.1.0 — 2019-05-22
- 0.0.1 — 2019-05-20

## README

A frontend deployment tool base on [ssh2](https://github.com/mscdex/ssh2)

## Getting Started

```sh
npm i -D deployment-cli

npx deployment-cli --config "path/to/configuration/file"
```

or

```sh
npm i -g deployment-cli

deployment-cli --config "path/to/configuration/file"
```

## Usage

```sh
deployment-cli [options]

Options:
  -V, --version        output the version number
  -C, --config <path>  configuration file path
  -h, --help           output usage information
```

## Configuration file

```js
// example deploy.config.js
module.exports = {
  repository: {
    // local: true,
    type: 'git',
    url: 'https://git.dev.tencent.com/cyxuan0926/prison-web.git',
    branch: 'master'
  },

  buildConfig: {
    commands: ['npm ci', 'npm run build:test'],
    outputDir: 'dist',
    assetsPatterns: ['static', 'index.html']
  },

  remoteOperatesConfig: {
    remotePath: '/root/deployment-cli-test'
  },

  connectConfig: {
    host: '192.168.0.114',
    port: 22,
    username: 'root',
    password: '123456',
    // privateKey: require('fs').readFileSync('/here/is/my/key')
  }
}
```

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