npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@listenfeng/mw-auto-cli

v1.1.3

Published

Multi-instance Auto Deploy CLI - Create and manage deployment flows across multiple Auto instances

Readme

@listenfeng/mw-auto-cli

多实例自动化部署 CLI 工具,聚焦项目流程创建与部署管理。

安装

npm install -g @listenfeng/mw-auto-cli

快速开始

1. 创建配置文件

mkdir -p ~/.mw-auto-cli

创建 ~/.mw-auto-cli/auto-config.json

{
  "defaults": {
    "user": "your_phone_number",
    "password": "${AUTO_PASSWORD}"
  },
  "instances": {
    "auto": {
      "baseUrl": "http://your-auto-deploy-server.com",
      "desc": "自动化部署系统"
    }
  }
}

2. 设置密码环境变量

# Windows
setx AUTO_PASSWORD "your_password"

# Linux/Mac
echo 'export AUTO_PASSWORD="your_password"' >> ~/.bashrc && source ~/.bashrc

3. 登录

auto-cli login auto

4. 使用

# 查看项目列表
auto-cli list_projects auto

# 查看项目可用模板
auto-cli list_templates auto 2367

# 创建部署流程(默认构建+测试两个阶段)
auto-cli add_flow auto 5265 2367 --branch master

# 创建部署流程(构建+测试+生产,带版本号)
auto-cli add_flow auto 5265 2367 --branch master --step 21 --version "v1.0.0"

# 触发测试阶段部署
auto-cli deploy auto 12345 --step 4

# 查看流程详情
auto-cli flow_detail auto 12345

命令列表

| 命令 | 参数 | 说明 | |------|------|------| | login | <instance> [--user USER] [--password PWD] | 登录并缓存 token | | user_info | <instance> | 获取当前用户信息 | | list_instances | 无 | 列出所有已配置实例 | | list_projects | <instance> [--page N] [--size N] | 项目列表(分页) | | project_status | <instance> <projectId> | 项目区域/服务器状态 | | list_templates | <instance> <projectId> | 项目可用模板 | | template_info | <instance> <templateId> | 模板详情 | | search | <instance> <keyword> [--project-id N] | 按仓库地址/模板名搜索模板 | | list_flows | <instance> --project-id N --template-id N | 流程列表 | | add_flow | <instance> <templateId> <projectId> --branch NAME [--step N] [--version TEXT] | 创建部署流程 | | start_flow | <instance> <flowId> | 启动流程 | | deploy | <instance> <flowId> --step N [--env N] [--zone NAME] | 触发阶段部署 | | latest_flow | <instance> <templateId> <projectId> | 最新流程状态 | | flow_detail | <instance> <flowId> | 流程子任务详情 |

配置说明

  • defaults — 公共默认值,每个实例自动继承
  • instances — 实例列表,每个实例可覆盖 defaults 中的任意字段
  • ${AUTO_PASSWORD} — 环境变量占位符,运行时自动替换

实例级覆盖示例(独立账号):

"staging": {
  "baseUrl": "http://your-staging-server.com",
  "user": "staging_user",
  "password": "${STAGING_AUTO_PWD}",
  "desc": "预发环境"
}

配置文件查找优先级

  1. 环境变量 AUTO_CLI_CONFIG 指定路径
  2. ~/.mw-auto-cli/auto-config.json(推荐)
  3. 当前工作目录 auto-config.json

典型部署流程

# 1. 登录
auto-cli login auto

# 2. 查看项目,找到项目 ID
auto-cli list_projects auto

# 3. 查看可用模板
auto-cli list_templates auto <projectId>

# 4. 创建部署流程(默认走构建+测试)
auto-cli add_flow auto <templateId> <projectId> --branch release_test

# 5. 构建完成后,触发测试环境部署
auto-cli deploy auto <flowId> --step 4

# 6. 查看流程执行详情
auto-cli flow_detail auto <flowId>

阶段参数说明

--step 使用位掩码组合(创建流程时)或单个阶段值(部署时):

| 阶段 | 位值 | deploy 命令用法 | |------|------|----------------| | 构建 | 1 | 由 add_flow 自动触发 | | 开发 | 2 | deploy --step 2 | | 测试 | 4 | deploy --step 4 | | UAT | 8 | deploy --step 8 | | 堡垒 | 16 | deploy --step 16 | | 生产 | 32 | deploy --step 32 |

创建流程时组合示例:--step 5(1+4=构建+测试)、--step 21(1+4+16=构建+测试+堡垒)

环境要求

  • Node.js >= 14