Clink2 OpenAPI CLI
Project description
Clink2 命令行客户端,封装 OpenAPI 接口,与 智慧服务平台开发者中心 中参数与响应一致,适合脚本化集成与 Agent 调用。
当前版本: 0.0.2
PyPI: https://pypi.org/project/tinet-clink2-cli/
功能概览
| 子命令 | 说明 |
|---|---|
config |
本地凭证管理 |
ivr |
语音导航查询:列表、节点列表 |
voicemail |
留言箱设置:查看留言箱列表 |
所有出站 HTTP 请求自动附加:
X-Trace-Id: {UUID}X-Clink2-CLI-Version: {CLI 版本}
本地默认写入 JSON Lines 日志:~/.clink2/logs/clink2.log(单文件最大 10MB,滚动保留 5 个)。
环境要求
- Python ≥ 3.10
- 运行时需访问公有云接入地址,例如
https://api-bj.clink.cn/https://api-sh.clink.cn - 需在管理后台获取 AccessKeyId / AccessKeySecret(系统管理 → 安全设置 → 接口密钥)
安装
从 PyPI 安装(推荐):
pip install tinet-clink2-cli
tinet-clink2-cli --version # 0.0.2
tinet-clink2-cli --help
指定版本或升级:
pip install 'tinet-clink2-cli==0.0.2'
pip install --upgrade tinet-clink2-cli
macOS 等受限环境可使用 pipx:
pipx install tinet-clink2-cli
配置凭证
配置文件: ~/.clink2/config.json
配置示例:
tinet-clink2-cli config set \
--accessKeyId your_access_key_id \
--accessKeySecret your_access_key_secret \
--endpoint https://api-bj.clink.cn \
--expires 60 \
--log true
tinet-clink2-cli config show
默认接入地址为北京:https://api-bj.clink.cn。config show 会对 AccessKeySecret 脱敏。
快速示例
顺序与上方「功能概览」一致。完整取值见各子命令 --help 或 开发者中心。
# config
tinet-clink2-cli config show
# ivr
tinet-clink2-cli ivr nodes --ivrName your_ivr_name
tinet-clink2-cli --json ivr list
# dry-run:仅校验入参与配置,不调用服务端(是否写日志取决于 config.log)
tinet-clink2-cli --dry-run ivr list
tinet-clink2-cli --dry-run voicemail list --offset 0 --limit 10
# verbose:向 stderr 打印 url / method / 版本 Header / TraceId / result(不含 body)
tinet-clink2-cli --verbose --json voicemail list
全局选项:
--json:机器可读 stdout--dry-run:本地校验与预览,不发请求--verbose:stderr 排障
安全提示
- 勿将 AccessKeySecret 写入仓库、截图或日志外发渠道。
config set --log false为用户显式关闭本地审计;关闭后排障将缺少本地 JSON 日志。
帮助与 API 文档
tinet-clink2-cli --help
tinet-clink2-cli config --help
tinet-clink2-cli ivr --help
tinet-clink2-cli voicemail --help
OpenAPI 契约与字段说明见 智慧服务平台开发者中心。
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tinet_clink2_cli-0.0.2.tar.gz.
File metadata
- Download URL: tinet_clink2_cli-0.0.2.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62a4abebf7685b80e4d14fe98cce9218426b011e765d371c55139656eba73872
|
|
| MD5 |
fd93e4e5ee4c9caae6a49268891961cc
|
|
| BLAKE2b-256 |
2c15d1242a941b5d2778a7184cad9eac04fff171991095d841140f39dfa56b6f
|
File details
Details for the file tinet_clink2_cli-0.0.2-py3-none-any.whl.
File metadata
- Download URL: tinet_clink2_cli-0.0.2-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
883b5873e9103d9641c8f23fa32230be04009911db36eb8e929c01c26326685c
|
|
| MD5 |
f5070c720128e36944b6b6074afd18ff
|
|
| BLAKE2b-256 |
98b37ca4e59b63fe8a4406527a7f42c4d283e2e6fae18dca567f8dcc5d939275
|