Metadata-Version: 2.4
Name: chatserve
Version: 0.1.1
Summary: ChatServe command-line package.
Author-email: ChatArch <1073853456@qq.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/ChatArch/ChatServe
Project-URL: Repository, https://github.com/ChatArch/ChatServe
Project-URL: Documentation, https://arch.gh.wzhecnu.cn/ChatServe/
Keywords: chatserve,chatarch,cli
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click<9.0,>=8.0
Requires-Dist: chatstyle<0.3.0,>=0.2.0
Provides-Extra: dev
Requires-Dist: build<2.0,>=1.2; extra == "dev"
Requires-Dist: pytest<9.0,>=8.0; extra == "dev"
Requires-Dist: tomli<3.0,>=2.0; python_version < "3.11" and extra == "dev"
Requires-Dist: twine<7.0,>=5.0; extra == "dev"
Provides-Extra: docs
Requires-Dist: mkdocs<2.0,>=1.6; extra == "docs"
Requires-Dist: mkdocs-material<9.7,>=9.5; extra == "docs"
Requires-Dist: mkdocs-static-i18n<2.0,>=1.2; extra == "docs"
Requires-Dist: mike<3.0,>=2.0; extra == "docs"
Dynamic: license-file

<div align="center">
    <a href="https://pypi.python.org/pypi/chatserve">
        <img src="https://img.shields.io/pypi/v/chatserve.svg" alt="PyPI version" />
    </a>
    <a href="https://github.com/ChatArch/ChatServe/actions/workflows/ci.yml">
        <img src="https://github.com/ChatArch/ChatServe/actions/workflows/ci.yml/badge.svg" alt="Tests" />
    </a>
    <a href="https://arch.gh.wzhecnu.cn/ChatServe/">
        <img src="https://img.shields.io/badge/docs-mkdocs-blue.svg" alt="Documentation" />
    </a>
</div>

<div align="center">

[English](README.en.md) | [简体中文](README.md)
</div>

# ChatServe

ChatServe 命令行包。

## 快速开始

```bash
pip install chatserve
chatserve --version
chatserve --tree
chatserve --tree-brief
chatserve hello ChatArch
```

开发检验：

```bash
pip install -e ".[dev,docs]"
python -m pytest -q
python -m build
mkdocs build --strict
```

## CLI 树

ChatServe 使用 `chatstyle.add_tree_option()` 从真实注册的 Click 命令生成完整和简明视图：

```text
chatserve
├── --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.
└── hello [NAME] [--interactive]  # Print a greeting; text output only, with no persistent side effects.
```

`--tree-brief` 保留相同节点和说明，但省略 `hello` 的参数签名。完整的两个视图见[命令树文档](docs/cli-tree.md)。

## CLI 规范

- 公共根命令固定为 `chatserve`，并暴露 `--version`、`--tree` 和 `--tree-brief`。
- Click 命令树由 `chatstyle>=0.2.0,<0.3.0` 的注册表渲染器生成，不维护包内树渲染器。
- `hello` 使用 `CommandSchema`、`add_interactive_option()` 与 `resolve_command_inputs()`；`-I` 可禁用缺参提示。
- 问候语生成逻辑可通过 `chatserve.operations.format_greeting()` 直接复用。

## 目录结构

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

## 开发说明

扩展脚手架前，先阅读 `DEVELOP.md` 和 `AGENTS.md`。
