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

@zhaoke2021/antom-dashboard-cli

v2.1.0

Published

Antom商户门户注册操作命令行工具(演示版)

Readme

Antom Dashboard CLI

Antom商户门户命令行工具(演示版)

简介

antom-dashboard-cli 是一个用于演示Antom商户门户注册和操作流程的命令行工具。该工具模拟了完整的商户注册、KYB认证和收款链接创建流程,所有功能均为mock实现,无需真实连接后端服务。

安装

通过NPM安装(推荐)

npm install -g antom-dashboard-cli

本地开发安装

# 克隆仓库
git clone <repository-url>
cd antom-dashboard-cli

# 安装依赖
npm install

# 构建项目
npm run build

# 本地链接
npm link

系统要求

  • Node.js >= 18.0.0
  • npm >= 9.0.0

使用指南

1. 连接到商户门户(授权)

首次使用前,需要完成OAuth授权:

antom-dashboard-cli connect

该命令会:

  1. 启动本地授权服务器(默认端口3000)
  2. 自动打开浏览器访问授权页面
  3. 等待用户在浏览器中完成授权
  4. 保存授权信息到本地(~/.antom-cli/auth.json

2. 查看状态

检查当前CLI状态:

antom-dashboard-cli status

输出信息包括:

  • 账号绑定状态
  • 商户ID
  • 授权时间
  • KYB认证状态
  • 收款链接统计

3. 查询KYB表单

获取KYB认证所需的表单配置:

# JSON格式输出(默认)
antom-dashboard-cli kyb-query

# 表格格式输出
antom-dashboard-cli kyb-query --format table

4. 提交KYB表单

提交KYB认证表单:

antom-dashboard-cli kyb-submit '{
  "companyName": "测试公司有限公司",
  "businessLicense": "91310000XXXXXXXXXX",
  "businessType": "ecommerce",
  "registeredAddress": "上海市浦东新区XX路XX号",
  "contactName": "张三",
  "contactEmail": "[email protected]",
  "contactPhone": "13800138000",
  "businessScope": "电子商务",
  "estimatedMonthlyVolume": 50000,
  "websiteUrl": "https://example.com"
}'

5. 创建收款链接

创建收款链接:

antom-dashboard-cli create-payment-link \
  --amount 100 \
  --currency USD \
  --product "测试商品"

参数说明:

  • --amount (必需): 收款金额
  • --currency (必需): 币种(支持: USD, EUR, CNY, JPY, GBP, AUD, CAD)
  • --product (可选): 商品名称

数据存储

所有数据存储在用户主目录的 .antom-cli 目录下:

~/.antom-cli/
├── auth.json           # 授权信息
├── kyb.json            # KYB认证数据
└── payment-links.json  # 收款链接记录

常见问题

Q: 如何清除授权信息?

rm ~/.antom-cli/auth.json

Q: 如何重新提交KYB表单?

# 先清除现有KYB数据
rm ~/.antom-cli/kyb.json

# 然后重新提交
antom-dashboard-cli kyb-submit '{...}'

Q: 端口3000被占用怎么办?

目前版本暂不支持自定义端口,请确保端口3000未被占用。

Q: 如何查看所有命令?

antom-dashboard-cli --help

开发

项目结构

antom-dashboard-cli/
├── src/
│   ├── commands/       # CLI命令实现
│   ├── services/       # 核心服务
│   ├── config/         # 配置文件
│   ├── utils/          # 工具函数
│   └── index.ts        # CLI入口
├── templates/          # HTML模板
├── package.json
├── tsconfig.json
└── README.md

可用脚本

# 开发模式(监听文件变化)
npm run dev

# 构建项目
npm run build

# 启动CLI
npm start

技术栈

  • 运行环境: Node.js + TypeScript
  • CLI框架: Commander.js
  • 构建工具: tsup
  • 授权方式: 模拟OAuth 2.0

注意事项

⚠️ 重要提示: 本工具仅用于演示目的,所有功能均为mock实现,不涉及真实的商户门户系统。请勿用于生产环境。

许可证

MIT License

联系方式

如有问题或建议,请联系开发团队。