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

emoment-cli

v0.1.0

Published

Local CLI generated from the emoment OpenAPI swagger.

Readme

emoment-cli

本地 npm/TypeScript CLI,用于从 emoment Swagger/OpenAPI 生成命令并调用接口。

完整使用说明见:docs/emoment-cli-usage.md

Windows CMD 可直接复制的命令见:docs/cmd-copy-commands.md

创建活动、创建 Zoom 会议并添加参会人的 demo 见:docs/demo-create-zoom-meeting.md

快速开始

npm install
npm run generate
npm run build
npm link
emoment --help

开发阶段可以不 build,直接运行:

npm run dev -- --help
npm run dev -- info

生成命令

默认从线上 Swagger 生成:

npm run generate

也可以单独生成 emoment:

npm run generate:emoment

调用示例

所有 Swagger 接口按如下规则映射:

emoment <tag> <action> [options]

示例:

emoment authentication access-token --body-json "{\"app_id\":\"xxx\",\"secret\":\"yyy\"}" --dry-run
emoment event get-event --evt-id 123 --dry-run

Windows PowerShell 调用原生命令时可能会吃掉 JSON 里的双引号,推荐使用文件传 body:

emoment authentication access-token --body-file ./examples/auth-body.example.json --dry-run

有请求体的接口统一支持:

--body-json "{\"key\":\"value\"}"
--body-file ./body.json
--body-field key=value

Windows CMD 里推荐用 --body-field,不用处理 JSON 引号:

emoment session get-meeting-list --body-field page_index=1 --body-field page_size=20 --body-field is_all=false

认证

可以直接传 token:

emoment event get-event --evt-id 123 --token "xxx"

或使用环境变量:

set EMOMENT_TOKEN=xxx
emoment event get-event --evt-id 123

也可以尝试登录并保存 token:

emoment auth login --appid app_xxx --secret sec_xxx

手机号密码登录。可以直接运行后按提示输入手机号和密码:

emoment auth phone-login

也可以非交互传参:

emoment auth phone-login --phone "<phone>" --password "<password>"

普通接口会优先使用本地保存的 token。没有 token 时,如果当前是可交互终端,会提示登录并保存 token;非交互环境请先执行 emoment auth phone-login --phone <phone> --password <password>

emoment auth phone-login
emoment session get-meeting-list --body-field page_index=1 --body-field page_size=20 --body-field is_all=false

如果后端返回的 token 字段无法自动识别,可以继续用 --tokenEMOMENT_TOKEN

后端实际使用的是 Token 请求头,CLI 会自动把保存的 session_key 放到 Token header 里。

常用脚本

npm run generate
npm run build
npm run check
npm test