Skip to main content

ChatBrowser

ChatBrowser 是 ChatArch 的浏览器运行态基础包。它不做平台账号语义,也不安装系统依赖;它只管理浏览器 backend 探测、profile 元数据、本机 loopback CDP endpoint 注册和 session endpoint 读取,供 ChatPost、Wechatsync 等上层发布工具复用。

文档入口:https://arch.gh.wzhecnu.cn/ChatBrowser/

边界

ChatUp       = setup / install / configure
ChatBrowser  = browser backend / profile metadata / session endpoint / CDP registry
Wechatsync   = platform adapter / auth check / draft write
ChatPost     = post/task orchestration / multi-platform publishing workflow

ChatBrowser 不读取、打印或迁移平台账号数据;profile 目录里的浏览器状态由浏览器自己维护。--label 只能保存非敏感标签键值,token、password、cookie、account、api_key、auth、login、session 等敏感 key 会被拒绝。

快速开始

pip install ChatBrowser
chatbrowser --help
chatbrowser --tree
chatbrowser --tree-brief
chatbrowser doctor --output json
chatbrowser backend list --output json

注册一个已有浏览器 profile 目录:

chatbrowser profile create zhihu-test \
  --path /path/to/browser-profile \
  --backend chrome-for-testing \
  --output json

chatbrowser profile show zhihu-test --output json
chatbrowser profile path zhihu-test

接入一个已经运行的本机 loopback CDP endpoint(只接受不含 userinfo/path/query/fragment 的 http://127.0.0.1:<port> / http://localhost:<port> / IPv6 localhost),不接管也不关闭该浏览器:

chatbrowser connect \
  --cdp-url http://127.0.0.1:9229 \
  --as-session-name zhihu-test-existing \
  --profile zhihu-test \
  --output json

chatbrowser session endpoint zhihu-test-existing
chatbrowser disconnect zhihu-test-existing

当前 CLI

顶层树回读由 ChatStyle 共享 Click runtime 生成:chatbrowser --tree 默认显示参数签名,chatbrowser --tree-brief 保留命令节点和描述但省略参数签名。下面是简化概览。

chatbrowser
├── doctor
├── backend
│   ├── list
│   ├── show <name>
│   └── resolve <name>
├── profile
│   ├── list
│   ├── create <name>
│   ├── show <name>
│   ├── path <name>
│   └── status <name>
├── connect
├── disconnect <session-id>
└── session
    ├── list
    ├── show <session-id>
    └── endpoint <session-id>

开发检查

pip install -e ".[dev,docs]"
python -m pytest -q
python -m build
mkdocs build --strict

新增命令时保持 CLI 是薄封装:核心逻辑先放进可 import Python API,再让 Click 命令调用它。

Metadata

Release files for ChatBrowser 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ChatBrowser 0.1.5
File Size Uploaded
chatbrowser-0.1.5.tar.gz 13.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ChatBrowser 0.1.5
File Interpreter ABI Platform
chatbrowser-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 26.4 kB

Release files / chatbrowser-0.1.5.tar.gz

Download URL chatbrowser-0.1.5.tar.gz
Size 13.9 kB
Tags Source
SHA-256 checksum
How to use checksums
8ec6e4647c2193a6e40fec7d8009539638747a7e9ebe966de775f6c0a5f34ba3
BLAKE2b-256 checksum
How to use checksums
ced45c4546ffdd6be9e1abd7f34dfab278e200163182006fcb7131e234e3377c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 21, 2026.

Transparency log

Release files / chatbrowser-0.1.5-py3-none-any.whl

Download URL chatbrowser-0.1.5-py3-none-any.whl
Size 12.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2169a66020640812f0ac0c2de91a957eca96add870de78852b6175e838c2bbf1
BLAKE2b-256 checksum
How to use checksums
8bdce644acbdce57ea88004d2ff84523afa7cedf88001e630fd169cf93e67e10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 21, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.1

2 release 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