@jackwener/opencli 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/CLI-CREATOR.md +594 -0
  2. package/README.md +124 -39
  3. package/README.zh-CN.md +151 -0
  4. package/SKILL.md +178 -102
  5. package/dist/bilibili.d.ts +6 -5
  6. package/dist/browser.d.ts +3 -1
  7. package/dist/browser.js +44 -2
  8. package/dist/cascade.d.ts +46 -0
  9. package/dist/cascade.js +180 -0
  10. package/dist/clis/bbc/news.js +42 -0
  11. package/dist/clis/bilibili/hot.yaml +38 -0
  12. package/dist/clis/boss/search.js +47 -0
  13. package/dist/clis/ctrip/search.d.ts +1 -0
  14. package/dist/clis/ctrip/search.js +62 -0
  15. package/dist/clis/hackernews/top.yaml +36 -0
  16. package/dist/clis/index.d.ts +10 -1
  17. package/dist/clis/index.js +19 -1
  18. package/dist/clis/reddit/hot.yaml +46 -0
  19. package/dist/clis/reuters/search.d.ts +1 -0
  20. package/dist/clis/reuters/search.js +52 -0
  21. package/dist/clis/smzdm/search.d.ts +1 -0
  22. package/dist/clis/smzdm/search.js +66 -0
  23. package/dist/clis/twitter/trending.yaml +40 -0
  24. package/dist/clis/v2ex/hot.yaml +25 -0
  25. package/dist/clis/v2ex/latest.yaml +25 -0
  26. package/dist/clis/v2ex/topic.yaml +27 -0
  27. package/dist/clis/weibo/hot.d.ts +1 -0
  28. package/dist/clis/weibo/hot.js +41 -0
  29. package/dist/clis/xiaohongshu/feed.yaml +32 -0
  30. package/dist/clis/xiaohongshu/notifications.yaml +38 -0
  31. package/dist/clis/xiaohongshu/search.d.ts +5 -0
  32. package/dist/clis/xiaohongshu/search.js +68 -0
  33. package/dist/clis/yahoo-finance/quote.d.ts +1 -0
  34. package/dist/clis/yahoo-finance/quote.js +74 -0
  35. package/dist/clis/youtube/search.d.ts +1 -0
  36. package/dist/clis/youtube/search.js +60 -0
  37. package/dist/clis/zhihu/hot.yaml +42 -0
  38. package/dist/clis/zhihu/question.d.ts +1 -0
  39. package/dist/clis/zhihu/question.js +39 -0
  40. package/dist/clis/zhihu/search.yaml +55 -0
  41. package/dist/engine.d.ts +2 -1
  42. package/dist/explore.d.ts +23 -13
  43. package/dist/explore.js +293 -422
  44. package/dist/generate.js +2 -1
  45. package/dist/main.js +21 -2
  46. package/dist/pipeline/executor.d.ts +9 -0
  47. package/dist/pipeline/executor.js +88 -0
  48. package/dist/pipeline/index.d.ts +5 -0
  49. package/dist/pipeline/index.js +5 -0
  50. package/dist/pipeline/steps/browser.d.ts +12 -0
  51. package/dist/pipeline/steps/browser.js +68 -0
  52. package/dist/pipeline/steps/fetch.d.ts +5 -0
  53. package/dist/pipeline/steps/fetch.js +50 -0
  54. package/dist/pipeline/steps/intercept.d.ts +5 -0
  55. package/dist/pipeline/steps/intercept.js +75 -0
  56. package/dist/pipeline/steps/tap.d.ts +12 -0
  57. package/dist/pipeline/steps/tap.js +130 -0
  58. package/dist/pipeline/steps/transform.d.ts +8 -0
  59. package/dist/pipeline/steps/transform.js +53 -0
  60. package/dist/pipeline/template.d.ts +16 -0
  61. package/dist/pipeline/template.js +115 -0
  62. package/dist/pipeline/template.test.d.ts +4 -0
  63. package/dist/pipeline/template.test.js +102 -0
  64. package/dist/pipeline/transform.test.d.ts +4 -0
  65. package/dist/pipeline/transform.test.js +90 -0
  66. package/dist/pipeline.d.ts +5 -7
  67. package/dist/pipeline.js +5 -313
  68. package/dist/registry.d.ts +3 -2
  69. package/dist/runtime.d.ts +2 -1
  70. package/dist/synthesize.d.ts +11 -8
  71. package/dist/synthesize.js +142 -118
  72. package/dist/types.d.ts +27 -0
  73. package/dist/types.js +7 -0
  74. package/package.json +9 -4
  75. package/src/bilibili.ts +9 -7
  76. package/src/browser.ts +41 -3
  77. package/src/cascade.ts +218 -0
  78. package/src/clis/bbc/news.ts +42 -0
  79. package/src/clis/boss/search.ts +47 -0
  80. package/src/clis/ctrip/search.ts +62 -0
  81. package/src/clis/index.ts +28 -1
  82. package/src/clis/reddit/hot.yaml +46 -0
  83. package/src/clis/reuters/search.ts +52 -0
  84. package/src/clis/smzdm/search.ts +66 -0
  85. package/src/clis/v2ex/hot.yaml +5 -9
  86. package/src/clis/v2ex/latest.yaml +5 -8
  87. package/src/clis/v2ex/topic.yaml +27 -0
  88. package/src/clis/weibo/hot.ts +41 -0
  89. package/src/clis/xiaohongshu/feed.yaml +32 -0
  90. package/src/clis/xiaohongshu/notifications.yaml +38 -0
  91. package/src/clis/xiaohongshu/search.ts +71 -0
  92. package/src/clis/yahoo-finance/quote.ts +74 -0
  93. package/src/clis/youtube/search.ts +60 -0
  94. package/src/clis/zhihu/hot.yaml +22 -8
  95. package/src/clis/zhihu/question.ts +45 -0
  96. package/src/clis/zhihu/search.yaml +55 -0
  97. package/src/engine.ts +2 -1
  98. package/src/explore.ts +303 -465
  99. package/src/generate.ts +3 -1
  100. package/src/main.ts +18 -2
  101. package/src/pipeline/executor.ts +98 -0
  102. package/src/pipeline/index.ts +6 -0
  103. package/src/pipeline/steps/browser.ts +67 -0
  104. package/src/pipeline/steps/fetch.ts +60 -0
  105. package/src/pipeline/steps/intercept.ts +78 -0
  106. package/src/pipeline/steps/tap.ts +137 -0
  107. package/src/pipeline/steps/transform.ts +50 -0
  108. package/src/pipeline/template.test.ts +107 -0
  109. package/src/pipeline/template.ts +101 -0
  110. package/src/pipeline/transform.test.ts +107 -0
  111. package/src/pipeline.ts +5 -292
  112. package/src/registry.ts +4 -2
  113. package/src/runtime.ts +3 -1
  114. package/src/synthesize.ts +142 -137
  115. package/src/types.ts +23 -0
  116. package/vitest.config.ts +7 -0
  117. package/dist/clis/github/search.js +0 -20
  118. package/dist/clis/zhihu/search.js +0 -58
  119. package/dist/promote.d.ts +0 -1
  120. package/dist/promote.js +0 -3
  121. package/dist/register.d.ts +0 -2
  122. package/dist/register.js +0 -2
  123. package/dist/scaffold.d.ts +0 -2
  124. package/dist/scaffold.js +0 -2
  125. package/dist/smoke.d.ts +0 -2
  126. package/dist/smoke.js +0 -2
  127. package/src/clis/github/search.ts +0 -21
  128. package/src/clis/github/trending.yaml +0 -58
  129. package/src/clis/zhihu/search.ts +0 -65
  130. package/src/promote.ts +0 -3
  131. package/src/register.ts +0 -2
  132. package/src/scaffold.ts +0 -2
  133. package/src/smoke.ts +0 -2
  134. /package/dist/clis/{github/search.d.ts → bbc/news.d.ts} +0 -0
  135. /package/dist/clis/{zhihu → boss}/search.d.ts +0 -0
package/README.md CHANGED
@@ -1,66 +1,151 @@
1
1
  # OpenCLI
2
2
 
3
- > **Make any website your CLI.** 操控 Chrome 无风控风险,复用登录,CLI 化全部网站。
3
+ > **Make any website your CLI.**
4
+ > Zero risk · Reuse Chrome login · AI-powered discovery
4
5
 
5
- OpenCLI 是一个 AI Native 的 CLI 工具,通过 Chrome 浏览器 + Playwright MCP Bridge 扩展,将任何网站变成命令行工具。
6
+ [中文文档](./README.zh-CN.md)
6
7
 
7
- ## ✨ 特性
8
+ [![npm](https://img.shields.io/npm/v/@jackwener/opencli)](https://www.npmjs.com/package/@jackwener/opencli)
8
9
 
9
- - 🌐 **CLI 化全部网站**支持 Bilibili、知乎、GitHub、Twitter、V2EX、Hacker News
10
- - 🔐 **零风控风险** — 复用 Chrome 已登录状态,无需存储密码
11
- - 🤖 **AI Native** — AI agent 可直接探索网站并自动生成新命令
12
- - 📝 **声明式 YAML** — 用 YAML 定义 pipeline,无需写代码
13
- - 🔌 **TypeScript 扩展** — 复杂场景用 TS 编写适配器
10
+ A CLI tool that turns **any website** into a command-line interface. **28+ commands** across **16 sites** bilibili, zhihu, xiaohongshu, twitter, reddit, github, v2ex, hackernews, bbc, weibo, boss, yahoo-finance, reuters, smzdm, ctrip, youtube — powered by browser session reuse and AI-native discovery.
14
11
 
15
- ## 🚀 快速开始
12
+ ## Highlights
13
+
14
+ - 🔐 **Account-safe** — Reuses Chrome's logged-in state; your credentials never leave the browser
15
+ - 🤖 **AI Agent ready** — `explore` discovers APIs, `synthesize` generates adapters, `cascade` finds auth strategies
16
+ - 📝 **Declarative YAML** — Most adapters are ~30 lines of YAML pipeline
17
+ - 🔌 **TypeScript escape hatch** — Complex adapters (XHR interception, GraphQL) in TS
18
+
19
+ ## 🚀 Quick Start
20
+
21
+ ### Install via npm (recommended)
16
22
 
17
23
  ```bash
18
- # 安装依赖
19
- cd ~/code/ai-native-cli && npm install
24
+ npm install -g @jackwener/opencli
25
+ ```
20
26
 
21
- # 列出所有命令
22
- npx tsx src/main.ts list
27
+ Then use directly:
28
+
29
+ ```bash
30
+ opencli list # See all commands
31
+ opencli hackernews top --limit 5 # Public API, no browser
32
+ opencli bilibili hot --limit 5 # Browser command
33
+ opencli zhihu hot -f json # JSON output
34
+ ```
23
35
 
24
- # 公共 API(无需浏览器)
25
- npx tsx src/main.ts hackernews top --limit 10
26
- npx tsx src/main.ts github search --keyword "typescript"
36
+ ### Install from source
27
37
 
28
- # 浏览器命令(需要 Chrome + Playwright MCP Bridge 扩展)
29
- npx tsx src/main.ts bilibili hot --limit 10
30
- npx tsx src/main.ts zhihu hot --limit 10
31
- npx tsx src/main.ts twitter trending --limit 10
38
+ ```bash
39
+ git clone git@github.com:jackwener/opencli.git
40
+ cd opencli && npm install
41
+ npx tsx src/main.ts list
32
42
  ```
33
43
 
34
- ## 📋 前置要求
44
+ ### Update
35
45
 
36
- 浏览器命令需要:
37
- 1. Chrome 浏览器正在运行
38
- 2. 安装 [Playwright MCP Bridge](https://chromewebstore.google.com/detail/playwright-mcp-bridge/mmlmfjhmonkocbjadbfplnigmagldckm) 扩展
39
- 3. 首次使用时点击扩展图标批准连接
46
+ ```bash
47
+ # npm global
48
+ npm update -g @jackwener/opencli
40
49
 
41
- ## 📦 内置命令
50
+ # Or reinstall to latest
51
+ npm install -g @jackwener/opencli@latest
52
+ ```
42
53
 
43
- | 站点 | 命令 | 说明 | 模式 |
44
- |------|------|------|------|
45
- | bilibili | hot, search, me, favorite, history, feed, user-videos | 热门 / 搜索 / 个人 / 收藏 / 历史 / 动态 / 投稿 | 🔐 浏览器 |
46
- | zhihu | hot, search | 热榜 / 搜索 | 🔐 浏览器 |
47
- | github | trending, search | Trending / 搜索 | 🔐 / 🌐 公共 |
48
- | twitter | trending | 热门话题 | 🔐 浏览器 |
49
- | v2ex | hot, latest | 热门 / 最新 | 🔐 浏览器 |
50
- | hackernews | top | 热门故事 | 🌐 公共 API |
54
+ ## 📋 Prerequisites
55
+
56
+ Browser commands need:
57
+ 1. **Chrome** running **and logged into the target site** (e.g. bilibili.com, zhihu.com, xiaohongshu.com)
58
+ 2. **[Playwright MCP Bridge](https://chromewebstore.google.com/detail/playwright-mcp-bridge/mmlmfjhmonkocbjadbfplnigmagldckm)** extension installed
59
+ 3. Configure `PLAYWRIGHT_MCP_EXTENSION_TOKEN` (from the extension settings page) in your MCP config:
60
+
61
+ ```json
62
+ {
63
+ "mcpServers": {
64
+ "playwright": {
65
+ "command": "npx",
66
+ "args": ["@playwright/mcp@latest", "--extension"],
67
+ "env": {
68
+ "PLAYWRIGHT_MCP_EXTENSION_TOKEN": "<your-token>"
69
+ }
70
+ }
71
+ }
72
+ }
73
+ ```
51
74
 
52
- ## 🎨 输出格式
75
+ Public API commands (`hackernews`, `github search`, `v2ex`) need no browser at all.
76
+
77
+ > **⚠️ Important**: Browser commands reuse your Chrome login session. You must be logged into the target website in Chrome before running commands. If you get empty data or errors, check your login status first.
78
+
79
+ ## 📦 Built-in Commands
80
+
81
+ | Site | Commands | Mode |
82
+ |------|----------|------|
83
+ | **bilibili** | `hot` `search` `me` `favorite` `history` `feed` `user-videos` | 🔐 Browser |
84
+ | **zhihu** | `hot` `search` `question` | 🔐 Browser |
85
+ | **xiaohongshu** | `search` `notifications` `feed` | 🔐 Browser |
86
+ | **twitter** | `trending` | 🔐 Browser |
87
+ | **reddit** | `hot` | 🔐 Browser |
88
+ | **weibo** | `hot` | 🔐 Browser |
89
+ | **boss** | `search` | 🔐 Browser |
90
+ | **youtube** | `search` | 🔐 Browser |
91
+ | **yahoo-finance** | `quote` | 🔐 Browser |
92
+ | **reuters** | `search` | 🔐 Browser |
93
+ | **smzdm** | `search` | 🔐 Browser |
94
+ | **ctrip** | `search` | 🔐 Browser |
95
+ | **github** | `trending` `search` | 🔐 / 🌐 |
96
+ | **v2ex** | `hot` `latest` `topic` | 🌐 Public |
97
+ | **hackernews** | `top` | 🌐 Public |
98
+ | **bbc** | `news` | 🌐 Public |
99
+
100
+ ## 🎨 Output Formats
53
101
 
54
102
  ```bash
55
- opencli bilibili hot -f table # 默认表格
56
- opencli bilibili hot -f json # JSON(适合管道和 AI agent)
103
+ opencli bilibili hot -f table # Default: rich table
104
+ opencli bilibili hot -f json # JSON (pipe to jq, feed to AI)
57
105
  opencli bilibili hot -f md # Markdown
58
106
  opencli bilibili hot -f csv # CSV
107
+ opencli bilibili hot -v # Verbose: show pipeline steps
59
108
  ```
60
109
 
61
- ## 🔧 创建新命令
110
+ ## 🧠 AI Agent Workflow
111
+
112
+ ```bash
113
+ # 1. Deep Explore — discover APIs, infer capabilities, detect framework
114
+ opencli explore https://example.com --site mysite
115
+
116
+ # 2. Synthesize — generate YAML adapters from explore artifacts
117
+ opencli synthesize mysite
118
+
119
+ # 3. Generate — one-shot: explore → synthesize → register
120
+ opencli generate https://example.com --goal "hot"
121
+
122
+ # 4. Strategy Cascade — auto-probe: PUBLIC → COOKIE → HEADER
123
+ opencli cascade https://api.example.com/data
124
+ ```
125
+
126
+ Explore outputs to `.opencli/explore/<site>/`:
127
+ - `manifest.json` — site metadata, framework detection
128
+ - `endpoints.json` — scored API endpoints with response schemas
129
+ - `capabilities.json` — inferred capabilities with confidence scores
130
+ - `auth.json` — authentication strategy recommendations
131
+
132
+ ## 🔧 Create New Commands
133
+
134
+ See **[SKILL.md](./SKILL.md)** for the full adapter guide (YAML pipeline + TypeScript).
135
+
136
+ ## Releasing New Versions
137
+
138
+ ```bash
139
+ # Bump version
140
+ npm version patch # 0.1.0 → 0.1.1
141
+ npm version minor # 0.1.0 → 0.2.0
142
+ npm version major # 0.1.0 → 1.0.0
143
+
144
+ # Push tag to trigger GitHub Actions auto-release
145
+ git push --follow-tags
146
+ ```
62
147
 
63
- 参考 [SKILL.md](./SKILL.md) 了解 YAML TypeScript 两种方式创建新的 CLI 适配器。
148
+ The CI will automatically build, create a GitHub release, and publish to npm.
64
149
 
65
150
  ## 📄 License
66
151
 
@@ -0,0 +1,151 @@
1
+ # OpenCLI
2
+
3
+ > **把任何网站变成你的命令行工具。**
4
+ > 零风控 · 复用 Chrome 登录 · AI 自动发现接口
5
+
6
+ [English](./README.md)
7
+
8
+ [![npm](https://img.shields.io/npm/v/@jackwener/opencli)](https://www.npmjs.com/package/@jackwener/opencli)
9
+
10
+ OpenCLI 通过 Chrome 浏览器 + [Playwright MCP Bridge](https://github.com/nichochar/playwright-mcp) 扩展,将任何网站变成命令行工具。不存密码、不泄 token,直接复用浏览器已登录状态。
11
+
12
+ ## ✨ 亮点
13
+
14
+ - 🌐 **28+ 命令,16 个站点** — B站、知乎、小红书、Twitter、Reddit、GitHub、V2EX、Hacker News、BBC、微博、BOSS直聘、Yahoo Finance、路透社、什么值得买、携程、YouTube
15
+ - 🔐 **零风控** — 复用 Chrome 登录态,无需存储任何凭证
16
+ - 🤖 **AI 原生** — `explore` 自动发现 API,`synthesize` 生成适配器,`cascade` 探测认证策略
17
+ - 📝 **声明式 YAML** — 大部分适配器只需 ~30 行 YAML
18
+ - 🔌 **TypeScript 扩展** — 复杂场景(XHR 拦截、GraphQL)可用 TS 编写
19
+
20
+ ## 🚀 快速开始
21
+
22
+ ### npm 全局安装(推荐)
23
+
24
+ ```bash
25
+ npm install -g @jackwener/opencli
26
+ ```
27
+
28
+ 直接使用:
29
+
30
+ ```bash
31
+ opencli list # 查看所有命令
32
+ opencli hackernews top --limit 5 # 公共 API,无需浏览器
33
+ opencli bilibili hot --limit 5 # 浏览器命令
34
+ opencli zhihu hot -f json # JSON 输出
35
+ ```
36
+
37
+ ### 从源码安装
38
+
39
+ ```bash
40
+ git clone git@github.com:jackwener/opencli.git
41
+ cd opencli && npm install
42
+ npx tsx src/main.ts list
43
+ ```
44
+
45
+ ### 更新
46
+
47
+ ```bash
48
+ # npm 全局更新
49
+ npm update -g @jackwener/opencli
50
+
51
+ # 或直接安装最新版
52
+ npm install -g @jackwener/opencli@latest
53
+ ```
54
+
55
+ ## 📋 前置要求
56
+
57
+ 浏览器命令需要:
58
+ 1. **Chrome** 浏览器正在运行,且**已登录目标网站**(如 bilibili.com、zhihu.com、xiaohongshu.com)
59
+ 2. 安装 **[Playwright MCP Bridge](https://chromewebstore.google.com/detail/playwright-mcp-bridge/mmlmfjhmonkocbjadbfplnigmagldckm)** 扩展
60
+ 3. 在 MCP 配置中设置 `PLAYWRIGHT_MCP_EXTENSION_TOKEN`(从扩展设置页获取):
61
+
62
+ ```json
63
+ {
64
+ "mcpServers": {
65
+ "playwright": {
66
+ "command": "npx",
67
+ "args": ["@playwright/mcp@latest", "--extension"],
68
+ "env": {
69
+ "PLAYWRIGHT_MCP_EXTENSION_TOKEN": "<your-token>"
70
+ }
71
+ }
72
+ }
73
+ }
74
+ ```
75
+
76
+ 公共 API 命令(`hackernews`、`github search`、`v2ex`)无需浏览器。
77
+
78
+ > **⚠️ 重要**:浏览器命令复用你的 Chrome 登录状态。运行命令前,你必须已在 Chrome 中登录目标网站。如果获取到空数据或报错,请先检查登录状态。
79
+
80
+ ## 📦 内置命令
81
+
82
+ | 站点 | 命令 | 模式 |
83
+ |------|------|------|
84
+ | **bilibili** | `hot` `search` `me` `favorite` `history` `feed` `user-videos` | 🔐 浏览器 |
85
+ | **zhihu** | `hot` `search` `question` | 🔐 浏览器 |
86
+ | **xiaohongshu** | `search` `notifications` `feed` | 🔐 浏览器 |
87
+ | **twitter** | `trending` | 🔐 浏览器 |
88
+ | **reddit** | `hot` | 🔐 浏览器 |
89
+ | **weibo** | `hot` | 🔐 浏览器 |
90
+ | **boss** | `search` | 🔐 浏览器 |
91
+ | **youtube** | `search` | 🔐 浏览器 |
92
+ | **yahoo-finance** | `quote` | 🔐 浏览器 |
93
+ | **reuters** | `search` | 🔐 浏览器 |
94
+ | **smzdm** | `search` | 🔐 浏览器 |
95
+ | **ctrip** | `search` | 🔐 浏览器 |
96
+ | **github** | `trending` `search` | 🔐 / 🌐 |
97
+ | **v2ex** | `hot` `latest` `topic` | 🌐 公共 API |
98
+ | **hackernews** | `top` | 🌐 公共 API |
99
+ | **bbc** | `news` | 🌐 公共 API |
100
+
101
+ ## 🎨 输出格式
102
+
103
+ ```bash
104
+ opencli bilibili hot -f table # 默认:表格
105
+ opencli bilibili hot -f json # JSON(可 pipe 给 jq 或 AI agent)
106
+ opencli bilibili hot -f md # Markdown
107
+ opencli bilibili hot -f csv # CSV
108
+ opencli bilibili hot -v # 详细模式:展示 pipeline 每步数据
109
+ ```
110
+
111
+ ## 🧠 AI Agent 工作流
112
+
113
+ ```bash
114
+ # 1. Deep Explore — 网络拦截 → 响应分析 → 能力推理 → 框架检测
115
+ opencli explore https://example.com --site mysite
116
+
117
+ # 2. Synthesize — 从探索成果物生成 evaluate-based YAML 适配器
118
+ opencli synthesize mysite
119
+
120
+ # 3. Generate — 一键完成:探索 → 合成 → 注册
121
+ opencli generate https://example.com --goal "hot"
122
+
123
+ # 4. Strategy Cascade — 自动降级探测:PUBLIC → COOKIE → HEADER
124
+ opencli cascade https://api.example.com/data
125
+ ```
126
+
127
+ 探索结果输出到 `.opencli/explore/<site>/`:
128
+ - `manifest.json` — 站点元数据、框架检测结果
129
+ - `endpoints.json` — 评分排序的 API 端点,含响应 schema
130
+ - `capabilities.json` — 推理出的能力及置信度
131
+ - `auth.json` — 认证策略建议
132
+
133
+ ## 🔧 创建新命令
134
+
135
+ 查看 **[SKILL.md](./SKILL.md)** 了解完整的适配器开发指南(YAML pipeline + TypeScript)。
136
+
137
+ ## 版本发布
138
+
139
+ ```bash
140
+ # 升级版本号
141
+ npm version patch # 0.1.0 → 0.1.1
142
+ npm version minor # 0.1.0 → 0.2.0
143
+ npm version major # 0.1.0 → 1.0.0
144
+
145
+ # 推送 tag,GitHub Actions 自动发 release 并发布到 npm
146
+ git push --follow-tags
147
+ ```
148
+
149
+ ## 📄 License
150
+
151
+ MIT