Skip to main content

ChatECNU

ChatECNU 是 ECNU 门户与校园网联网工具包。安装包名仍是 ChatECNU,日常命令主推 ecnu。 chatecnu 安装命令作为兼容别名保留;两个入口共享同一 Click 对象,命令树固定以规范名 ecnu 为根。

文档入口

任务 链接
安装和最小验证 https://arch.gh.wzhecnu.cn/ChatECNU/quickstart/
命令树 https://arch.gh.wzhecnu.cn/ChatECNU/cli-tree/
ChatEnv 变量 https://arch.gh.wzhecnu.cn/ChatECNU/chatenv/
ECNU 使用 https://arch.gh.wzhecnu.cn/ChatECNU/ecnu/

安装

pip install ChatECNU

如需验证码识别能力:

pip install "ChatECNU[captcha]"

命令结构

ChatECNU 的命令面可用 ecnu --tree 从当前 Click 注册表直接回读,默认包含参数签名;ecnu --tree-brief 保留命令节点和说明,但省略参数签名:

ecnu
├── --help  # Show this message and exit.
├── --version  # Show the version and exit.
├── --tree  # Print the registered CLI tree and exit.
├── --tree-brief  # Print the registered CLI tree without parameter signatures and exit.
├── --env ENV-PROFILE  # ChatEnv 配置名。
├── home  # ECNU 门户。
│   ├── info [--json]  # 门户首页摘要。
│   ├── login [--username USERNAME] [--password PASSWORD] [--sms-code SMS-CODE] [--json] [--interactive]  # 登录门户。
│   ├── logout [--json]  # 退出门户会话。
│   ├── status [--json]  # 门户会话状态。
│   └── user [--json]  # 门户用户信息。
├── net  # 校园网联网。
│   ├── check [--auth-client AUTH-CLIENT-PATH] [--setting-file SETTING-FILE] [--json]  # 检查在线状态。
│   ├── ensure-login [--auth-client AUTH-CLIENT-PATH] [--setting-file SETTING-FILE] [--username USERNAME] [--password PASSWORD] [--allow-argv-password] [--json] [--interactive]  # 离线时登录。
│   ├── login [--auth-client AUTH-CLIENT-PATH] [--setting-file SETTING-FILE] [--username USERNAME] [--password PASSWORD] [--allow-argv-password] [--json] [--interactive]  # 登录。
│   └── logout [--auth-client AUTH-CLIENT-PATH] [--setting-file SETTING-FILE] [--username USERNAME] [--json] [--interactive]  # 退出校园网。
└── visitor  # 访客账号。
    ├── create [--remark REMARK] [--dry-run] [--json] [--interactive]  # 创建访客账号。
    ├── default [--password1 PASSWORD1] [--password2 PASSWORD2] [--remark REMARK] [--json] [--interactive]  # 维护默认访客账号。
    ├── delete [--id VISITOR-ID] [--dry-run] [--json] [--interactive]  # 删除访客账号。
    ├── get [--id VISITOR-ID] [--account ACCOUNT] [--json]  # 查询访客账号。
    ├── list [--json]  # 列出访客账号。
    └── update [--id VISITOR-ID] [--remark REMARK] [--password PASSWORD] [--dry-run] [--json] [--interactive]  # 更新访客备注和密码。

门户命令统一放在 home 下:

ecnu home login -i
ecnu home info
ecnu home status
ecnu home user
ecnu home logout

门户会话默认写入 ChatEnv runtime token-store:~/.chatarch/tokens/ECNU/<profile>.json;ecnu home status --json 只回读安全摘要,不输出原始 Cookie/CSRF。chatenv token refresh ECNU <profile> 可从同名 stable env profile 发起非交互 OCR 自动登录并由 ChatEnv 写入 runtime token-store;遇到短信验证码或验证码候选失败时会安全失败。

校园网联网统一放在 net 下:

ecnu net check --json
ecnu net login -I --allow-argv-password
ecnu net logout -I
ecnu net ensure-login -I --allow-argv-password

ChatECNU 的 PyPI wheel/sdist 内置 Linux x86_64 auth_client,默认 ecnu net ... 会优先使用该内置二进制;如需覆盖,可用 --auth-client 或 ECNU_AUTH_CLIENT 指定路径。账号密码使用同一组 ECNU_USERNAME / ECNU_PASSWORD。net check 会显示当前 online/account/username;net logout 未提供用户名时会先从 auth_client check 的 Username=... 自动提取。

敏感值(密码、Cookie、短信码、会话)不要打印或提交。

Metadata

Release files for ChatECNU 0.2.6

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

Source distribution (sdist)

Source distribution for ChatECNU 0.2.6
File Size Uploaded
chatecnu-0.2.6.tar.gz 5.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for ChatECNU 0.2.6
File Interpreter ABI Platform
chatecnu-0.2.6-py3-none-any.whl Python 3 none any Details

Total release size: 10.6 MB

Release files / chatecnu-0.2.6.tar.gz

Download URL chatecnu-0.2.6.tar.gz
Size 5.3 MB
Tags Source
SHA-256 checksum
How to use checksums
a6ad82fc22188e8345a96e42effb55015793403ea2975c0a85eaa1815405e625
BLAKE2b-256 checksum
How to use checksums
07005600a5fa94d03e2641949dcaf7be3c08a5815f43a036374f38b91600b12f
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 / chatecnu-0.2.6-py3-none-any.whl

Download URL chatecnu-0.2.6-py3-none-any.whl
Size 5.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
b487359ce3f764414432e7552b7077ab56962190f3312bf0042929bc1172b9c8
BLAKE2b-256 checksum
How to use checksums
73b0c9860ea23a2d52539e40afc159fffe7a3c86686bbd6cda887a056b24c9be
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.2.6 This release

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

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