Skip to main content

Collector CLI MVP

PyPI 安装

pip install wecar-wechat-collector-cli
wecar-wechat-collector status

需要连接其他电脑上的采集器时,可临时指定地址:

wecar-wechat-collector --url http://192.168.1.20:18765 status

也可以复制并修改包内的 config/collector-cli.toml,再通过 --config 路径 指定自己的配置文件。

该目录是云端 Agent Skill 使用的独立命令行客户端。它只使用 Python 标准库,不依赖 wechat_mvp、OpenCV、OCR 或 SQLite,可以将整个 collector_cli/ 文件夹单独复制、 压缩并分发到其他电脑。

独立目录

collector_cli/
├─ config/
│  └─ collector-cli.toml   API 地址、请求超时和默认查询条数
├─ __init__.py
├─ __main__.py
├─ cli.py
├─ client.py
├─ README.md
└─ API.md

需要 Python 3.11 或更高版本,不需要安装第三方依赖。

配置

编辑 collector_cli/config/collector-cli.toml

[api]
base_url = "http://192.168.1.20:18765"
timeout_seconds = 5.0

[query]
default_next_limit = 30
default_history_limit = 50

base_url 必须填写采集机真实的局域网 IP。不要使用 0.0.0.0,它只能作为采集器 服务端监听地址。

使用

在包含 collector_cli/ 的父目录执行:

python -m collector_cli status
python -m collector_cli next --limit 30
python -m collector_cli history --conversation-id 12 --limit 50
python -m collector_cli ack --conversation-id 12 --through-message-id 105 --decision replied

也支持直接执行目录:

python collector_cli status

next 只读,不会推进游标;发送失败时不要调用 ackack 成功后,后续 next 只返回该会话中更新的消息。

默认接口、请求超时以及 next/history 默认条数来自目录内部的 config/collector-cli.toml。全局 --url--timeout 和各命令的 --limit 可临时 覆盖配置;使用其他配置文件时传入 --config 路径

从局域网其他电脑读取时,--url 必须填写采集机的真实局域网 IP,例如:

python -m collector_cli --url http://192.168.1.20:18765 status

不要使用 http://0.0.0.0:187650.0.0.0 只用于采集器监听全部网卡。

完整的 HTTP 路径、请求参数、消息字段、分页和消费游标语义见 API.md

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wecar_wechat_collector_cli-0.1.0.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wecar_wechat_collector_cli-0.1.0-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file wecar_wechat_collector_cli-0.1.0.tar.gz.

File metadata

File hashes

Hashes for wecar_wechat_collector_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bad403ca39b8cfef2b48e286ff1a7a9b58290c669d248e10926b7e8a5cc33ef6
MD5 24a9e488829763cd649884c464a89ff5
BLAKE2b-256 a3aec6dbc946893804557df7d9c81a9f0e817533cfb665fc12764f58542506dc

See more details on using hashes here.

File details

Details for the file wecar_wechat_collector_cli-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for wecar_wechat_collector_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bcfe0fc4250699f972c0e40cc84efef5bc3d604d999b2720c05efa08a4125a27
MD5 1c41a7a0a8dba8627ca58dcb74135b52
BLAKE2b-256 5a026d7f0332c9c79df1795f39f0643d8a7cb85683df25e65b3921eae470eb3b

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.0

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page