# @yakies/cli

> yakies命令行工具, 构建widget时，请执行pnpm run dev --filter

Latest version **1.4.2** (published 2026-01-15) · ISC license · 0 weekly downloads

## Install

```sh
npm install @yakies/cli
pnpm add @yakies/cli
yarn add @yakies/cli
bun add @yakies/cli
```

Provides the command `ya`.

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.4.2 |
| Published | 2026-01-15 |
| First published | 2021-12-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >12.0 |
| Dependencies | 75 |
| Unpacked size | 1.6 MB |
| Known vulnerabilities | 0 (+16 in 3 direct dependencies) |
| Install scripts | no |
| Author | chumahtung |
| Maintainers | chumahtung |

## Links

- npm: https://www.npmjs.com/package/@yakies/cli
- npm.io page: https://npm.io/package/@yakies/cli

## Dependencies (75)

- [nan](https://npm.io/package/nan.md) ^2.22.2
- [ora](https://npm.io/package/ora.md) ^3.4.0
- [cors](https://npm.io/package/cors.md) ^2.8.5
- [vite](https://npm.io/package/vite.md) ^3.2.11
- [axios](https://npm.io/package/axios.md) ^1.8.4
- [chalk](https://npm.io/package/chalk.md) ^4.1.2
- [execa](https://npm.io/package/execa.md) ^9.5.2
- [tslib](https://npm.io/package/tslib.md) ^2.8.1
- [vtils](https://npm.io/package/vtils.md) ^4.130.1
- [yargs](https://npm.io/package/yargs.md) ^17.7.2
- [contra](https://npm.io/package/contra.md) ^1.9.4
- [dev-ip](https://npm.io/package/dev-ip.md) ^1.0.1
- [jquery](https://npm.io/package/jquery.md) ^3.7.1
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [log4js](https://npm.io/package/log4js.md) ^6.9.1
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.6
- [morgan](https://npm.io/package/morgan.md) ^1.10.0
- [opener](https://npm.io/package/opener.md) ^1.5.2
- [rimraf](https://npm.io/package/rimraf.md) ^2.7.1
- [cheerio](https://npm.io/package/cheerio.md) ^1.0.0
- [consola](https://npm.io/package/consola.md) ^2.15.3
- [crawler](https://npm.io/package/crawler.md) ^1.5.0
- [express](https://npm.io/package/express.md) ^4.21.2
- [js-yaml](https://npm.io/package/js-yaml.md) ^4.1.0
- [liftoff](https://npm.io/package/liftoff.md) ^3.1.0
- [pdf2pic](https://npm.io/package/pdf2pic.md) ^1.4.0
- [prompts](https://npm.io/package/prompts.md) ^2.4.2
- [walk-up](https://npm.io/package/walk-up.md) ^1.0.2
- [chokidar](https://npm.io/package/chokidar.md) ^3.6.0
- [copy-dir](https://npm.io/package/copy-dir.md) ^0.3.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^5.0.0
- [json2css](https://npm.io/package/json2css.md) ^5.2.2
- [kolorist](https://npm.io/package/kolorist.md) ^1.8.0
- [minimist](https://npm.io/package/minimist.md) ^1.2.8
- [readjson](https://npm.io/package/readjson.md) ^2.2.2
- [form-data](https://npm.io/package/form-data.md) ^4.0.2
- [keymirror](https://npm.io/package/keymirror.md) ^0.1.1
- [minimatch](https://npm.io/package/minimatch.md) ^10.0.3
- [node-gzip](https://npm.io/package/node-gzip.md) ^1.1.2
- [requirejs](https://npm.io/package/requirejs.md) ^2.3.7
- [base64-img](https://npm.io/package/base64-img.md) ^1.0.4
- [fast-proxy](https://npm.io/package/fast-proxy.md) ^2.2.0
- [node-fetch](https://npm.io/package/node-fetch.md) ^3.3.2
- [picocolors](https://npm.io/package/picocolors.md) ^1.1.1
- [portfinder](https://npm.io/package/portfinder.md) ^1.0.35
- [selfsigned](https://npm.io/package/selfsigned.md) ^2.4.1
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.26.10
- [axios-extra](https://npm.io/package/axios-extra.md) 0.0.5
- [body-parser](https://npm.io/package/body-parser.md) ^1.20.3
- [compression](https://npm.io/package/compression.md) ^1.8.0
- [cross-spawn](https://npm.io/package/cross-spawn.md) ^7.0.6
- [eazy-logger](https://npm.io/package/eazy-logger.md) ^3.1.0
- [extract-zip](https://npm.io/package/extract-zip.md) ^2.0.1
- [http-server](https://npm.io/package/http-server.md) ^14.1.1
- [browser-sync](https://npm.io/package/browser-sync.md) 3.0.2
- [query-string](https://npm.io/package/query-string.md) ^6.14.1
- [svg2png-wasm](https://npm.io/package/svg2png-wasm.md) ^1.4.1
- [@octokit/core](https://npm.io/package/@octokit/core.md) ^4.2.4
- [inline-source](https://npm.io/package/inline-source.md) ^6.2.0
- [unicorn-magic](https://npm.io/package/unicorn-magic.md) ^0.3.0
- [@yakies/mkcert](https://npm.io/package/@yakies/mkcert.md) ^0.2.2
- [@gitbeaker/node](https://npm.io/package/@gitbeaker/node.md) ^34.7.0
- [stream-throttle](https://npm.io/package/stream-throttle.md) ^0.1.3
- [node-cmd-promise](https://npm.io/package/node-cmd-promise.md) ^1.0.0
- [node-html-parser](https://npm.io/package/node-html-parser.md) ^1.4.9
- [node-rtsp-stream](https://npm.io/package/node-rtsp-stream.md) ^0.0.9
- [ssh2-sftp-client](https://npm.io/package/ssh2-sftp-client.md) ^11.0.0
- [yapi-to-typescript](https://npm.io/package/yapi-to-typescript.md) ^3.38.0
- [@yakies/shared-utils](https://npm.io/package/@yakies/shared-utils.md) ^1.1.0
- [http-proxy-middleware](https://npm.io/package/http-proxy-middleware.md) ^3.0.3
- [javascript-obfuscator](https://npm.io/package/javascript-obfuscator.md) ^0.18.8
- [axios-header-interceptor](https://npm.io/package/axios-header-interceptor.md) ^1.0.1
- [node-request-interceptor](https://npm.io/package/node-request-interceptor.md) ^0.6.3
- [@yakies/proxy-cache-middleware](https://npm.io/package/@yakies/proxy-cache-middleware.md) ^1.0.1
- [@babel/plugin-transform-modules-commonjs](https://npm.io/package/@babel/plugin-transform-modules-commonjs.md) ^7.26.3

## Recent versions

- 1.4.2 (latest) — 2026-01-15
- 1.4.1 — 2025-12-22
- 1.4.0 — 2025-12-18
- 1.3.24 — 2025-11-23
- 1.3.19 — 2025-10-04
- 1.3.18 — 2025-09-19
- 1.3.17 — 2025-09-17
- 1.3.16 — 2025-09-12
- 1.3.15 — 2025-09-10
- 1.3.11 — 2025-09-08
- 1.3.9 — 2025-08-27
- 1.3.8 — 2025-08-27
- 1.3.7 — 2025-08-25
- 1.2.14 — 2025-06-25
- 1.1.9 — 2024-09-14
- … 7 more at https://npm.io/package/@yakies/cli/versions

## README

前端开发实用工具集

### Usage

yarn global add @yakies/cli  
运行`ya`命令

### Options

#### 核心功能：

启动一个代理服务器，基本原理可以参考[一个支持热更新的上游服务自动代理程序](https://juejin.cn/post/7136485471194087455)

#### 附加功能:

命令参数

- --bs, 同时启动`browser-sync`,可以实现 css 的热替换，给 UI 添加网格等辅助功能
- exec [widget], 启动内置插件脚本

#### 配置文件

.yarc.ts

````js
export default {
  useHttps: true,
  httpProxy: [
    {
      target: 'http://localhost:8080/',
    },
  ],
  ytt: [
    {
      name: 'moduleName'
      serverUrl,
      serverType: 'swagger',
      outputDir: `path/to/generated/moduleName`,
      overwriteRequestFile: false,
      projects: [
        {
          token: '',
          categories: [
            {
              id: 0,
              prefix: /\/api\/xxx/,
              prefixReserve: false,
            },
          ],
        },
      ],
    }
  ],
}```

mock/server.conf

```conf
# 后端接口代理，精细化控制，可使用正则表达式
proxy ^/api/user(.*?)$ http://user.domain/$1
# 接口返回数据mock
rewrite /path/to/api /mock/answer.json
````

#### 编译

使用`ya`命令实现自动化的构建，因为使用 rollup 一次性打包所有插件会出现堆栈溢出，所以使用 runNpmTask 脚本实现对插件的逐个打包

```shell
npm run dev --filter <widgetName>
```

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