Skip to main content

ChatCRS

ChatCRS 是 ChatArch 的 CRS 管理 CLI。外部管理面优先使用 CRS HTTP/Admin API;service 域是 server-local surface,只在 CRS 服务器本机 shell 里操作本机 CRS checkout / Node runtime / crs executable。

Images 验收、debug runtime、Nginx/edge、release/cutover 等花哨/任务型能力不作为当前包内命令暴露;这些属于代理站维护、专项验收或运维 runbook,后续需要时单独设计。

安装与开发

python -m pip install -e '.[dev,docs]'
chatcrs --help
chatcrs --version
python -m pytest -q
python -m mkdocs build --strict
python -m build

完整文档使用 MkDocs,本地预览:

python -m mkdocs serve

线上文档:https://arch.gh.wzhecnu.cn/ChatCRS/

CLI 树

chatcrs
├── health
├── admin login
├── admin accounts usage / refresh-status
├── admin keys list / show
├── key info
└── service install / update / start / stop / restart / status / switch-branch / update-pricing

HTTP/Admin 与 API key

chatcrs health --base-url https://crs.example.com --json-output
chatcrs admin login --profile admin --json-output
chatcrs admin accounts usage --profile admin --json-output
chatcrs admin accounts refresh-status <account_id> --profile admin --json-output
chatcrs admin accounts refresh-status <account_id> --profile admin --execute --json-output
chatcrs admin keys list --profile admin --include-stats --json-output
chatcrs admin keys show <key_id_or_name> --profile admin --json-output
chatcrs key info --profile admin --json-output

Server-local service

这些命令应安装在目标 CRS 服务器上,并在该服务器本机执行:

chatcrs service status --app-dir /path/to/crs --json-output
chatcrs service update --app-dir /path/to/crs --json-output
chatcrs service update --app-dir /path/to/crs --execute --json-output
chatcrs service restart --app-dir /path/to/crs --execute --json-output

status 默认执行本机只读 crs status。其它 service mutation 默认 dry-run,需要 --execute 才执行。

配置

ChatCRS 使用一套 CRS ChatEnv profile,默认读取 ~/.chatarch/envs/CRS/admin.env,也可以用 --profile 指定其它 profile。

Canonical 字段:

CRS_API_BASE
CRS_API_KEY
CRS_USERNAME
CRS_PASSWORD
CRS_ACCESS_TOKEN

Service-local 目标不进入第二套 ChatEnv namespace;用当前工作目录或 --app-dir / --crs-command 指定本机 checkout 和 executable。

敏感字段只应存在于 ChatEnv 或进程环境中,不进入命令行参数、文档、PR body 或日志输出。Profile 文件应使用 0600 权限。

生产安全

外部管理只能使用 HTTP/Admin API;没有 HTTP lifecycle 接口时,不用远端执行补洞。要么新增 CRS API/host-agent,要么在目标服务器本机运行 chatcrs service ...

更多内容见:

  • docs/cli.md
  • docs/interfaces.md
  • docs/configuration.md
  • docs/production-maintenance.md

Download files

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

Source Distribution

chatcrs-0.2.2.tar.gz (31.9 kB view details)

Uploaded Source

Built Distribution

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

chatcrs-0.2.2-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file chatcrs-0.2.2.tar.gz.

File metadata

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

File hashes

Hashes for chatcrs-0.2.2.tar.gz
Algorithm Hash digest
SHA256 eb2f58abe75dec197d0355263299f7355118f109f1b66e218e7176fe4e6d8fd0
MD5 1df26ff56cdf291ac6892acf829ae216
BLAKE2b-256 dbb07ca8cff406bdf22bd34380d0b0d4f4c1029af7933d6d3f8cd3f653e4cea8

See more details on using hashes here.

Provenance

The following attestation bundles were made for chatcrs-0.2.2.tar.gz:

Publisher: publish.yml on ChatArch/ChatCRS

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

File details

Details for the file chatcrs-0.2.2-py3-none-any.whl.

File metadata

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

File hashes

Hashes for chatcrs-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 81e2af3b8000c0ee687aa02b25ca0f2e54910fb3236943040e1dd06ab645ba16
MD5 6c64d8c43d0e646d2408abe44eee5cda
BLAKE2b-256 8429fa1c31b3586cb353123aff9403442b7bdcb73439a0e6c946d49c3934bf41

See more details on using hashes here.

Provenance

The following attestation bundles were made for chatcrs-0.2.2-py3-none-any.whl:

Publisher: publish.yml on ChatArch/ChatCRS

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.15

2 files

0.2.14

2 files

0.2.13

2 files

0.2.12

2 files

0.2.11

2 files

0.2.10

2 files

0.2.9

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

This release

0.2.2 This release

2 files

0.2.1

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