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.0.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.0-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chatnet-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 d7e30e10383c5ed59516da86dd6e76799b70b41c6124645e5fd8ff682f5929f0
MD5 6df131b7fe3ebb8112885245a4d1c5b8
BLAKE2b-256 9a66b00cefbc9ef612d7cd06c8332e1a83a177e9f480379f9a1d27cf6a617b24

See more details on using hashes here.

Provenance

The following attestation bundles were made for chatnet-0.1.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: chatnet-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e8416131c83cee853ca6bba979b81aee8437f8a89ea32142015f645a00679c6a
MD5 7d15c8edf5582812b99e74f75dadaae3
BLAKE2b-256 ef7423143a9c187617d56061d1eb4934946c5ad75da97c631e144c0b1ba04f50

See more details on using hashes here.

Provenance

The following attestation bundles were made for chatnet-0.1.0-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