openboost-cli 1.0.1__tar.gz → 2.0.0__tar.gz
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.
- openboost_cli-2.0.0/LICENSE +21 -0
- openboost_cli-2.0.0/PKG-INFO +174 -0
- openboost_cli-2.0.0/README.md +152 -0
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/pyproject.toml +54 -51
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/setup.cfg +4 -4
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/__init__.py +21 -21
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/cli/__init__.py +1 -1
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/cli/interactive.py +107 -107
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/cli/main.py +567 -567
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/client.py +58 -58
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/coerce_args.py +62 -62
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/config.py +113 -117
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/mcp_client.py +113 -113
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/parse_result.py +53 -53
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/registry.py +112 -112
- openboost_cli-2.0.0/src/openboost_cli/schemas/__init__.py +1 -0
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/amazon/__init__.py +1 -1
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/amazon/amz_category_query.json +19 -19
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/amazon/amz_hot_amz_hot_cat_tree.json +24 -24
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/amazon/amz_hot_amz_hot_list.json +32 -32
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/amazon/amz_market_price.json +27 -27
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/amazon/amz_product_selection.json +139 -139
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/amazon/amz_review_query.json +27 -27
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/amazon/amz_sales_query.json +19 -19
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/amazon/amz_sku_query.json +19 -19
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/patent/__init__.py +1 -1
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/patent/patent_abstract_image.json +16 -16
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/patent/patent_abstract_translated.json +27 -27
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/patent/patent_bibliography.json +16 -16
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/patent/patent_claim_data.json +20 -20
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/patent/patent_claim_translated.json +27 -27
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/patent/patent_description.json +20 -20
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/patent/patent_description_translated.json +27 -27
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/patent/patent_family.json +16 -16
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/patent/patent_fulltext_image.json +28 -28
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/patent/patent_image_search_multiple.json +116 -116
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/patent/patent_image_search_single.json +113 -113
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/patent/patent_legal_status.json +16 -16
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/patent/patent_pdf.json +20 -20
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/patent/patent_query_count.json +35 -35
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/patent/patent_query_search.json +39 -39
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/patent/patent_query_search_with_agg.json +54 -54
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/patent/patent_semantic_search.json +47 -47
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/tiktok/__init__.py +1 -1
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/tiktok/tk_expert_sale_show.json +19 -19
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/tiktok/tt_commodity_detail.json +20 -20
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/tiktok/tt_commodity_expert_draw_expert_trend.json +19 -19
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/tiktok/tt_commodity_get_commodity_cat_tree.json +7 -7
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/tiktok/tt_commodity_info_list.json +179 -179
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/tiktok/tt_commodity_sales_trend.json +32 -32
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/tiktok/tt_commodity_statistics_get_category_statistics.json +27 -27
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/tiktok/tt_commodity_statistics_get_expert_statistics.json +27 -27
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/tiktok/tt_commodity_statistics_get_price_statistics.json +27 -27
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/tiktok/tt_commodity_statistics_get_total_statistics.json +27 -27
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/tiktok/tt_commodity_voice_analyze.json +35 -35
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/tiktok/tt_expert_basic_analyze.json +23 -23
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/tiktok/tt_expert_category_analyze.json +28 -28
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/tiktok/tt_expert_detail.json +19 -19
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/tiktok/tt_expert_fans_analyze.json +19 -19
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/tiktok/tt_expert_fans_portrait.json +19 -19
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/tiktok/tt_expert_info_list.json +179 -179
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/tiktok/tt_sale_channel_sale_channel.json +25 -25
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/tiktok/tt_shop_commodity_account_list.json +27 -27
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/tiktok/tt_shop_detail.json +27 -27
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/tiktok/tt_shop_info_list.json +107 -107
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/tiktok/tt_shop_market_info.json +27 -27
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/tiktok/tt_shop_sales_trend.json +32 -32
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/tiktok/tt_video_content.json +19 -19
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/tiktok/tt_video_detail.json +19 -19
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/tiktok/tt_video_info_list.json +151 -151
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/tiktok/tt_video_new_video_summary.json +19 -19
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/tiktok/tt_video_script_diy_query.json +19 -19
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/tiktok/tt_video_voice_read.json +27 -27
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas/tiktok/tt_video_voice_summary.json +27 -27
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli/schemas_loader.py +49 -49
- openboost_cli-2.0.0/src/openboost_cli.egg-info/PKG-INFO +174 -0
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli.egg-info/SOURCES.txt +4 -2
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli.egg-info/requires.txt +1 -4
- openboost_cli-2.0.0/tests/test_cli.py +115 -0
- openboost_cli-2.0.0/tests/test_config.py +41 -0
- openboost_cli-2.0.0/tests/test_mcp_client.py +122 -0
- openboost_cli-2.0.0/tests/test_schemas_and_parsing.py +64 -0
- openboost_cli-1.0.1/PKG-INFO +0 -171
- openboost_cli-1.0.1/README.md +0 -150
- openboost_cli-1.0.1/src/openboost_cli/schemas/__init__.py +0 -1
- openboost_cli-1.0.1/src/openboost_cli.egg-info/PKG-INFO +0 -171
- openboost_cli-1.0.1/tests/test_cli.py +0 -28
- openboost_cli-1.0.1/tests/test_parse_result.py +0 -37
- openboost_cli-1.0.1/tests/test_schemas_and_args.py +0 -41
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli.egg-info/dependency_links.txt +0 -0
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli.egg-info/entry_points.txt +0 -0
- {openboost_cli-1.0.1 → openboost_cli-2.0.0}/src/openboost_cli.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 OpenBoost CLI contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: openboost-cli
|
|
3
|
+
Version: 2.0.0
|
|
4
|
+
Summary: Unified CLI and Python client for OpenBoost TikTok, Patent, and Amazon MCP servers.
|
|
5
|
+
Author: OpenBoost CLI
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Keywords: mcp,cli,openboost,tiktok,patent,amazon
|
|
8
|
+
Classifier: Environment :: Console
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Requires-Python: >=3.10
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
License-File: LICENSE
|
|
17
|
+
Requires-Dist: httpx>=0.27
|
|
18
|
+
Requires-Dist: mcp<2,>=1.24
|
|
19
|
+
Requires-Dist: rich>=13.0
|
|
20
|
+
Requires-Dist: typer>=0.12
|
|
21
|
+
Dynamic: license-file
|
|
22
|
+
|
|
23
|
+
# openboost-cli
|
|
24
|
+
|
|
25
|
+
OpenBoost MCP 的统一命令行工具和 Python 客户端,支持 TikTok、Patent 和 Amazon 三类 MCP 服务。
|
|
26
|
+
|
|
27
|
+
- PyPI 包名:`openboost-cli`
|
|
28
|
+
- 命令行入口:`openboost`
|
|
29
|
+
- Python 包名:`openboost_cli`
|
|
30
|
+
- Python 版本:3.10 及以上
|
|
31
|
+
|
|
32
|
+
## 安装
|
|
33
|
+
|
|
34
|
+
从 PyPI 安装:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
pip install openboost-cli
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
从源码使用 uv 安装开发环境:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
uv sync
|
|
44
|
+
uv run openboost --help
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## 配置
|
|
48
|
+
|
|
49
|
+
可以将通用密钥写入配置文件:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
openboost config set --secret-key "your-secret-key"
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
也可以只配置某个 MCP:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
openboost config set --mcp amazon --secret-key "your-secret-key"
|
|
59
|
+
openboost config set --mcp amazon --base-url "http://mcp.microdata-inc.com/mcp-servers/proboost-amazon-mcp"
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
默认配置文件位于:
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
~/.config/openboost/config.json
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
支持以下环境变量:
|
|
69
|
+
|
|
70
|
+
```text
|
|
71
|
+
OPENBOOST_CONFIG
|
|
72
|
+
OPENBOOST_SECRET_KEY
|
|
73
|
+
OPENBOOST_TIKTOK_SECRET_KEY
|
|
74
|
+
OPENBOOST_PATENT_SECRET_KEY
|
|
75
|
+
OPENBOOST_AMAZON_SECRET_KEY
|
|
76
|
+
OPENBOOST_TIKTOK_BASE_URL
|
|
77
|
+
OPENBOOST_PATENT_BASE_URL
|
|
78
|
+
OPENBOOST_AMAZON_BASE_URL
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
密钥也可仅对一次调用通过顶层 `--key` 参数提供。不要将密钥提交到代码仓库。
|
|
82
|
+
|
|
83
|
+
## 命令行使用
|
|
84
|
+
|
|
85
|
+
查看帮助和全部工具:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
openboost --help
|
|
89
|
+
openboost list
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
查看某个工具的参数:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
openboost docs tiktok tt_commodity_info_list
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
使用快捷命令:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
openboost tiktok commodity category-tree
|
|
102
|
+
openboost patent search count "TACD: virtual reality"
|
|
103
|
+
openboost amazon hot cat-tree --site 1 --rank-type "Best Seller"
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
使用通用调用命令:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
openboost call tiktok tt_video_content \
|
|
110
|
+
--set countryRegion=美国 \
|
|
111
|
+
--set videoId=123456
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
复杂参数可以从 JSON 文件或标准输入读取:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
openboost call patent patent_query_search --payload request.json
|
|
118
|
+
echo '{"query_text":"TACD: virtual reality","limit":10}' | \
|
|
119
|
+
openboost call patent patent_query_search --stdin
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
不带子命令运行 `openboost` 会进入交互式菜单,也可以显式运行:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
openboost tui
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Python 客户端
|
|
129
|
+
|
|
130
|
+
Python 客户端按 MCP 分类提供动态工具方法,方法名与 MCP tool name 保持一致:
|
|
131
|
+
|
|
132
|
+
```python
|
|
133
|
+
from openboost_cli import OpenBoost
|
|
134
|
+
|
|
135
|
+
client = OpenBoost(secret_key="your-secret-key")
|
|
136
|
+
|
|
137
|
+
result = client.tiktok.tt_video_content(
|
|
138
|
+
countryRegion="美国",
|
|
139
|
+
videoId="123456",
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
patents = client.patent.patent_query_search(
|
|
143
|
+
query_text="TACD: virtual reality",
|
|
144
|
+
limit=10,
|
|
145
|
+
)
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
也可以按名称取得某个 MCP 客户端:
|
|
149
|
+
|
|
150
|
+
```python
|
|
151
|
+
tiktok = client.client("tiktok")
|
|
152
|
+
result = tiktok.call_tool(
|
|
153
|
+
"tt_commodity_get_commodity_cat_tree",
|
|
154
|
+
{},
|
|
155
|
+
)
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## 开发与构建
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
uv sync
|
|
162
|
+
uv run pytest
|
|
163
|
+
uv build
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
单元测试不会访问真实接口。真实接口 smoke test 必须同时显式设置开关和密钥:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
OPENBOOST_RUN_INTEGRATION=1 \
|
|
170
|
+
OPENBOOST_TIKTOK_SECRET_KEY="your-secret-key" \
|
|
171
|
+
uv run pytest -m integration
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
项目不会自动发布到 PyPI;发布前请人工检查构建产物和版本号。
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# openboost-cli
|
|
2
|
+
|
|
3
|
+
OpenBoost MCP 的统一命令行工具和 Python 客户端,支持 TikTok、Patent 和 Amazon 三类 MCP 服务。
|
|
4
|
+
|
|
5
|
+
- PyPI 包名:`openboost-cli`
|
|
6
|
+
- 命令行入口:`openboost`
|
|
7
|
+
- Python 包名:`openboost_cli`
|
|
8
|
+
- Python 版本:3.10 及以上
|
|
9
|
+
|
|
10
|
+
## 安装
|
|
11
|
+
|
|
12
|
+
从 PyPI 安装:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
pip install openboost-cli
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
从源码使用 uv 安装开发环境:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
uv sync
|
|
22
|
+
uv run openboost --help
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## 配置
|
|
26
|
+
|
|
27
|
+
可以将通用密钥写入配置文件:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
openboost config set --secret-key "your-secret-key"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
也可以只配置某个 MCP:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
openboost config set --mcp amazon --secret-key "your-secret-key"
|
|
37
|
+
openboost config set --mcp amazon --base-url "http://mcp.microdata-inc.com/mcp-servers/proboost-amazon-mcp"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
默认配置文件位于:
|
|
41
|
+
|
|
42
|
+
```text
|
|
43
|
+
~/.config/openboost/config.json
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
支持以下环境变量:
|
|
47
|
+
|
|
48
|
+
```text
|
|
49
|
+
OPENBOOST_CONFIG
|
|
50
|
+
OPENBOOST_SECRET_KEY
|
|
51
|
+
OPENBOOST_TIKTOK_SECRET_KEY
|
|
52
|
+
OPENBOOST_PATENT_SECRET_KEY
|
|
53
|
+
OPENBOOST_AMAZON_SECRET_KEY
|
|
54
|
+
OPENBOOST_TIKTOK_BASE_URL
|
|
55
|
+
OPENBOOST_PATENT_BASE_URL
|
|
56
|
+
OPENBOOST_AMAZON_BASE_URL
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
密钥也可仅对一次调用通过顶层 `--key` 参数提供。不要将密钥提交到代码仓库。
|
|
60
|
+
|
|
61
|
+
## 命令行使用
|
|
62
|
+
|
|
63
|
+
查看帮助和全部工具:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
openboost --help
|
|
67
|
+
openboost list
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
查看某个工具的参数:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
openboost docs tiktok tt_commodity_info_list
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
使用快捷命令:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
openboost tiktok commodity category-tree
|
|
80
|
+
openboost patent search count "TACD: virtual reality"
|
|
81
|
+
openboost amazon hot cat-tree --site 1 --rank-type "Best Seller"
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
使用通用调用命令:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
openboost call tiktok tt_video_content \
|
|
88
|
+
--set countryRegion=美国 \
|
|
89
|
+
--set videoId=123456
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
复杂参数可以从 JSON 文件或标准输入读取:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
openboost call patent patent_query_search --payload request.json
|
|
96
|
+
echo '{"query_text":"TACD: virtual reality","limit":10}' | \
|
|
97
|
+
openboost call patent patent_query_search --stdin
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
不带子命令运行 `openboost` 会进入交互式菜单,也可以显式运行:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
openboost tui
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Python 客户端
|
|
107
|
+
|
|
108
|
+
Python 客户端按 MCP 分类提供动态工具方法,方法名与 MCP tool name 保持一致:
|
|
109
|
+
|
|
110
|
+
```python
|
|
111
|
+
from openboost_cli import OpenBoost
|
|
112
|
+
|
|
113
|
+
client = OpenBoost(secret_key="your-secret-key")
|
|
114
|
+
|
|
115
|
+
result = client.tiktok.tt_video_content(
|
|
116
|
+
countryRegion="美国",
|
|
117
|
+
videoId="123456",
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
patents = client.patent.patent_query_search(
|
|
121
|
+
query_text="TACD: virtual reality",
|
|
122
|
+
limit=10,
|
|
123
|
+
)
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
也可以按名称取得某个 MCP 客户端:
|
|
127
|
+
|
|
128
|
+
```python
|
|
129
|
+
tiktok = client.client("tiktok")
|
|
130
|
+
result = tiktok.call_tool(
|
|
131
|
+
"tt_commodity_get_commodity_cat_tree",
|
|
132
|
+
{},
|
|
133
|
+
)
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## 开发与构建
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
uv sync
|
|
140
|
+
uv run pytest
|
|
141
|
+
uv build
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
单元测试不会访问真实接口。真实接口 smoke test 必须同时显式设置开关和密钥:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
OPENBOOST_RUN_INTEGRATION=1 \
|
|
148
|
+
OPENBOOST_TIKTOK_SECRET_KEY="your-secret-key" \
|
|
149
|
+
uv run pytest -m integration
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
项目不会自动发布到 PyPI;发布前请人工检查构建产物和版本号。
|
|
@@ -1,51 +1,54 @@
|
|
|
1
|
-
[build-system]
|
|
2
|
-
requires = ["setuptools>=
|
|
3
|
-
build-backend = "setuptools.build_meta"
|
|
4
|
-
|
|
5
|
-
[project]
|
|
6
|
-
name = "openboost-cli"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"Environment :: Console",
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
[tool.setuptools
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
]
|
|
46
|
-
|
|
47
|
-
[tool.setuptools.
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
[tool.pytest.ini_options]
|
|
51
|
-
testpaths = ["tests"]
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "openboost-cli"
|
|
7
|
+
version = "2.0.0"
|
|
8
|
+
description = "Unified CLI and Python client for OpenBoost TikTok, Patent, and Amazon MCP servers."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
license-files = ["LICENSE"]
|
|
13
|
+
authors = [
|
|
14
|
+
{ name = "OpenBoost CLI" },
|
|
15
|
+
]
|
|
16
|
+
keywords = ["mcp", "cli", "openboost", "tiktok", "patent", "amazon"]
|
|
17
|
+
classifiers = [
|
|
18
|
+
"Environment :: Console",
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"Programming Language :: Python :: 3.10",
|
|
21
|
+
"Programming Language :: Python :: 3.11",
|
|
22
|
+
"Programming Language :: Python :: 3.12",
|
|
23
|
+
"Programming Language :: Python :: 3.13",
|
|
24
|
+
]
|
|
25
|
+
dependencies = [
|
|
26
|
+
"httpx>=0.27",
|
|
27
|
+
"mcp>=1.24,<2",
|
|
28
|
+
"rich>=13.0",
|
|
29
|
+
"typer>=0.12",
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
[project.scripts]
|
|
33
|
+
openboost = "openboost_cli.cli.main:main"
|
|
34
|
+
|
|
35
|
+
[dependency-groups]
|
|
36
|
+
dev = [
|
|
37
|
+
"pytest>=8",
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
[tool.setuptools]
|
|
41
|
+
package-dir = { "" = "src" }
|
|
42
|
+
include-package-data = false
|
|
43
|
+
|
|
44
|
+
[tool.setuptools.packages.find]
|
|
45
|
+
where = ["src"]
|
|
46
|
+
|
|
47
|
+
[tool.setuptools.package-data]
|
|
48
|
+
openboost_cli = ["schemas/*/*.json"]
|
|
49
|
+
|
|
50
|
+
[tool.pytest.ini_options]
|
|
51
|
+
testpaths = ["tests"]
|
|
52
|
+
markers = [
|
|
53
|
+
"integration: tests that call a live OpenBoost MCP endpoint",
|
|
54
|
+
]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[egg_info]
|
|
2
|
-
tag_build =
|
|
3
|
-
tag_date = 0
|
|
4
|
-
|
|
1
|
+
[egg_info]
|
|
2
|
+
tag_build =
|
|
3
|
+
tag_date = 0
|
|
4
|
+
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
"""Unified
|
|
2
|
-
|
|
3
|
-
__version__ = "
|
|
4
|
-
|
|
5
|
-
DEFAULT_BASE_URLS = {
|
|
6
|
-
"tiktok": "http://mcp.microdata-inc.com/mcp-servers/proboost-tiktok-mcp",
|
|
7
|
-
"patent": "http://mcp.microdata-inc.com/mcp-servers/proboost-patent-mcp",
|
|
8
|
-
"amazon": "http://mcp.microdata-inc.com/mcp-servers/proboost-amazon-mcp",
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
MCP_LABELS = {
|
|
12
|
-
"tiktok": "TikTok",
|
|
13
|
-
"patent": "Patent",
|
|
14
|
-
"amazon": "Amazon",
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
MCP_NAMES = tuple(DEFAULT_BASE_URLS.keys())
|
|
18
|
-
|
|
19
|
-
from .client import
|
|
20
|
-
|
|
21
|
-
__all__ = ["DEFAULT_BASE_URLS", "MCP_LABELS", "MCP_NAMES", "
|
|
1
|
+
"""Unified OpenBoost MCP CLI and Python client."""
|
|
2
|
+
|
|
3
|
+
__version__ = "2.0.0"
|
|
4
|
+
|
|
5
|
+
DEFAULT_BASE_URLS = {
|
|
6
|
+
"tiktok": "http://mcp.microdata-inc.com/mcp-servers/proboost-tiktok-mcp",
|
|
7
|
+
"patent": "http://mcp.microdata-inc.com/mcp-servers/proboost-patent-mcp",
|
|
8
|
+
"amazon": "http://mcp.microdata-inc.com/mcp-servers/proboost-amazon-mcp",
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
MCP_LABELS = {
|
|
12
|
+
"tiktok": "TikTok",
|
|
13
|
+
"patent": "Patent",
|
|
14
|
+
"amazon": "Amazon",
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
MCP_NAMES = tuple(DEFAULT_BASE_URLS.keys())
|
|
18
|
+
|
|
19
|
+
from .client import OpenBoost
|
|
20
|
+
|
|
21
|
+
__all__ = ["DEFAULT_BASE_URLS", "MCP_LABELS", "MCP_NAMES", "OpenBoost", "__version__"]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"""CLI entry points."""
|
|
1
|
+
"""CLI entry points."""
|