polyv-live-cli 1.0.3 → 1.0.4

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 (2) hide show
  1. package/README.md +25 -34
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -11,15 +11,6 @@
11
11
  [![Release](https://img.shields.io/github/actions/workflow/status/terryso/polyv-live-cli/release.yml?style=flat-square&label=Release)](https://github.com/terryso/polyv-live-cli/actions/workflows/release.yml)
12
12
  [![Codecov](https://img.shields.io/codecov/c/github/terryso/polyv-live-cli?style=flat-square)](https://codecov.io/gh/terryso/polyv-live-cli)
13
13
 
14
- ![GitHub Stars](https://img.shields.io/github/stars/terryso/polyv-live-cli?style=flat-square&color=yellow)
15
- ![GitHub Forks](https://img.shields.io/github/forks/terryso/polyv-live-cli?style=flat-square&color=blue)
16
- ![GitHub Issues](https://img.shields.io/github/issues/terryso/polyv-live-cli?style=flat-square&color=red)
17
- ![GitHub Pull Requests](https://img.shields.io/github/issues-pr/terryso/polyv-live-cli?style=flat-square&color=purple)
18
-
19
- [![TypeScript](https://img.shields.io/badge/TypeScript-5.3.0-blue?style=flat-square&logo=typescript)](https://www.typescriptlang.org/)
20
- [![Node.js](https://img.shields.io/badge/Node.js-18%2B-green?style=flat-square&logo=node.js)](https://nodejs.org/)
21
- [![Commander.js](https://img.shields.io/badge/Commander.js-11.1.0-orange?style=flat-square)](https://github.com/tj/commander.js)
22
-
23
14
  </div>
24
15
 
25
16
  一个强大的命令行工具,用于管理保利威(PolyV)直播云服务。支持频道管理、直播流控制等核心功能,提供完整的API集成和友好的用户体验。
@@ -68,35 +59,35 @@ export POLYV_USER_ID="your_user_id" # 可选
68
59
 
69
60
  **方法二:命令行参数**
70
61
  ```bash
71
- polyv-cli --appId your_app_id --appSecret your_app_secret [command]
62
+ polyv-live-cli --appId your_app_id --appSecret your_app_secret [command]
72
63
  ```
73
64
 
74
65
  ### 2. 基础使用示例
75
66
 
76
67
  ```bash
77
68
  # 查看帮助
78
- polyv-cli --help
69
+ polyv-live-cli --help
79
70
 
80
71
  # 查看版本
81
- polyv-cli --version
72
+ polyv-live-cli --version
82
73
 
83
74
  # 创建频道
84
- polyv-cli channel create --name "我的直播间" --scene topclass
75
+ polyv-live-cli channel create --name "我的直播间" --scene topclass
85
76
 
86
77
  # 查看频道列表
87
- polyv-cli channel list
78
+ polyv-live-cli channel list
88
79
 
89
80
  # 获取推流密钥
90
- polyv-cli stream get-key --channelId 3151318
81
+ polyv-live-cli stream get-key --channelId 3151318
91
82
 
92
83
  # 开始直播
93
- polyv-cli stream start --channelId 3151318
84
+ polyv-live-cli stream start --channelId 3151318
94
85
 
95
86
  # 查看直播状态
96
- polyv-cli stream status --channelId 3151318
87
+ polyv-live-cli stream status --channelId 3151318
97
88
 
98
89
  # 停止直播
99
- polyv-cli stream stop --channelId 3151318
90
+ polyv-live-cli stream stop --channelId 3151318
100
91
  ```
101
92
 
102
93
  ## 📋 命令参考
@@ -105,7 +96,7 @@ polyv-cli stream stop --channelId 3151318
105
96
 
106
97
  #### 创建频道
107
98
  ```bash
108
- polyv-cli channel create [options]
99
+ polyv-live-cli channel create [options]
109
100
 
110
101
  选项:
111
102
  --name <string> 频道名称 (必需)
@@ -119,7 +110,7 @@ polyv-cli channel create [options]
119
110
 
120
111
  #### 查看频道列表
121
112
  ```bash
122
- polyv-cli channel list [options]
113
+ polyv-live-cli channel list [options]
123
114
 
124
115
  选项:
125
116
  --page <number> 页码 (默认: 1)
@@ -129,7 +120,7 @@ polyv-cli channel list [options]
129
120
 
130
121
  #### 获取频道详情
131
122
  ```bash
132
- polyv-cli channel get --channelId <id> [options]
123
+ polyv-live-cli channel get --channelId <id> [options]
133
124
 
134
125
  选项:
135
126
  --channelId <string> 频道ID (必需)
@@ -138,7 +129,7 @@ polyv-cli channel get --channelId <id> [options]
138
129
 
139
130
  #### 更新频道
140
131
  ```bash
141
- polyv-cli channel update --channelId <id> [options]
132
+ polyv-live-cli channel update --channelId <id> [options]
142
133
 
143
134
  选项:
144
135
  --channelId <string> 频道ID (必需)
@@ -158,7 +149,7 @@ polyv-cli channel update --channelId <id> [options]
158
149
 
159
150
  #### 删除频道
160
151
  ```bash
161
- polyv-cli channel delete --channelId <id>
152
+ polyv-live-cli channel delete --channelId <id>
162
153
 
163
154
  选项:
164
155
  --channelId <string> 频道ID (必需)
@@ -168,7 +159,7 @@ polyv-cli channel delete --channelId <id>
168
159
 
169
160
  #### 获取推流密钥
170
161
  ```bash
171
- polyv-cli stream get-key --channelId <id> [options]
162
+ polyv-live-cli stream get-key --channelId <id> [options]
172
163
 
173
164
  选项:
174
165
  --channelId <string> 频道ID (必需)
@@ -177,7 +168,7 @@ polyv-cli stream get-key --channelId <id> [options]
177
168
 
178
169
  #### 开始直播
179
170
  ```bash
180
- polyv-cli stream start --channelId <id>
171
+ polyv-live-cli stream start --channelId <id>
181
172
 
182
173
  选项:
183
174
  --channelId <string> 频道ID (必需)
@@ -185,7 +176,7 @@ polyv-cli stream start --channelId <id>
185
176
 
186
177
  #### 停止直播
187
178
  ```bash
188
- polyv-cli stream stop --channelId <id>
179
+ polyv-live-cli stream stop --channelId <id>
189
180
 
190
181
  选项:
191
182
  --channelId <string> 频道ID (必需)
@@ -193,7 +184,7 @@ polyv-cli stream stop --channelId <id>
193
184
 
194
185
  #### 查看流状态
195
186
  ```bash
196
- polyv-cli stream status --channelId <id> [options]
187
+ polyv-live-cli stream status --channelId <id> [options]
197
188
 
198
189
  选项:
199
190
  --channelId <string> 频道ID (必需)
@@ -207,7 +198,7 @@ polyv-cli stream status --channelId <id> [options]
207
198
  ```bash
208
199
  # 批量创建频道
209
200
  for i in {1..5}; do
210
- polyv-cli channel create --name "批量频道$i" --scene topclass --publisher "主持人$i"
201
+ polyv-live-cli channel create --name "批量频道$i" --scene topclass --publisher "主持人$i"
211
202
  done
212
203
 
213
204
  # 查看所有频道
@@ -220,19 +211,19 @@ polyv-cli channel list --per-page 50 --output json
220
211
  CHANNEL_ID="3151318"
221
212
 
222
213
  echo "🚀 开始直播..."
223
- polyv-cli stream start --channelId $CHANNEL_ID
214
+ polyv-live-cli stream start --channelId $CHANNEL_ID
224
215
 
225
216
  echo "📡 获取推流信息..."
226
- polyv-cli stream get-key --channelId $CHANNEL_ID
217
+ polyv-live-cli stream get-key --channelId $CHANNEL_ID
227
218
 
228
219
  echo "📊 监控直播状态..."
229
- polyv-cli stream status --channelId $CHANNEL_ID --watch
220
+ polyv-live-cli stream status --channelId $CHANNEL_ID --watch
230
221
  ```
231
222
 
232
223
  ### 3. CI/CD集成
233
224
  ```bash
234
225
  # 在CI/CD流水线中使用
235
- polyv-cli channel create \
226
+ polyv-live-cli channel create \
236
227
  --name "自动化测试频道" \
237
228
  --scene topclass \
238
229
  --description "CI/CD自动创建" \
@@ -336,11 +327,11 @@ npm run test:coverage
336
327
  ### 调试模式
337
328
  ```bash
338
329
  # 启用详细调试信息
339
- DEBUG=1 polyv-cli [command]
330
+ DEBUG=1 polyv-live-cli [command]
340
331
 
341
332
  # 或设置环境变量
342
333
  export DEBUG=1
343
- polyv-cli [command]
334
+ polyv-live-cli [command]
344
335
  ```
345
336
 
346
337
  ## 🏗️ 开发
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "polyv-live-cli",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "CLI tool for managing PolyV live streaming services.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
7
- "polyv-cli": "./dist/index.js"
7
+ "polyv-live-cli": "dist/index.js"
8
8
  },
9
9
  "files": [
10
10
  "/dist"