Skip to main content

ChatArch network and campus-network CLI

Project description

ChatNet

ChatNet 是 ChatArch 系列的网络与校园网 CLI,当前提供 ECNU 自助服务平台登录、查询和访客管理能力。

快速开始

pip install -e ".[dev]"
chatnet hello ChatArch
chatnet ecnu selftest
python -m pytest -q
python -m build

ECNU CLI

ECNU 自助服务平台能力统一挂在 chatnet ecnu 下,覆盖登录、会话、日志查询和访客管理。

默认配置使用 chatenv 规范,位于 ~/.chatarch/envs/ECNU/.env

chatenv cat -t ecnu
chatnet ecnu login-init
chatnet ecnu login --username "$ECNU_USERNAME" --password "$ECNU_PASSWORD" --captcha ABCD
chatnet ecnu home
chatnet ecnu auth-log --limit 10
chatnet ecnu visitor list
chatnet ecnu visitor create --remark GuestB
chatnet ecnu visitor update --id 10256703 --remark GuestB --password 'Temp!235'

自动验证码登录依赖可选 OCR extra:

pip install -e ".[captcha]"
chatnet ecnu login-auto --username "$ECNU_USERNAME" --password "$ECNU_PASSWORD"

缺少可恢复参数时,命令会按 ChatArch 规范进入交互补问;-i 强制交互,-I 禁止交互并快速失败。密码、Cookie、短信验证码等敏感值不要写入文档或提交记录。

完整使用文档见 docs/ecnu.md

CLI 规范

这个模板默认依赖 chatstyle>=0.1.0chatenv>=0.1.1,新的命令应优先使用:

  • CommandSchema / CommandField 描述输入。
  • add_interactive_option() 提供统一 -i/-I
  • resolve_command_inputs() 统一缺参补问、默认值、TTY 与校验。

目录结构

  • src/:包源码
  • tests/code-tests/:代码测试和历史测试迁移
  • tests/cli-tests/:真实 CLI 测试,doc-first
  • tests/mock-cli-tests/:mock/fake CLI 测试,doc-first
  • docs/:长期维护文档,由 mkdocs 构建

开发说明

扩展脚手架前,先阅读 DEVELOP.mdAGENTS.md

Project details


Download files

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

Source Distribution

chatnet-0.1.1.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

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

chatnet-0.1.1-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file chatnet-0.1.1.tar.gz.

File metadata

  • Download URL: chatnet-0.1.1.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for chatnet-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9ac2706987f768c85b85762294d69c33424e825d17623bf17e920ac6a12f1c7e
MD5 48cbef36517a9ca8ecf8532a2a26572f
BLAKE2b-256 a4b9aa6708344fd3f42b17c1fa546b99a489dea75eee92e6fae30f51431cc9ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for chatnet-0.1.1.tar.gz:

Publisher: publish.yml on ChatArch/ChatNet

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file chatnet-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: chatnet-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for chatnet-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 79f1b74a873cc1a38e7364b64c7c1701130e10ad6d706488fa132c05a445dcdb
MD5 ea21806734a721372ac82af3d6868524
BLAKE2b-256 7bbe0cfe4b993dfa97960dba9689e90f19a038ea6f5b8098c7cff506c01b1cf4

See more details on using hashes here.

Provenance

The following attestation bundles were made for chatnet-0.1.1-py3-none-any.whl:

Publisher: publish.yml on ChatArch/ChatNet

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page