Skip to main content

ChatLinux

ChatArch Linux 运维包。当前首个业务能力是 fleet 状态缓存 CLI:用 ChatArch 内部配置 track 服务器,通过 Ansible 刷新常规公共指标,并从本地缓存快速查看状态。

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

按场景选择文档:

场景 文档
第一次安装、初始化 .cube track、刷新/查看缓存 快速开始
查看当前真实 CLI 命令树和 shell 用法 CLI 树
校对当前包有哪些一等能力和边界 能力地图
从 Python 代码调用包能力 接口树

快速开始

pip install ChatLinux
chatlinux --version
chatlinux fleet init --sample cube
chatlinux fleet refresh --track cube
chatlinux fleet show --track cube

开发 checkout 中可用:

pip install -e ".[dev,docs]"
PYTHONPATH=src python -m pytest -q
PYTHONPATH=src python -m chatlinux.cli fleet --help

Fleet 配置与缓存

默认本地状态根是一个 ChatArch 内部路径:优先使用 CHATLINUX_HOME,否则使用 $CHATARCH_HOME/chatlinux,再否则回落到 ~/.chatarch/chatlinux。默认落点包括:

~/.chatarch/chatlinux/fleet.json
~/.chatarch/chatlinux/cache/<track>-status.json
~/.chatarch/chatlinux/runtime/fleet-inventory.ini
~/.chatarch/chatlinux/runtime/fleet_probe.py

其中 runtime/ 只保存 refresh 时生成的 Ansible inventory 和只读 probe;它仍在 ChatArch home 内部,不写入 /etc/usr、系统服务目录或任务仓库。ChatEnv provider namespace 也使用小写 chatlinux,未来 ChatEnv 托管值同样归入 ChatArch home,不在工作区散落文件。

chatlinux fleet init --json 会回显完整 state_paths,用于验收 config/cache/runtime 等本地数据落点是否仍在同一个 state root 下。

任务目录或 CI 中可用 --home 隔离:

chatlinux fleet --home ./playground/chatlinux-home init --sample cube --json
chatlinux fleet --home ./playground/chatlinux-home status --track cube --refresh

安全边界

  • show / status 默认只读本地缓存;refreshstatus --refresh 才会访问服务器。
  • 当前 MVP 只采集常规公共指标:CPU/load、内存、swap、文件系统、GPU 可用信息和 failed systemd units。
  • 不执行 sudo,不清理、不重启、不修复远端服务。

命令行规范

这个包依赖 chatstyle>=0.1.0,<0.2.0chatenv>=0.2.0,<0.3.0。新增命令应优先使用:

  • CommandSchema / CommandField 描述输入。
  • add_interactive_option() 提供统一 -i/-I
  • resolve_command_inputs() 统一缺参补问、默认值、TTY 与校验。
  • 默认保留 config.pychatenv.configs 入口点,使包可被 ChatEnv 发现。

目录结构

  • src/:包源码
  • tests/:代码测试与 CLI 测试
  • docs/:长期维护文档,由 mkdocs 构建

开发说明

扩展包前,先阅读 DEVELOP.mdAGENTS.md

Download files

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

Source Distribution

chatlinux-0.2.0.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

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

chatlinux-0.2.0-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file chatlinux-0.2.0.tar.gz.

File metadata

  • Download URL: chatlinux-0.2.0.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for chatlinux-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ddca2be1081c4940d627aa0ec4bee40ea39320d4381ea4d64e2e6aa0c63332d5
MD5 7a2ccdb1335fb7fe9f79b27d6e29f8f5
BLAKE2b-256 6e8e15151c8bcb8cb950820b65f32bd8b57b93b5605397d8e482217ee88d8d30

See more details on using hashes here.

Provenance

The following attestation bundles were made for chatlinux-0.2.0.tar.gz:

Publisher: publish.yml on ChatArch/ChatLinux

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

File details

Details for the file chatlinux-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: chatlinux-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for chatlinux-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aceaebb79fc5aa810b57fc4b676a501b9419f802b3f5024d0e6ed612cb8908c6
MD5 0d6a0d07fd38e9d6b4ca7eaf3fb9cc13
BLAKE2b-256 4de35ed617ff8339888bfcda5149a3b370c0d5aa4a96bd493dcec95b2a92e972

See more details on using hashes here.

Provenance

The following attestation bundles were made for chatlinux-0.2.0-py3-none-any.whl:

Publisher: publish.yml on ChatArch/ChatLinux

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

Release history Release notifications | RSS feed

0.2.2

2 files

0.2.1

2 files

This release

0.2.0 This release

2 files

0.1.0

2 files

0.0.1

2 files

Supported by

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