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

simple-event-cli

v0.5.2

Published

Simple Event 活动管理系统 CLI — 活动配置、销售渠道、报奖系统、CMS 内容管理

Downloads

1,658

Readme

Simple Event CLI

Simple Event 活动管理系统命令行工具,用于管理活动配置、销售渠道、报奖系统、CMS 内容和自定义页面。

功能

  • 活动配置管理 — 活动 CRUD、场次、票种、票种-场次绑定、批量折扣、核验通道、活动全貌树形展示
  • 销售渠道管理 — 渠道 CRUD(租户全局资源,用于销售跟踪和票种可见性控制)
  • 报奖系统管理 — 届次、分组、奖项、轮次、表单配置、身份模板、评委、评分、作品
  • CMS 内容管理 — 内容类型、分类(含树形)、内容条目、批量导入
  • 自定义页面管理 — 页面 CRUD、组件 Schema 查询,支持 Puck JSON 格式
  • 图片上传 — 批量上传图片到 CDN,返回 URL(支持 jpg/png/gif/webp)
  • 多环境支持 — 通过配置文件或环境变量切换不同环境
  • 灵活输出 — 表格(默认)和 JSON 两种输出格式,方便人工查看和程序化调用

安装

npm install -g simple-event-cli

快速开始

# 1. 初始化配置(输入 Server URL、API Key、API Secret)
se init

# 2. 验证连接
se whoami

# 3. 查看活动全貌
se events tree <activity-id>

# 4. 查看比赛结构
se awards tree <session-id>

# 5. 查看内容树形结构
se content items tree <type-id>

命令一览

全局命令

se init                          # 交互式初始化配置
se config list                   # 查看所有配置
se config get <key>              # 查看指定配置项
se config set <key> <value>      # 修改配置项
se whoami                        # 验证 API 连接

Events 活动管理

# 活动
se events activities {list,get,create,update,delete}
se events activities update-status <id> --status <draft|published|offline>

# 场次
se events sessions list --activity <id>
se events sessions {get,create,update,delete}

# 票种(含渠道可见性配置)
se events tickets list --activity <id>
se events tickets {get,create,update,delete}

# 票种-场次绑定(按场次全量替换)
se events ticket-sessions list --activity <id>
se events ticket-sessions bind --from-json <file>

# 批量折扣
se events discounts get <ticket-id>
se events discounts update <ticket-id> --from-json <file>

# 核验通道(检票入口/出口)
se events channels list --activity <id>
se events channels {get,create,update,delete}

# 活动全貌树形展示
se events tree <activity-id>

Channels 销售渠道

# 销售渠道(租户全局资源,用于票种可见性控制)
se channels list [--keyword <text>] [--status <0|1>]
se channels {get,create,update,delete}

Awards 报奖系统

# 项目与届次
se awards projects list
se awards sessions {list,get,create,update,delete}

# 分组与奖项
se awards categories {list,create,update,delete}
se awards units {list,get,create,update,delete}
se awards units update-participants <id> --from-json <file>

# 表单配置
se awards forms get <award-id>
se awards forms set <award-id> --from-json <file>

# 轮次与评审
se awards rounds {list,create,update,delete}
se awards identity-templates {list,get,create,update,delete}
se awards judges {list,get,create,update,delete}

# 评分与作品
se awards scores {stats,rankings}
se awards submissions {list,get,export}

# 树形展示
se awards tree <session-id>

Content 内容管理

# 内容类型
se content types list [--keyword <text>]
se content types get <type-id>
se content types create --from-json <file>
se content types update <type-id> --from-json <file>
se content types delete <type-id> [-y]

# 内容分类(支持树形)
se content categories list --type <type-id> [--parent-id <id>]
se content categories tree --type <type-id>
se content categories create --from-json <file>
se content categories update <cat-id> --from-json <file>
se content categories delete <cat-id> [-y]

# 内容条目
se content items list --type <type-id> [--category <id>] [--keyword <text>]
se content items get <item-id>
se content items create --from-json <file>
se content items update <item-id> --from-json <file>
se content items delete <item-id> [-y]
se content items tree <type-id> [--published-only]
se content items import --from-json <file> [--dry-run] [-y]

Pages 自定义页面

# 页面管理
se pages list [--keyword <text>]
se pages get <id> [--output <file>]
se pages create --from-json <file>
se pages update <id> --from-json <file>

# 组件 Schema 查询
se pages components              # 列出所有可用组件
se pages components <name>       # 查看组件属性详情

Upload 图片上传

se upload <file...>              # 批量上传图片,返回 CDN URL

支持 jpg/png/gif/webp,单文件 ≤ 10MB。

通用选项

| 选项 | 说明 | |------|------| | --json | JSON 格式输出(默认表格) | | --env <name> | 临时指定环境 | | --from-json <file> | 从 JSON 文件读取输入数据 | | -y, --yes | 跳过危险操作确认 | | --page <n> | 分页页码 | | --page-size <n> | 每页条数 |

配置

配置文件位于 ~/.simple-event/config.json,支持多环境。通过 se init 交互式设置,或手动编辑。

环境变量可覆盖配置文件(优先级更高):

export SE_SERVER_URL=https://api.example.com
export SE_API_KEY=your-api-key
export SE_API_SECRET=your-api-secret

AI Agent 集成

所有命令加 --json 即可程序化调用,错误也是结构化的 JSON 响应。

退出码:0 = 成功,1 = 业务错误,2 = 网络错误。

详细文档

完整的命令参考、JSON 示例和使用指南请查看 docs/cli-reference.md