aiconductor-cli 1.5.1 → 1.7.0
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.
- package/README.md +565 -419
- package/bin/aiconductor-cli.js +401 -296
- package/package.json +1 -1
- package/src/api.js +361 -2
- package/src/api.test.js +553 -3
- package/src/commands/content.js +184 -184
- package/src/commands/douyin.js +174 -0
- package/src/commands/html_publish.js +54 -54
- package/src/commands/md_publish.js +175 -175
- package/src/commands/web.js +69 -0
- package/src/commands/web_search.js +99 -99
- package/src/commands/wx.js +116 -116
- package/src/commands/xhs.js +763 -268
- package/src/lib/cli-utils.js +172 -84
- package/src/lib/daren-score.js +91 -0
- package/src/lib/daren-score.test.js +57 -0
- package/AGENTS.md +0 -189
- package/api_docs/aic_web_search.md +0 -84
- package/api_docs/audio_converter.md +0 -51
- package/api_docs/balance_query.md +0 -38
- package/api_docs/bing_search.md +0 -55
- package/api_docs/china_stock_data.md +0 -221
- package/api_docs/delete_published_webpage.md +0 -38
- package/api_docs/doubao_search.md +0 -80
- package/api_docs/douyin_link_to_text_v1.md +0 -50
- package/api_docs/douyin_link_to_text_v2.md +0 -50
- package/api_docs/douyin_user_detail.md +0 -65
- package/api_docs/douyin_user_search.md +0 -58
- package/api_docs/douyin_user_videos.md +0 -49
- package/api_docs/douyin_user_videos_async.md +0 -45
- package/api_docs/douyin_user_videos_async_query.md +0 -41
- package/api_docs/douyin_user_videos_max.md +0 -59
- package/api_docs/douyin_video_comments.md +0 -68
- package/api_docs/douyin_video_info.md +0 -70
- package/api_docs/douyin_video_search.md +0 -60
- package/api_docs/douyin_video_search_fast.md +0 -48
- package/api_docs/fast_ocr.md +0 -51
- package/api_docs/flow_article2podcast_creat.md +0 -41
- package/api_docs/flow_article2podcast_query.md +0 -41
- package/api_docs/flow_wx_history_articles.md +0 -45
- package/api_docs/generate_image.md +0 -68
- package/api_docs/get_duration.md +0 -37
- package/api_docs/hot_list_mixed.md +0 -122
- package/api_docs/html_publish.md +0 -50
- package/api_docs/html_publish_flexible.md +0 -65
- package/api_docs/image_resize.md +0 -58
- package/api_docs/image_to_permalink.md +0 -61
- package/api_docs/link_expander.md +0 -39
- package/api_docs/llm_proxy.md +0 -61
- package/api_docs/markitdown.md +0 -47
- package/api_docs/md_to_docx.md +0 -51
- package/api_docs/md_to_html.md +0 -53
- package/api_docs/md_to_mindmap.md +0 -52
- package/api_docs/md_to_pdf.md +0 -52
- package/api_docs/md_to_png.md +0 -53
- package/api_docs/md_to_txt.md +0 -51
- package/api_docs/md_to_wxhtml.md +0 -64
- package/api_docs/md_to_xhs.md +0 -87
- package/api_docs/md_to_xlsx.md +0 -52
- package/api_docs/portrait_enhancement.md +0 -69
- package/api_docs/published_webpages.md +0 -45
- package/api_docs/r2_uploader.md +0 -51
- package/api_docs/schedulerx_job_create.md +0 -56
- package/api_docs/transaction_query.md +0 -52
- package/api_docs/url_to_markdown.md +0 -50
- package/api_docs/video_download_url.md +0 -57
- package/api_docs/video_download_url_oss.md +0 -55
- package/api_docs/video_to_text.md +0 -48
- package/api_docs/video_to_text_v2.md +0 -49
- package/api_docs/volcengine_face_pretty.md +0 -55
- package/api_docs/volcengine_faceswap.md +0 -55
- package/api_docs/website_screenshot.md +0 -49
- package/api_docs/wx_access_token.md +0 -44
- package/api_docs/wx_article_analysis_data_push.md +0 -43
- package/api_docs/wx_article_data.md +0 -48
- package/api_docs/wx_article_style_rewrite.md +0 -45
- package/api_docs/wx_draft_add.md +0 -56
- package/api_docs/wx_draft_publish.md +0 -47
- package/api_docs/wx_history_articles.md +0 -89
- package/api_docs/wx_image_upload.md +0 -46
- package/api_docs/wx_md_to_html.md +0 -48
- package/api_docs/wx_rss_reader.md +0 -59
- package/api_docs/xhs_hot_list.md +0 -48
- package/api_docs/xhs_note_comments_fast.md +0 -54
- package/api_docs/xhs_note_info_v2.md +0 -45
- package/api_docs/xhs_note_info_v3.md +0 -69
- package/api_docs/xhs_note_publish.md +0 -54
- package/api_docs/xhs_note_search_v2.md +0 -73
- package/api_docs/xhs_note_search_v3.md +0 -54
- package/api_docs/xhs_user_info_v2.md +0 -61
- package/api_docs/xhs_user_notes_v2.md +0 -56
- package/api_docs/xhs_user_notes_v3.md +0 -48
package/README.md
CHANGED
|
@@ -1,419 +1,565 @@
|
|
|
1
|
-
# AIConductor CLI
|
|
2
|
-
|
|
3
|
-
AIConductor 平台命令行工具箱,提供内容选题简报、网页发布、搜索、抖音数据和小红书工具。
|
|
4
|
-
|
|
5
|
-
## 安装
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install -g aiconductor-cli
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
**Node.js >= 18.0.0** 环境。
|
|
12
|
-
|
|
13
|
-
## 配置 API Key
|
|
14
|
-
|
|
15
|
-
前往 [https://dev.aiconductor.fun/register](https://dev.aiconductor.fun/register) 注册获取 API Key,然后配置环境变量:
|
|
16
|
-
|
|
17
|
-
**macOS / Linux:**
|
|
18
|
-
```bash
|
|
19
|
-
echo 'export AICONDUCTOR_API_KEY="your-api-key"' >> ~/.zshrc && source ~/.zshrc
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
**Windows PowerShell:**
|
|
23
|
-
```powershell
|
|
24
|
-
[Environment]::SetEnvironmentVariable("AICONDUCTOR_API_KEY", "your-api-key", "User")
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
> 也可在项目目录创建 `.env` 文件写入 `AICONDUCTOR_API_KEY=your-api-key`。
|
|
28
|
-
|
|
29
|
-
## 命令
|
|
30
|
-
|
|
31
|
-
### 发布 HTML 网页
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
aiconductor-cli html publish <HTML代码或文件路径> [选项]
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
| 选项 | 说明 |
|
|
38
|
-
|------|------|
|
|
39
|
-
| `-t, --title` | 文档标题,用作文件名基础 |
|
|
40
|
-
| `-k, --api-key` | API Key(可选,默认读取环境变量) |
|
|
41
|
-
| `-f, --format` | 输出格式:`json`(默认)或 `text` |
|
|
42
|
-
|
|
43
|
-
示例:
|
|
44
|
-
```bash
|
|
45
|
-
aiconductor-cli html publish index.html -t my-page
|
|
46
|
-
aiconductor-cli html publish "<h1>Hello</h1>" -t hello-page -f text
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
### 发布 Markdown/HTML 网页(推荐)
|
|
50
|
-
|
|
51
|
-
`webpage publish` 是统一的网页发布命令,自动识别 Markdown 和 HTML 并发布为在线网页。
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
aiconductor-cli webpage publish <Markdown/HTML代码或文件路径> [选项]
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
| 选项 | 说明 | 默认值 |
|
|
58
|
-
|------|------|--------|
|
|
59
|
-
| `-t, --title` | 文件名(不含 .html 后缀) | 自动生成 |
|
|
60
|
-
| `-k, --api-key` | API Key(可选) | 环境变量 |
|
|
61
|
-
| `--type` | 强制指定类型:`md` 或 `html` | 自动识别 |
|
|
62
|
-
| `--copy-button` | 为代码块添加复制按钮(仅 Markdown) | 关闭 |
|
|
63
|
-
| `-f, --format` | 输出格式:`json` 或 `text` | json |
|
|
64
|
-
|
|
65
|
-
示例:
|
|
66
|
-
```bash
|
|
67
|
-
# 发布 Markdown 文件
|
|
68
|
-
aiconductor-cli webpage publish README.md -t docs
|
|
69
|
-
|
|
70
|
-
# 发布 Markdown 并添加代码复制按钮
|
|
71
|
-
aiconductor-cli webpage publish article.md -t article --copy-button
|
|
72
|
-
|
|
73
|
-
# 发布 HTML 文件
|
|
74
|
-
aiconductor-cli webpage publish index.html -t my-page
|
|
75
|
-
|
|
76
|
-
# 直接传入内容字符串
|
|
77
|
-
aiconductor-cli webpage publish "# Hello\n\nThis is **markdown**" -t hello
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
### 管理已发布网页
|
|
81
|
-
|
|
82
|
-
查询当前 API Key 所属用户的网页发布记录:
|
|
83
|
-
|
|
84
|
-
```bash
|
|
85
|
-
aiconductor-cli webpage list [选项]
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
| 选项 | 说明 | 默认值 |
|
|
89
|
-
|------|------|--------|
|
|
90
|
-
| `--page` | 页码,最小为 1 | 1 |
|
|
91
|
-
| `--page-size` | 每页条数,范围为 1 到 100 | 20 |
|
|
92
|
-
| `-k, --api-key` | API Key(可选) | 环境变量 |
|
|
93
|
-
| `-f, --format` | 输出格式:`json` 或 `text` | json |
|
|
94
|
-
|
|
95
|
-
删除指定的已发布网页及其公开 HTML 对象:
|
|
96
|
-
|
|
97
|
-
```bash
|
|
98
|
-
aiconductor-cli webpage delete <webpage_id> [选项]
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
示例:
|
|
102
|
-
```bash
|
|
103
|
-
# 查看第 2 页,每页 50 条
|
|
104
|
-
aiconductor-cli webpage list --page 2 --page-size 50 -f text
|
|
105
|
-
|
|
106
|
-
# 删除 ID 为 123 的网页
|
|
107
|
-
aiconductor-cli webpage delete 123
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
### 网页搜索
|
|
111
|
-
|
|
112
|
-
```bash
|
|
113
|
-
aiconductor-cli search web <关键词> [选项]
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
| 选项 | 说明 | 默认值 |
|
|
117
|
-
|------|------|--------|
|
|
118
|
-
| `-n, --count` | 返回条数(最多50) | 10 |
|
|
119
|
-
| `--time-range` | 时间范围:预设 `OneDay`/`OneWeek`/`OneMonth`/`OneYear`,或自定义 `YYYY-MM-DD..YYYY-MM-DD` | 无 |
|
|
120
|
-
| `--need-content` | 仅返回包含正文的结果 | 关闭 |
|
|
121
|
-
| `--need-url` | 仅返回带原文链接的结果 | 关闭 |
|
|
122
|
-
| `--sites` | 限定搜索站点,完整域名以 `\|` 分隔,最多20个 | 无 |
|
|
123
|
-
| `--block-hosts` | 屏蔽站点,完整域名以 `\|` 分隔,最多5个 | 无 |
|
|
124
|
-
| `--auth-info-level` | 权威度过滤:0=不限制,1=仅非常权威内容 | 0 |
|
|
125
|
-
| `--auth-level` | `--auth-info-level` 的兼容别名 | 无 |
|
|
126
|
-
| `--content-format` | 正文格式:`text` 或 `markdown` | text |
|
|
127
|
-
| `--industry` | 行业搜索:`finance`、`game` 或 `gov` | 无 |
|
|
128
|
-
| `--query-rewrite` | 开启 Query 改写 | 关闭 |
|
|
129
|
-
| `-f, --format` | 输出格式:`json` 或 `text` | json |
|
|
130
|
-
|
|
131
|
-
示例:
|
|
132
|
-
```bash
|
|
133
|
-
aiconductor-cli search web "北京今日天气" -n 3 --auth-info-level 1 --need-url
|
|
134
|
-
aiconductor-cli search web "AI 最新进展" --time-range OneWeek --content-format markdown --need-content
|
|
135
|
-
aiconductor-cli search web "技术文章" --time-range 2025-01-01..2025-06-30 -n 10
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
### 图片搜索
|
|
139
|
-
|
|
140
|
-
```bash
|
|
141
|
-
aiconductor-cli search image <关键词> [选项]
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
| 选项 | 说明 | 默认值 |
|
|
145
|
-
|------|------|--------|
|
|
146
|
-
| `-n, --count` | 返回条数(最多5) | 5 |
|
|
147
|
-
| `--image-width-min` | 图片最小宽度 | 无 |
|
|
148
|
-
| `--image-width-max` | 图片最大宽度 | 无 |
|
|
149
|
-
| `--image-height-min` | 图片最小高度 | 无 |
|
|
150
|
-
| `--image-height-max` | 图片最大高度 | 无 |
|
|
151
|
-
| `--image-shapes` | 图片形状,以 `\|` 分隔:`横长方形`、`竖长方形`、`方形` | 无 |
|
|
152
|
-
| `--query-rewrite` | 开启 Query 改写 | 关闭 |
|
|
153
|
-
| `-f, --format` | 输出格式:`json` 或 `text` | json |
|
|
154
|
-
|
|
155
|
-
示例:
|
|
156
|
-
```bash
|
|
157
|
-
aiconductor-cli search image "长城风景" -n 3 --image-width-min 1200 --image-shapes "横长方形|方形" -f text
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
### 热点选题简报
|
|
161
|
-
|
|
162
|
-
聚合多个平台热点与小红书实时热榜,为内容选题提供带来源链接的原料。默认查询知乎、微博、抖音和 AIHOT,每个来源返回 30 条,并额外请求一次小红书热榜。
|
|
163
|
-
|
|
164
|
-
```bash
|
|
165
|
-
aiconductor-cli content briefing [选项]
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
| 选项 | 说明 | 默认值 |
|
|
169
|
-
|------|------|--------|
|
|
170
|
-
| `--sources <ids>` | 来源 ID,逗号分隔;例如 `zhihu,weibo,aihot` | `zhihu,weibo,douyin,aihot` |
|
|
171
|
-
| `--limit <n>` | 每个来源返回条数,范围 1 到 30 | 30 |
|
|
172
|
-
| `-k, --api-key <key>` | API Key(可选) | 环境变量 |
|
|
173
|
-
| `-f, --format <format>` | 输出格式:`json` 或 `text` | json |
|
|
174
|
-
|
|
175
|
-
示例:
|
|
176
|
-
```bash
|
|
177
|
-
# 默认综合热点简报
|
|
178
|
-
aiconductor-cli content briefing -f text
|
|
179
|
-
|
|
180
|
-
# 只查看技术与产品来源
|
|
181
|
-
aiconductor-cli content briefing --sources aihot,hackernews,producthunt,juejin --limit 15 -f text
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
默认 JSON 输出保留以下字段,便于后续选题处理:
|
|
185
|
-
|
|
186
|
-
- `data.data.sources`:成功的综合热榜来源,兼容旧版本。
|
|
187
|
-
- `data.data.failed_sources`:综合热榜中失败的平台来源。
|
|
188
|
-
- `data.data.xhs_hot_list`:小红书热榜结果,包含日期与话题条目;小红书热榜接口失败时为 `null`。
|
|
189
|
-
- `data.data.failed_services`:综合热榜或小红书热榜接口级失败信息。
|
|
190
|
-
|
|
191
|
-
任一服务成功时命令仍会返回可用数据;只有两个服务都失败时才退出失败。成功来源和成功的小红书热榜调用均按平台现有规则计费。
|
|
192
|
-
|
|
193
|
-
### 抖音数据工具箱
|
|
194
|
-
|
|
195
|
-
```bash
|
|
196
|
-
aiconductor-cli douyin <子命令> [参数] [选项]
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
#### 获取作品详情
|
|
200
|
-
|
|
201
|
-
```bash
|
|
202
|
-
aiconductor-cli douyin video-info <分享链接> [选项]
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
示例:
|
|
206
|
-
```bash
|
|
207
|
-
aiconductor-cli douyin video-info "https://v.douyin.com/xxxxx/"
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
#### 获取作品评论
|
|
211
|
-
|
|
212
|
-
```bash
|
|
213
|
-
aiconductor-cli douyin video-comments <视频URL> [选项]
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
| 选项 | 说明 | 默认值 |
|
|
217
|
-
|------|------|--------|
|
|
218
|
-
| `--max-count` | 获取评论数量 | 50 |
|
|
219
|
-
| `-f, --format` | 输出格式 | json |
|
|
220
|
-
|
|
221
|
-
示例:
|
|
222
|
-
```bash
|
|
223
|
-
aiconductor-cli douyin video-comments "https://www.douyin.com/video/xxxxx" --max-count 100
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
#### 获取用户视频列表
|
|
227
|
-
|
|
228
|
-
```bash
|
|
229
|
-
aiconductor-cli douyin user-videos <用户主页URL> [选项]
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
| 选项 | 说明 | 默认值 |
|
|
233
|
-
|------|------|--------|
|
|
234
|
-
| `--max-pages` | 最大页数 | 1 |
|
|
235
|
-
| `--max-seconds` | 最长运行时间(秒),最大 180 | 50 |
|
|
236
|
-
| `-f, --format` | 输出格式 | json |
|
|
237
|
-
|
|
238
|
-
示例:
|
|
239
|
-
```bash
|
|
240
|
-
aiconductor-cli douyin user-videos "https://www.douyin.com/user/xxxxx" --max-pages 3
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
#### 获取用户详情
|
|
244
|
-
|
|
245
|
-
```bash
|
|
246
|
-
aiconductor-cli douyin user-detail <用户主页URL> [选项]
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
示例:
|
|
250
|
-
```bash
|
|
251
|
-
aiconductor-cli douyin user-detail "https://www.douyin.com/user/xxxxx"
|
|
252
|
-
```
|
|
253
|
-
|
|
254
|
-
#### 搜索用户
|
|
255
|
-
|
|
256
|
-
```bash
|
|
257
|
-
aiconductor-cli douyin user-search <关键词> [选项]
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
| 选项 | 说明 | 默认值 |
|
|
261
|
-
|------|------|--------|
|
|
262
|
-
| `--max-pages` | 最大页数,0=不限制 | 1 |
|
|
263
|
-
| `--max-seconds` | 最长运行时间(秒),最大 180 | 50 |
|
|
264
|
-
| `--fans-range` | 粉丝数筛选:`0_1k`/`1k_1w`/`1w_10w`/`10w_100w`/`100w_` | 无 |
|
|
265
|
-
| `--user-type` | 用户类型:`common_user`/`enterprise_user`/`personal_user` | 无 |
|
|
266
|
-
| `-f, --format` | 输出格式 | json |
|
|
267
|
-
|
|
268
|
-
示例:
|
|
269
|
-
```bash
|
|
270
|
-
aiconductor-cli douyin user-search "美食博主" --fans-range 10w_100w --user-type personal_user
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
#### 搜索视频
|
|
274
|
-
|
|
275
|
-
```bash
|
|
276
|
-
aiconductor-cli douyin video-search <关键词> [选项]
|
|
277
|
-
```
|
|
278
|
-
|
|
279
|
-
| 选项 | 说明 | 默认值 |
|
|
280
|
-
|------|------|--------|
|
|
281
|
-
| `--max-pages` | 最大页数,0=不限制 | 1 |
|
|
282
|
-
| `--max-seconds` | 最长运行时间(秒),最大 50 | 50 |
|
|
283
|
-
| `--sort-type` | 排序:0=综合,1=最多点赞,2=最新发布 | 0 |
|
|
284
|
-
| `--publish-time` | 发布时间:0=不限,1=一天,7=一周,180=半年 | 0 |
|
|
285
|
-
| `--filter-duration` | 时长:0=不限,0-1=1分钟内,1-5=1-5分钟,5-10000=5分钟以上 | 0 |
|
|
286
|
-
| `--content-type` | 内容类型:0=不限,1=视频,2=图片,3=文章 | 0 |
|
|
287
|
-
| `-f, --format` | 输出格式 | json |
|
|
288
|
-
|
|
289
|
-
示例:
|
|
290
|
-
```bash
|
|
291
|
-
aiconductor-cli douyin video-search "编程教程" --sort-type 2 --publish-time 7 --content-type 1
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
#### 视频链接转文字
|
|
295
|
-
|
|
296
|
-
```bash
|
|
297
|
-
aiconductor-cli douyin link-to-text <视频URL> [选项]
|
|
298
|
-
```
|
|
299
|
-
|
|
300
|
-
示例:
|
|
301
|
-
```bash
|
|
302
|
-
aiconductor-cli douyin link-to-text "https://www.douyin.com/video/xxxxx"
|
|
303
|
-
```
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
```
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
aiconductor-cli
|
|
316
|
-
```
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
aiconductor-cli
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
```
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
aiconductor-cli
|
|
366
|
-
aiconductor-cli
|
|
367
|
-
```
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
|
391
|
-
|
|
|
392
|
-
|
|
|
393
|
-
|
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
1
|
+
# AIConductor CLI
|
|
2
|
+
|
|
3
|
+
AIConductor 平台命令行工具箱,提供内容选题简报、网页发布、搜索、抖音数据和小红书工具。
|
|
4
|
+
|
|
5
|
+
## 安装
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g aiconductor-cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
**Node.js >= 18.0.0** 环境。
|
|
12
|
+
|
|
13
|
+
## 配置 API Key
|
|
14
|
+
|
|
15
|
+
前往 [https://dev.aiconductor.fun/register](https://dev.aiconductor.fun/register) 注册获取 API Key,然后配置环境变量:
|
|
16
|
+
|
|
17
|
+
**macOS / Linux:**
|
|
18
|
+
```bash
|
|
19
|
+
echo 'export AICONDUCTOR_API_KEY="your-api-key"' >> ~/.zshrc && source ~/.zshrc
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
**Windows PowerShell:**
|
|
23
|
+
```powershell
|
|
24
|
+
[Environment]::SetEnvironmentVariable("AICONDUCTOR_API_KEY", "your-api-key", "User")
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
> 也可在项目目录创建 `.env` 文件写入 `AICONDUCTOR_API_KEY=your-api-key`。
|
|
28
|
+
|
|
29
|
+
## 命令
|
|
30
|
+
|
|
31
|
+
### 发布 HTML 网页
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
aiconductor-cli html publish <HTML代码或文件路径> [选项]
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
| 选项 | 说明 |
|
|
38
|
+
|------|------|
|
|
39
|
+
| `-t, --title` | 文档标题,用作文件名基础 |
|
|
40
|
+
| `-k, --api-key` | API Key(可选,默认读取环境变量) |
|
|
41
|
+
| `-f, --format` | 输出格式:`json`(默认)或 `text` |
|
|
42
|
+
|
|
43
|
+
示例:
|
|
44
|
+
```bash
|
|
45
|
+
aiconductor-cli html publish index.html -t my-page
|
|
46
|
+
aiconductor-cli html publish "<h1>Hello</h1>" -t hello-page -f text
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### 发布 Markdown/HTML 网页(推荐)
|
|
50
|
+
|
|
51
|
+
`webpage publish` 是统一的网页发布命令,自动识别 Markdown 和 HTML 并发布为在线网页。
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
aiconductor-cli webpage publish <Markdown/HTML代码或文件路径> [选项]
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
| 选项 | 说明 | 默认值 |
|
|
58
|
+
|------|------|--------|
|
|
59
|
+
| `-t, --title` | 文件名(不含 .html 后缀) | 自动生成 |
|
|
60
|
+
| `-k, --api-key` | API Key(可选) | 环境变量 |
|
|
61
|
+
| `--type` | 强制指定类型:`md` 或 `html` | 自动识别 |
|
|
62
|
+
| `--copy-button` | 为代码块添加复制按钮(仅 Markdown) | 关闭 |
|
|
63
|
+
| `-f, --format` | 输出格式:`json` 或 `text` | json |
|
|
64
|
+
|
|
65
|
+
示例:
|
|
66
|
+
```bash
|
|
67
|
+
# 发布 Markdown 文件
|
|
68
|
+
aiconductor-cli webpage publish README.md -t docs
|
|
69
|
+
|
|
70
|
+
# 发布 Markdown 并添加代码复制按钮
|
|
71
|
+
aiconductor-cli webpage publish article.md -t article --copy-button
|
|
72
|
+
|
|
73
|
+
# 发布 HTML 文件
|
|
74
|
+
aiconductor-cli webpage publish index.html -t my-page
|
|
75
|
+
|
|
76
|
+
# 直接传入内容字符串
|
|
77
|
+
aiconductor-cli webpage publish "# Hello\n\nThis is **markdown**" -t hello
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### 管理已发布网页
|
|
81
|
+
|
|
82
|
+
查询当前 API Key 所属用户的网页发布记录:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
aiconductor-cli webpage list [选项]
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
| 选项 | 说明 | 默认值 |
|
|
89
|
+
|------|------|--------|
|
|
90
|
+
| `--page` | 页码,最小为 1 | 1 |
|
|
91
|
+
| `--page-size` | 每页条数,范围为 1 到 100 | 20 |
|
|
92
|
+
| `-k, --api-key` | API Key(可选) | 环境变量 |
|
|
93
|
+
| `-f, --format` | 输出格式:`json` 或 `text` | json |
|
|
94
|
+
|
|
95
|
+
删除指定的已发布网页及其公开 HTML 对象:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
aiconductor-cli webpage delete <webpage_id> [选项]
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
示例:
|
|
102
|
+
```bash
|
|
103
|
+
# 查看第 2 页,每页 50 条
|
|
104
|
+
aiconductor-cli webpage list --page 2 --page-size 50 -f text
|
|
105
|
+
|
|
106
|
+
# 删除 ID 为 123 的网页
|
|
107
|
+
aiconductor-cli webpage delete 123
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### 网页搜索
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
aiconductor-cli search web <关键词> [选项]
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
| 选项 | 说明 | 默认值 |
|
|
117
|
+
|------|------|--------|
|
|
118
|
+
| `-n, --count` | 返回条数(最多50) | 10 |
|
|
119
|
+
| `--time-range` | 时间范围:预设 `OneDay`/`OneWeek`/`OneMonth`/`OneYear`,或自定义 `YYYY-MM-DD..YYYY-MM-DD` | 无 |
|
|
120
|
+
| `--need-content` | 仅返回包含正文的结果 | 关闭 |
|
|
121
|
+
| `--need-url` | 仅返回带原文链接的结果 | 关闭 |
|
|
122
|
+
| `--sites` | 限定搜索站点,完整域名以 `\|` 分隔,最多20个 | 无 |
|
|
123
|
+
| `--block-hosts` | 屏蔽站点,完整域名以 `\|` 分隔,最多5个 | 无 |
|
|
124
|
+
| `--auth-info-level` | 权威度过滤:0=不限制,1=仅非常权威内容 | 0 |
|
|
125
|
+
| `--auth-level` | `--auth-info-level` 的兼容别名 | 无 |
|
|
126
|
+
| `--content-format` | 正文格式:`text` 或 `markdown` | text |
|
|
127
|
+
| `--industry` | 行业搜索:`finance`、`game` 或 `gov` | 无 |
|
|
128
|
+
| `--query-rewrite` | 开启 Query 改写 | 关闭 |
|
|
129
|
+
| `-f, --format` | 输出格式:`json` 或 `text` | json |
|
|
130
|
+
|
|
131
|
+
示例:
|
|
132
|
+
```bash
|
|
133
|
+
aiconductor-cli search web "北京今日天气" -n 3 --auth-info-level 1 --need-url
|
|
134
|
+
aiconductor-cli search web "AI 最新进展" --time-range OneWeek --content-format markdown --need-content
|
|
135
|
+
aiconductor-cli search web "技术文章" --time-range 2025-01-01..2025-06-30 -n 10
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### 图片搜索
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
aiconductor-cli search image <关键词> [选项]
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
| 选项 | 说明 | 默认值 |
|
|
145
|
+
|------|------|--------|
|
|
146
|
+
| `-n, --count` | 返回条数(最多5) | 5 |
|
|
147
|
+
| `--image-width-min` | 图片最小宽度 | 无 |
|
|
148
|
+
| `--image-width-max` | 图片最大宽度 | 无 |
|
|
149
|
+
| `--image-height-min` | 图片最小高度 | 无 |
|
|
150
|
+
| `--image-height-max` | 图片最大高度 | 无 |
|
|
151
|
+
| `--image-shapes` | 图片形状,以 `\|` 分隔:`横长方形`、`竖长方形`、`方形` | 无 |
|
|
152
|
+
| `--query-rewrite` | 开启 Query 改写 | 关闭 |
|
|
153
|
+
| `-f, --format` | 输出格式:`json` 或 `text` | json |
|
|
154
|
+
|
|
155
|
+
示例:
|
|
156
|
+
```bash
|
|
157
|
+
aiconductor-cli search image "长城风景" -n 3 --image-width-min 1200 --image-shapes "横长方形|方形" -f text
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### 热点选题简报
|
|
161
|
+
|
|
162
|
+
聚合多个平台热点与小红书实时热榜,为内容选题提供带来源链接的原料。默认查询知乎、微博、抖音和 AIHOT,每个来源返回 30 条,并额外请求一次小红书热榜。
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
aiconductor-cli content briefing [选项]
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
| 选项 | 说明 | 默认值 |
|
|
169
|
+
|------|------|--------|
|
|
170
|
+
| `--sources <ids>` | 来源 ID,逗号分隔;例如 `zhihu,weibo,aihot` | `zhihu,weibo,douyin,aihot` |
|
|
171
|
+
| `--limit <n>` | 每个来源返回条数,范围 1 到 30 | 30 |
|
|
172
|
+
| `-k, --api-key <key>` | API Key(可选) | 环境变量 |
|
|
173
|
+
| `-f, --format <format>` | 输出格式:`json` 或 `text` | json |
|
|
174
|
+
|
|
175
|
+
示例:
|
|
176
|
+
```bash
|
|
177
|
+
# 默认综合热点简报
|
|
178
|
+
aiconductor-cli content briefing -f text
|
|
179
|
+
|
|
180
|
+
# 只查看技术与产品来源
|
|
181
|
+
aiconductor-cli content briefing --sources aihot,hackernews,producthunt,juejin --limit 15 -f text
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
默认 JSON 输出保留以下字段,便于后续选题处理:
|
|
185
|
+
|
|
186
|
+
- `data.data.sources`:成功的综合热榜来源,兼容旧版本。
|
|
187
|
+
- `data.data.failed_sources`:综合热榜中失败的平台来源。
|
|
188
|
+
- `data.data.xhs_hot_list`:小红书热榜结果,包含日期与话题条目;小红书热榜接口失败时为 `null`。
|
|
189
|
+
- `data.data.failed_services`:综合热榜或小红书热榜接口级失败信息。
|
|
190
|
+
|
|
191
|
+
任一服务成功时命令仍会返回可用数据;只有两个服务都失败时才退出失败。成功来源和成功的小红书热榜调用均按平台现有规则计费。
|
|
192
|
+
|
|
193
|
+
### 抖音数据工具箱
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
aiconductor-cli douyin <子命令> [参数] [选项]
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
#### 获取作品详情
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
aiconductor-cli douyin video-info <分享链接> [选项]
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
示例:
|
|
206
|
+
```bash
|
|
207
|
+
aiconductor-cli douyin video-info "https://v.douyin.com/xxxxx/"
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
#### 获取作品评论
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
aiconductor-cli douyin video-comments <视频URL> [选项]
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
| 选项 | 说明 | 默认值 |
|
|
217
|
+
|------|------|--------|
|
|
218
|
+
| `--max-count` | 获取评论数量 | 50 |
|
|
219
|
+
| `-f, --format` | 输出格式 | json |
|
|
220
|
+
|
|
221
|
+
示例:
|
|
222
|
+
```bash
|
|
223
|
+
aiconductor-cli douyin video-comments "https://www.douyin.com/video/xxxxx" --max-count 100
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
#### 获取用户视频列表
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
aiconductor-cli douyin user-videos <用户主页URL> [选项]
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
| 选项 | 说明 | 默认值 |
|
|
233
|
+
|------|------|--------|
|
|
234
|
+
| `--max-pages` | 最大页数 | 1 |
|
|
235
|
+
| `--max-seconds` | 最长运行时间(秒),最大 180 | 50 |
|
|
236
|
+
| `-f, --format` | 输出格式 | json |
|
|
237
|
+
|
|
238
|
+
示例:
|
|
239
|
+
```bash
|
|
240
|
+
aiconductor-cli douyin user-videos "https://www.douyin.com/user/xxxxx" --max-pages 3
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
#### 获取用户详情
|
|
244
|
+
|
|
245
|
+
```bash
|
|
246
|
+
aiconductor-cli douyin user-detail <用户主页URL> [选项]
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
示例:
|
|
250
|
+
```bash
|
|
251
|
+
aiconductor-cli douyin user-detail "https://www.douyin.com/user/xxxxx"
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
#### 搜索用户
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
aiconductor-cli douyin user-search <关键词> [选项]
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
| 选项 | 说明 | 默认值 |
|
|
261
|
+
|------|------|--------|
|
|
262
|
+
| `--max-pages` | 最大页数,0=不限制 | 1 |
|
|
263
|
+
| `--max-seconds` | 最长运行时间(秒),最大 180 | 50 |
|
|
264
|
+
| `--fans-range` | 粉丝数筛选:`0_1k`/`1k_1w`/`1w_10w`/`10w_100w`/`100w_` | 无 |
|
|
265
|
+
| `--user-type` | 用户类型:`common_user`/`enterprise_user`/`personal_user` | 无 |
|
|
266
|
+
| `-f, --format` | 输出格式 | json |
|
|
267
|
+
|
|
268
|
+
示例:
|
|
269
|
+
```bash
|
|
270
|
+
aiconductor-cli douyin user-search "美食博主" --fans-range 10w_100w --user-type personal_user
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
#### 搜索视频
|
|
274
|
+
|
|
275
|
+
```bash
|
|
276
|
+
aiconductor-cli douyin video-search <关键词> [选项]
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
| 选项 | 说明 | 默认值 |
|
|
280
|
+
|------|------|--------|
|
|
281
|
+
| `--max-pages` | 最大页数,0=不限制 | 1 |
|
|
282
|
+
| `--max-seconds` | 最长运行时间(秒),最大 50 | 50 |
|
|
283
|
+
| `--sort-type` | 排序:0=综合,1=最多点赞,2=最新发布 | 0 |
|
|
284
|
+
| `--publish-time` | 发布时间:0=不限,1=一天,7=一周,180=半年 | 0 |
|
|
285
|
+
| `--filter-duration` | 时长:0=不限,0-1=1分钟内,1-5=1-5分钟,5-10000=5分钟以上 | 0 |
|
|
286
|
+
| `--content-type` | 内容类型:0=不限,1=视频,2=图片,3=文章 | 0 |
|
|
287
|
+
| `-f, --format` | 输出格式 | json |
|
|
288
|
+
|
|
289
|
+
示例:
|
|
290
|
+
```bash
|
|
291
|
+
aiconductor-cli douyin video-search "编程教程" --sort-type 2 --publish-time 7 --content-type 1
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
#### 视频链接转文字
|
|
295
|
+
|
|
296
|
+
```bash
|
|
297
|
+
aiconductor-cli douyin link-to-text <视频URL> [选项]
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
示例:
|
|
301
|
+
```bash
|
|
302
|
+
aiconductor-cli douyin link-to-text "https://www.douyin.com/video/xxxxx"
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
#### 原画下载
|
|
306
|
+
|
|
307
|
+
```bash
|
|
308
|
+
aiconductor-cli douyin video-original <视频URL|分享文案|作品ID> [选项]
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
拿最高画质(原画)直链与文件大小,和普通清晰度的 `Get_Download_Url` 是两个档位。
|
|
312
|
+
|
|
313
|
+
```bash
|
|
314
|
+
aiconductor-cli douyin video-original "https://www.douyin.com/video/7669664934044795354" -f text
|
|
315
|
+
aiconductor-cli douyin video-original "https://v.douyin.com/xxxxx/"
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
返回路径:`data.data.url`(直链)/ `file_size` / `file_size_mb` / `content_type` / `video_id`。
|
|
319
|
+
|
|
320
|
+
> **直链有时效**(带签名的 CDN 地址,过期返回 403),拿到就下,不要当永久地址存。实测一条作品的原画是 219 MB,下载侧请自行限流。
|
|
321
|
+
|
|
322
|
+
#### 选题雷达
|
|
323
|
+
|
|
324
|
+
```bash
|
|
325
|
+
aiconductor-cli douyin topic-radar [选项]
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
并行调用 `douyin_hot_words`(热词榜)、`douyin_hot_topics`(当前热点 + 飙升话题)、`douyin_rising_topics`(飙升热点)三个原子接口并在本地合并——**任一段失败仍照常输出其余两段**,失败段写在 `data.failed_sources`。
|
|
329
|
+
|
|
330
|
+
```bash
|
|
331
|
+
aiconductor-cli douyin topic-radar -f text
|
|
332
|
+
aiconductor-cli douyin topic-radar --limit 5
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
| 选项 | 说明 | 默认值 |
|
|
336
|
+
|------|------|--------|
|
|
337
|
+
| `-n, --limit <n>` | 飙升榜条数(1~20) | 10 |
|
|
338
|
+
|
|
339
|
+
返回路径:`data.data.hot_words`(`keyword` / `hot_index` / `trend_label`)、`data.data.hot_topics` 与 `data.data.rocketing_topics`(`topic_name` / `category` / `vv` / `content_cnt`)、`data.data.rising`(`sentence` / `hot_score` / `trend[]`)、`data.data.failed_sources`。
|
|
340
|
+
|
|
341
|
+
计费:三个原子接口各自按次计费(全成功合计 ¥0.15),CLI 不额外收费、也不打折。
|
|
342
|
+
|
|
343
|
+
### 小红书数据工具
|
|
344
|
+
|
|
345
|
+
获取小红书实时热榜:
|
|
346
|
+
|
|
347
|
+
```bash
|
|
348
|
+
aiconductor-cli xhs hot-list [选项]
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
示例:
|
|
352
|
+
```bash
|
|
353
|
+
aiconductor-cli xhs hot-list -f text
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
#### 笔记详情 `xhs note`
|
|
357
|
+
|
|
358
|
+
```bash
|
|
359
|
+
aiconductor-cli xhs note <ref> [选项]
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
`ref` 支持笔记链接、`xhslink.cn`/`xhslink.com` 短链、完整分享口令,或 24 位 `note_id`。
|
|
363
|
+
|
|
364
|
+
```bash
|
|
365
|
+
aiconductor-cli xhs note "https://www.xiaohongshu.com/discovery/item/6ae972260000000015020d84" -f text
|
|
366
|
+
aiconductor-cli xhs note "标题 https://xhslink.cn/o/85lbqBJtO94 复制内容,然后进入【小红书】查看相关笔记。"
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
#### 笔记评论 `xhs comments`
|
|
370
|
+
|
|
371
|
+
```bash
|
|
372
|
+
aiconductor-cli xhs comments <ref> [选项]
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
| 选项 | 说明 | 默认值 |
|
|
376
|
+
|------|------|--------|
|
|
377
|
+
| `--max-pages <n>` | 最大翻页数,范围 1~5 | 1 |
|
|
378
|
+
| `--max-seconds <n>` | 最长运行时间(秒),上限 170 | 50 |
|
|
379
|
+
|
|
380
|
+
返回一级评论,并带上上游可见的楼内回复(`sub_comments`)。`data.data.comments[]` 里 `like_count`、`sub_comment_count` 是**字符串**,评论的 `user` 对象用 `userid`/`original_name`(与笔记的 `user_id`/`nickname` 不同)。
|
|
381
|
+
|
|
382
|
+
#### 笔记搜索 `xhs search`
|
|
383
|
+
|
|
384
|
+
```bash
|
|
385
|
+
aiconductor-cli xhs search <keyword> [选项]
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
| 选项 | 说明 | 默认值 |
|
|
389
|
+
|------|------|--------|
|
|
390
|
+
| `--sort <sort>` | `general` / `time_descending` / `popularity_descending` / `comment_descending` / `collect_descending` | 不限 |
|
|
391
|
+
| `--note-time <range>` | `day` / `week` / `halfyear` | 不限 |
|
|
392
|
+
| `--note-type <type>` | `video` / `note` | 不限 |
|
|
393
|
+
| `--max-pages <n>` | 最大翻页数,范围 1~5 | 1 |
|
|
394
|
+
|
|
395
|
+
示例:
|
|
396
|
+
```bash
|
|
397
|
+
aiconductor-cli xhs search "AI编程" --note-time week --sort popularity_descending --max-pages 2 -f text
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
结果在 `data.data.items[].noteInfo` 与 `.userInfo`。注意 `noteInfo.readNum` 与 `userInfo.fansNum` 实测恒为 0,不要当真实阅读量/粉丝数用。
|
|
401
|
+
|
|
402
|
+
#### 用户详情 `xhs user` / 用户笔记 `xhs user-notes`
|
|
403
|
+
|
|
404
|
+
```bash
|
|
405
|
+
aiconductor-cli xhs user <ref> [选项]
|
|
406
|
+
aiconductor-cli xhs user-notes <ref> [选项] # 支持 --max-pages,范围 1~5
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
`ref` 支持主页链接 `/user/profile/<id>` 或 24 位 `user_id`。
|
|
410
|
+
|
|
411
|
+
```bash
|
|
412
|
+
aiconductor-cli xhs user "https://www.xiaohongshu.com/user/profile/53cd3bbbb4c4d64f93463018" -f text
|
|
413
|
+
aiconductor-cli xhs user-notes 53cd3bbbb4c4d64f93463018 --max-pages 2 -f text
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
用户详情在 `user_info`(`basic_info` + 5 项中文 `interactions` + `tags`);用户笔记在 `data.data.notes[]`。
|
|
417
|
+
|
|
418
|
+
> 时间口径:小红书所有 `time` 都是 **UTC 时间戳**(笔记详情为秒、用户笔记为毫秒),`-f text` 已自动换算成北京时间;**不要**再额外加 8 小时。上游的 `time_desc`(如 `10-28`)是 UTC-8 口径,文本模式不使用它。
|
|
419
|
+
|
|
420
|
+
### 小红书达人报告(蒲公英)
|
|
421
|
+
|
|
422
|
+
一次调用拿到达人的基础资料、粉丝画像与笔记性价比,并本地打分。内部是 **3 个原子接口并行调用**(`xhs_pgy_blogger` / `xhs_pgy_audience` / `xhs_pgy_performance`),至少两段成功才输出报告。
|
|
423
|
+
|
|
424
|
+
```bash
|
|
425
|
+
aiconductor-cli xhs daren-report <user_id 或 主页链接> [-f json|text]
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
示例:
|
|
429
|
+
|
|
430
|
+
```bash
|
|
431
|
+
aiconductor-cli xhs daren-report 5c5f8f4c000000001801612c -f text
|
|
432
|
+
aiconductor-cli xhs daren-report "https://www.xiaohongshu.com/user/profile/5c5f8f4c000000001801612c"
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
返回路径:`data.data.profile`(`name` / `red_id` / `fans_count` / `like_collect_count` / `business_note_count`)、`data.data.audience`(`gender` / `ages` / `interests`,**占比是 0~1 小数**)、`data.data.performance`(`hundred_like_percent` / `imp_median` / `interaction_rate` 等,**已是百分数**)、`data.data.score`(`value` / `tier` / `basis`)、`data.data.failed_sources`。
|
|
436
|
+
|
|
437
|
+
**打分公式**(纯规则,可自行复算):粉丝 40 分(≥10万=40、≥5万=34、≥1万=26、≥5千=18、≥1千=10、其余=4)+ 互动率 30 分(≥20%=30、≥10%=24、≥5%=16、≥2%=8)+ 百赞率 30 分(≥50=30、≥20=24、≥10=16、≥5=8);`≥80` 头部、`≥55` 腰部、其余尾部。任一段取数失败时按已拿到维度的满分之和归一,并标 `partial: true`。
|
|
438
|
+
|
|
439
|
+
计费:三个原子接口各自按次计费(全成功合计 ¥0.90),CLI 不额外收费。
|
|
440
|
+
|
|
441
|
+
### 小红书扫码发布
|
|
442
|
+
|
|
443
|
+
生成图文或视频笔记的 H5 发布页与二维码。素材支持公网 URL、本地文件、Base64/data URL,以及包含 Base64 内容的文本文件。
|
|
444
|
+
|
|
445
|
+
```bash
|
|
446
|
+
# 图文:URL 与本地图片混用
|
|
447
|
+
aiconductor-cli xhs note-publish normal \
|
|
448
|
+
--title "笔记标题" \
|
|
449
|
+
--images "https://example.com/photo1.jpg" \
|
|
450
|
+
--image-file "./photo2.jpg" \
|
|
451
|
+
--image-file "./photo3.png"
|
|
452
|
+
|
|
453
|
+
# 图文:较大 Base64 写入文本文件后使用 @路径
|
|
454
|
+
aiconductor-cli xhs note-publish normal \
|
|
455
|
+
--image-base64 "@./photo-base64.txt"
|
|
456
|
+
|
|
457
|
+
# 视频:本地视频与本地封面
|
|
458
|
+
aiconductor-cli xhs note-publish video \
|
|
459
|
+
--title "视频标题" \
|
|
460
|
+
--video-file "./video.mp4" \
|
|
461
|
+
--cover-file "./cover.jpg"
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
| 选项 | 说明 | 默认值 |
|
|
465
|
+
|------|------|--------|
|
|
466
|
+
| `--images <urls>` | 图片 URL 列表,逗号分隔 | 无 |
|
|
467
|
+
| `--image-file <path>` | 本地图片路径,可重复使用 | 无 |
|
|
468
|
+
| `--image-base64 <data>` | 图片 Base64、data URL 或 `@文本文件`,可重复使用 | 无 |
|
|
469
|
+
| `--video <url>` | 视频 URL | 无 |
|
|
470
|
+
| `--video-file <path>` | 本地视频路径 | 无 |
|
|
471
|
+
| `--video-base64 <data>` | 视频 Base64、data URL 或 `@文本文件` | 无 |
|
|
472
|
+
| `--cover <url>` | 视频封面 URL | 无 |
|
|
473
|
+
| `--cover-file <path>` | 本地视频封面路径 | 无 |
|
|
474
|
+
| `--cover-base64 <data>` | 封面 Base64、data URL 或 `@文本文件` | 无 |
|
|
475
|
+
| `--upload-valid-days <days>` | 本地/Base64 素材临时链接有效期:1 或 7 天 | 7 |
|
|
476
|
+
|
|
477
|
+
本地文件会在 CLI 内转换成 data URL,与 Base64 素材统一通过 JSON 接口免费上传为临时公开 URL,不使用 multipart。图片合计最多 18 张、单张最多 32MB;本地/Base64 视频受上传接口限制为 100MB,URL 视频上限为 200MB。
|
|
478
|
+
|
|
479
|
+
### 微信公众号数据工具
|
|
480
|
+
|
|
481
|
+
两个子命令:取单篇文章的互动数据、取公众号历史文章列表。
|
|
482
|
+
|
|
483
|
+
```bash
|
|
484
|
+
# 单篇文章互动数据(阅读 / 点赞 / 在看 等)
|
|
485
|
+
aiconductor-cli wx article-data "https://mp.weixin.qq.com/s?__biz=xxxx&mid=xxxx&idx=1&sn=xxxx"
|
|
486
|
+
|
|
487
|
+
# 公众号历史文章列表:用公众号名称或任意一篇文章链接定位
|
|
488
|
+
aiconductor-cli wx history --name "人民日报" --max-pages 3 --max-seconds 50
|
|
489
|
+
aiconductor-cli wx history "https://mp.weixin.qq.com/s?__biz=xxxx" -f text
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
| 选项 | 适用命令 | 说明 | 默认值 |
|
|
493
|
+
|------|----------|------|--------|
|
|
494
|
+
| `--name <name>` | `history` | 公众号名称或微信 ID(与 `url` 至少提供一个) | 无 |
|
|
495
|
+
| `--max-pages <n>` | `history` | 最大翻页数量 | 1 |
|
|
496
|
+
| `--max-seconds <n>` | `history` | 最长运行时间(秒),上限 170 | 50 |
|
|
497
|
+
|
|
498
|
+
返回路径:`article-data` 的互动数据在 `data.data`(`read` / `zan` / `looking` / `share_num` / `collect_num` / `comment_count`,text 模式渲染成阅读/点赞/在看/分享/收藏/评论,未知字段原样输出);`history` 的文章在 `data.data.data[]`(标题 `title`、时间 `post_time_str`、阅读 `read`、点赞 `zan`、链接 `url`)。
|
|
499
|
+
|
|
500
|
+
`history` 另带 `data.data.code`(上游返回码):`0` 才表示成功;非 0(如 `107` 名称/链接对不上、`20001` 平台侧上游故障)时 CLI 以退出码 1 报 `api_error`,不会用空列表冒充成功。
|
|
501
|
+
|
|
502
|
+
### 网页转 Markdown
|
|
503
|
+
|
|
504
|
+
把任意网页(包括微信公众号文章)转成干净的 Markdown,拿去给模型读、存档或二次排版。
|
|
505
|
+
|
|
506
|
+
```bash
|
|
507
|
+
# 公众号文章正文(链接请保留 chksm 参数,否则微信只返回页面框架)
|
|
508
|
+
aiconductor-cli web to-md "https://mp.weixin.qq.com/s?__biz=xxxx&mid=xxxx&idx=1&sn=xxxx&chksm=xxxx" -f text
|
|
509
|
+
|
|
510
|
+
# 普通网页(-t 可调超时,默认 30 秒)
|
|
511
|
+
aiconductor-cli web to-md "https://example.com/article" --timeout 45
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
| 选项 | 说明 | 默认值 |
|
|
515
|
+
|------|------|--------|
|
|
516
|
+
| `-t, --timeout <seconds>` | 请求下游的超时秒数 | 30 |
|
|
517
|
+
|
|
518
|
+
返回路径:`data.markdown`(**在顶层,不在 `data.data` 下**)。结果开头带 frontmatter(`title` / `author` / `site` / `source` / `domain` / `word_count`)——**有 `title` 与 `word_count` 才是真取到正文**;公众号链接若被裁掉 `chksm`,只能抓到“赞 / 在看 / 小程序”这类壳文字,text 模式会直接给出提示。
|
|
519
|
+
|
|
520
|
+
### 通用选项
|
|
521
|
+
|
|
522
|
+
所有命令支持:
|
|
523
|
+
- `-k, --api-key <key>` — API Key(优先级:参数 > 环境变量 > .env 文件)
|
|
524
|
+
- `-f, --format <json|text>` — 输出格式,默认 JSON
|
|
525
|
+
|
|
526
|
+
## 计费
|
|
527
|
+
|
|
528
|
+
| 功能 | 价格 |
|
|
529
|
+
|------|------|
|
|
530
|
+
| HTML 发布 | 0.01 元/次 |
|
|
531
|
+
| Markdown/HTML 网页发布 | 0.01 元/次 |
|
|
532
|
+
| 豆包网页/图片搜索 | 0.02 元/次 |
|
|
533
|
+
| 抖音作品详情 | 0.01 元/次 |
|
|
534
|
+
| 抖音作品评论 | 0.01 元/次 |
|
|
535
|
+
| 抖音用户视频列表 | 0.03 元/页 |
|
|
536
|
+
| 抖音用户详情 | 0.03 元/次 |
|
|
537
|
+
| 抖音用户搜索 | 0.15 元/页 |
|
|
538
|
+
| 抖音视频搜索 | 0.15 元/页 |
|
|
539
|
+
| 抖音链接转文字 | 0.01 元/次 + 0.0003 元/秒 |
|
|
540
|
+
| 小红书热榜 | 以平台服务配置为准 |
|
|
541
|
+
| 小红书笔记详情 | 以平台服务配置为准(按次) |
|
|
542
|
+
| 小红书笔记评论 | 以平台服务配置为准(按成功翻页数) |
|
|
543
|
+
| 小红书笔记搜索 | 以平台服务配置为准(按成功翻页数) |
|
|
544
|
+
| 小红书用户详情 | 以平台服务配置为准(按次) |
|
|
545
|
+
| 小红书用户笔记列表 | 以平台服务配置为准(按成功翻页数) |
|
|
546
|
+
| 小红书扫码发布 | 0.05 元/次 |
|
|
547
|
+
| 公众号文章互动数据 | 以平台服务配置为准(按次) |
|
|
548
|
+
| 公众号历史文章列表 | 以平台服务配置为准(按成功翻页数) |
|
|
549
|
+
|
|
550
|
+
> 搜索/调用失败不扣费,仅成功时计费。
|
|
551
|
+
|
|
552
|
+
## 开发
|
|
553
|
+
|
|
554
|
+
```bash
|
|
555
|
+
git clone https://github.com/huyi9531/aiconductor-cli.git
|
|
556
|
+
cd aiconductor-cli
|
|
557
|
+
npm install
|
|
558
|
+
node bin/aiconductor-cli.js --help # 本地运行
|
|
559
|
+
```
|
|
560
|
+
|
|
561
|
+
贡献前请阅读 [AGENTS.md](./AGENTS.md) 了解项目结构、编码风格与提交流程。
|
|
562
|
+
|
|
563
|
+
## License
|
|
564
|
+
|
|
565
|
+
MIT
|