# @tnnevol/deploy

> 部署工具

Latest version **5.2.9** (published 2025-10-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install @tnnevol/deploy
pnpm add @tnnevol/deploy
yarn add @tnnevol/deploy
bun add @tnnevol/deploy
```

Provides the command `deploy`.

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 5.2.9 |
| Published | 2025-10-31 |
| First published | 2023-07-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 11 |
| Unpacked size | 14.8 KB |
| Known vulnerabilities | 0 (+4 in 1 direct dependencies) |
| Install scripts | no |
| Author | batter-vae |
| Maintainers | better-vae |
| Keywords | deploy |

## Links

- npm: https://www.npmjs.com/package/@tnnevol/deploy
- Repository: git@gitee.com:tnnevol/tnnevol_tools
- npm.io page: https://npm.io/package/@tnnevol/deploy

## Dependencies (11)

- [ora](https://npm.io/package/ora.md) ^5.1.0
- [chalk](https://npm.io/package/chalk.md) ^4.1.0
- [dayjs](https://npm.io/package/dayjs.md) ^1.11.9
- [dedent](https://npm.io/package/dedent.md) ^0.7.0
- [nanoid](https://npm.io/package/nanoid.md) ^4.0.1
- [archiver](https://npm.io/package/archiver.md) ^5.3.1
- [inquirer](https://npm.io/package/inquirer.md) ^8.1.1
- [node-ssh](https://npm.io/package/node-ssh.md) ^11.0.0
- [crypto-js](https://npm.io/package/crypto-js.md) ^4.1.1
- [tasksfile](https://npm.io/package/tasksfile.md) ^5.1.1
- [@tnnevol/register-cli](https://npm.io/package/@tnnevol/register-cli.md) 5.2.9

## Recent versions

- 5.2.9 (latest) — 2025-10-31
- 5.2.8 — 2025-10-15
- 5.2.7 — 2025-10-15
- 5.2.6 — 2025-10-15
- 5.2.5 — 2025-10-15
- 5.2.5-beta.7 — 2024-11-24
- 5.2.5-beta.6 — 2024-11-24
- 5.2.5-beta.5 — 2024-11-24
- 5.2.5-beta.4 — 2024-08-21
- 5.2.5-beta.3 — 2024-08-20
- 5.2.4 — 2024-08-20
- 5.2.3 — 2024-08-20
- 5.2.2 — 2024-08-20
- 5.2.1 — 2024-08-19
- 5.2.0 — 2024-08-12
- … 7 more at https://npm.io/package/@tnnevol/deploy/versions

## README

# @tnnevol/deploy

## 注：
不想写核心部分了，对 [deploy-cli-service](https://github.com/fuchengwei/deploy-cli-service) 项目的v1.3.0进行了一些改动，特注于此。如有版权问题，可随时改动。(主要项目不想使用私钥并且密码不想明文😢)

## 安装

```shell
# npm global
npm i @tnnevol/deploy -g
# or dev
npm i @tnnevol/deploy -D
```

## 使用

```shell
npx deploy --help

# 初始化
npx deploy init

# 对新的文案进行加密
npx deploy encryption

# 部署 env 的值对应 配置文件 serverConfig 中的 key
npx deploy publish --env=test
```

## 配置文件

配置文件生成后，请将 `cryptoKey` 和 `cryptoIv`，存放到其他文件并且该文件不要提交到线上。

```javascript
const { cryptoKey, cryptoIv } = require("./.key");
module.exports = {
  projectName: "@examples/deploy",
  cryptoKey,
  cryptoIv,
  serverConfig: {
    test: {
      name: "test",
      script: "npm run build",
      host: "0.0.0.0",
      port: 22,
      username: "666",
      password: "999",
      distPath: "dist",
      webDir: "/www/99/66",
      bakDir: "",
      isRemoveRemoteFile: false,
      isRemoveLocalFile: true
    }
  }
};

```

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