ChatLink 0.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
chatlink-0.0.1/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ChatArch
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,77 @@
1
+ Metadata-Version: 2.4
2
+ Name: ChatLink
3
+ Version: 0.0.1
4
+ Summary: ChatLink: ChatArch link utilities
5
+ Author-email: ChatArch <1073853456@qq.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/ChatArch/ChatLink
8
+ Project-URL: Repository, https://github.com/ChatArch/ChatLink
9
+ Project-URL: Documentation, https://ChatArch.github.io/ChatLink
10
+ Keywords: chatlink,chatarch,cli
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Operating System :: OS Independent
13
+ Requires-Python: >=3.10
14
+ Description-Content-Type: text/markdown
15
+ License-File: LICENSE
16
+ Requires-Dist: click>=8.0
17
+ Requires-Dist: chatstyle>=0.1.0
18
+ Requires-Dist: chatenv>=0.1.1
19
+ Provides-Extra: dev
20
+ Requires-Dist: build; extra == "dev"
21
+ Requires-Dist: pytest; extra == "dev"
22
+ Requires-Dist: twine; extra == "dev"
23
+ Provides-Extra: docs
24
+ Requires-Dist: mkdocs>=1.4.0; extra == "docs"
25
+ Requires-Dist: mkdocs-material>=9.0.0; extra == "docs"
26
+ Requires-Dist: mike>=2.0.0; extra == "docs"
27
+ Dynamic: license-file
28
+
29
+ <div align="center">
30
+ <a href="https://pypi.python.org/pypi/ChatLink">
31
+ <img src="https://img.shields.io/pypi/v/ChatLink.svg" alt="PyPI version" />
32
+ </a>
33
+ <a href="https://github.com/ChatArch/ChatLink/actions/workflows/ci.yml">
34
+ <img src="https://github.com/ChatArch/ChatLink/actions/workflows/ci.yml/badge.svg" alt="Tests" />
35
+ </a>
36
+ <a href="https://ChatArch.github.io/ChatLink">
37
+ <img src="https://img.shields.io/badge/docs-mkdocs-blue.svg" alt="Documentation" />
38
+ </a>
39
+ </div>
40
+
41
+ <div align="center">
42
+
43
+ [English](README.en.md) | [简体中文](README.md)
44
+ </div>
45
+
46
+ # ChatLink
47
+
48
+ ChatLink: ChatArch link utilities
49
+
50
+ ## 快速开始
51
+
52
+ ```bash
53
+ pip install -e ".[dev]"
54
+ chatlink hello ChatArch
55
+ python -m pytest -q
56
+ python -m build
57
+ ```
58
+
59
+ ## CLI 规范
60
+
61
+ 这个模板默认依赖 `chatstyle>=0.1.0` 和 `chatenv>=0.1.1`,新的命令应优先使用:
62
+
63
+ - `CommandSchema` / `CommandField` 描述输入。
64
+ - `add_interactive_option()` 提供统一 `-i/-I`。
65
+ - `resolve_command_inputs()` 统一缺参补问、默认值、TTY 与校验。
66
+
67
+ ## 目录结构
68
+
69
+ - `src/`:包源码
70
+ - `tests/code-tests/`:代码测试和历史测试迁移
71
+ - `tests/cli-tests/`:真实 CLI 测试,doc-first
72
+ - `tests/mock-cli-tests/`:mock/fake CLI 测试,doc-first
73
+ - `docs/`:长期维护文档,由 mkdocs 构建
74
+
75
+ ## 开发说明
76
+
77
+ 扩展脚手架前,先阅读 `DEVELOP.md` 和 `AGENTS.md`。
@@ -0,0 +1,49 @@
1
+ <div align="center">
2
+ <a href="https://pypi.python.org/pypi/ChatLink">
3
+ <img src="https://img.shields.io/pypi/v/ChatLink.svg" alt="PyPI version" />
4
+ </a>
5
+ <a href="https://github.com/ChatArch/ChatLink/actions/workflows/ci.yml">
6
+ <img src="https://github.com/ChatArch/ChatLink/actions/workflows/ci.yml/badge.svg" alt="Tests" />
7
+ </a>
8
+ <a href="https://ChatArch.github.io/ChatLink">
9
+ <img src="https://img.shields.io/badge/docs-mkdocs-blue.svg" alt="Documentation" />
10
+ </a>
11
+ </div>
12
+
13
+ <div align="center">
14
+
15
+ [English](README.en.md) | [简体中文](README.md)
16
+ </div>
17
+
18
+ # ChatLink
19
+
20
+ ChatLink: ChatArch link utilities
21
+
22
+ ## 快速开始
23
+
24
+ ```bash
25
+ pip install -e ".[dev]"
26
+ chatlink hello ChatArch
27
+ python -m pytest -q
28
+ python -m build
29
+ ```
30
+
31
+ ## CLI 规范
32
+
33
+ 这个模板默认依赖 `chatstyle>=0.1.0` 和 `chatenv>=0.1.1`,新的命令应优先使用:
34
+
35
+ - `CommandSchema` / `CommandField` 描述输入。
36
+ - `add_interactive_option()` 提供统一 `-i/-I`。
37
+ - `resolve_command_inputs()` 统一缺参补问、默认值、TTY 与校验。
38
+
39
+ ## 目录结构
40
+
41
+ - `src/`:包源码
42
+ - `tests/code-tests/`:代码测试和历史测试迁移
43
+ - `tests/cli-tests/`:真实 CLI 测试,doc-first
44
+ - `tests/mock-cli-tests/`:mock/fake CLI 测试,doc-first
45
+ - `docs/`:长期维护文档,由 mkdocs 构建
46
+
47
+ ## 开发说明
48
+
49
+ 扩展脚手架前,先阅读 `DEVELOP.md` 和 `AGENTS.md`。
@@ -0,0 +1,39 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "ChatLink"
7
+ dynamic = ["version"]
8
+ description = "ChatLink: ChatArch link utilities"
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = "MIT"
12
+ dependencies = ["click>=8.0", "chatstyle>=0.1.0", "chatenv>=0.1.1"]
13
+ authors = [{name = "ChatArch", email = "1073853456@qq.com"}]
14
+ keywords = ["chatlink", "chatarch", "cli"]
15
+ classifiers = [
16
+ "Programming Language :: Python :: 3",
17
+ "Operating System :: OS Independent",
18
+ ]
19
+
20
+ [project.urls]
21
+ Homepage = "https://github.com/ChatArch/ChatLink"
22
+ Repository = "https://github.com/ChatArch/ChatLink"
23
+ Documentation = "https://ChatArch.github.io/ChatLink"
24
+
25
+ [project.scripts]
26
+ chatlink = "chatlink.cli:main"
27
+
28
+ [project.optional-dependencies]
29
+ dev = ["build", "pytest", "twine"]
30
+ docs = ["mkdocs>=1.4.0", "mkdocs-material>=9.0.0", "mike>=2.0.0"]
31
+
32
+ [tool.setuptools.dynamic]
33
+ version = {attr = "chatlink.__version__"}
34
+
35
+ [tool.setuptools.packages.find]
36
+ where = ["src"]
37
+
38
+ [tool.setuptools]
39
+ include-package-data = true
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,77 @@
1
+ Metadata-Version: 2.4
2
+ Name: ChatLink
3
+ Version: 0.0.1
4
+ Summary: ChatLink: ChatArch link utilities
5
+ Author-email: ChatArch <1073853456@qq.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/ChatArch/ChatLink
8
+ Project-URL: Repository, https://github.com/ChatArch/ChatLink
9
+ Project-URL: Documentation, https://ChatArch.github.io/ChatLink
10
+ Keywords: chatlink,chatarch,cli
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Operating System :: OS Independent
13
+ Requires-Python: >=3.10
14
+ Description-Content-Type: text/markdown
15
+ License-File: LICENSE
16
+ Requires-Dist: click>=8.0
17
+ Requires-Dist: chatstyle>=0.1.0
18
+ Requires-Dist: chatenv>=0.1.1
19
+ Provides-Extra: dev
20
+ Requires-Dist: build; extra == "dev"
21
+ Requires-Dist: pytest; extra == "dev"
22
+ Requires-Dist: twine; extra == "dev"
23
+ Provides-Extra: docs
24
+ Requires-Dist: mkdocs>=1.4.0; extra == "docs"
25
+ Requires-Dist: mkdocs-material>=9.0.0; extra == "docs"
26
+ Requires-Dist: mike>=2.0.0; extra == "docs"
27
+ Dynamic: license-file
28
+
29
+ <div align="center">
30
+ <a href="https://pypi.python.org/pypi/ChatLink">
31
+ <img src="https://img.shields.io/pypi/v/ChatLink.svg" alt="PyPI version" />
32
+ </a>
33
+ <a href="https://github.com/ChatArch/ChatLink/actions/workflows/ci.yml">
34
+ <img src="https://github.com/ChatArch/ChatLink/actions/workflows/ci.yml/badge.svg" alt="Tests" />
35
+ </a>
36
+ <a href="https://ChatArch.github.io/ChatLink">
37
+ <img src="https://img.shields.io/badge/docs-mkdocs-blue.svg" alt="Documentation" />
38
+ </a>
39
+ </div>
40
+
41
+ <div align="center">
42
+
43
+ [English](README.en.md) | [简体中文](README.md)
44
+ </div>
45
+
46
+ # ChatLink
47
+
48
+ ChatLink: ChatArch link utilities
49
+
50
+ ## 快速开始
51
+
52
+ ```bash
53
+ pip install -e ".[dev]"
54
+ chatlink hello ChatArch
55
+ python -m pytest -q
56
+ python -m build
57
+ ```
58
+
59
+ ## CLI 规范
60
+
61
+ 这个模板默认依赖 `chatstyle>=0.1.0` 和 `chatenv>=0.1.1`,新的命令应优先使用:
62
+
63
+ - `CommandSchema` / `CommandField` 描述输入。
64
+ - `add_interactive_option()` 提供统一 `-i/-I`。
65
+ - `resolve_command_inputs()` 统一缺参补问、默认值、TTY 与校验。
66
+
67
+ ## 目录结构
68
+
69
+ - `src/`:包源码
70
+ - `tests/code-tests/`:代码测试和历史测试迁移
71
+ - `tests/cli-tests/`:真实 CLI 测试,doc-first
72
+ - `tests/mock-cli-tests/`:mock/fake CLI 测试,doc-first
73
+ - `docs/`:长期维护文档,由 mkdocs 构建
74
+
75
+ ## 开发说明
76
+
77
+ 扩展脚手架前,先阅读 `DEVELOP.md` 和 `AGENTS.md`。
@@ -0,0 +1,13 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ src/ChatLink.egg-info/PKG-INFO
5
+ src/ChatLink.egg-info/SOURCES.txt
6
+ src/ChatLink.egg-info/dependency_links.txt
7
+ src/ChatLink.egg-info/entry_points.txt
8
+ src/ChatLink.egg-info/requires.txt
9
+ src/ChatLink.egg-info/top_level.txt
10
+ src/chatlink/__init__.py
11
+ src/chatlink/cli.py
12
+ tests/test_cli.py
13
+ tests/test_version.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ chatlink = chatlink.cli:main
@@ -0,0 +1,13 @@
1
+ click>=8.0
2
+ chatstyle>=0.1.0
3
+ chatenv>=0.1.1
4
+
5
+ [dev]
6
+ build
7
+ pytest
8
+ twine
9
+
10
+ [docs]
11
+ mkdocs>=1.4.0
12
+ mkdocs-material>=9.0.0
13
+ mike>=2.0.0
@@ -0,0 +1 @@
1
+ chatlink
@@ -0,0 +1,5 @@
1
+ """ChatLink package."""
2
+
3
+ __all__ = ["__version__"]
4
+
5
+ __version__ = "0.0.1"
@@ -0,0 +1,40 @@
1
+ """CLI entrypoint for chatlink."""
2
+
3
+ import click
4
+ from chatstyle import (
5
+ CommandField,
6
+ CommandSchema,
7
+ add_interactive_option,
8
+ render_success,
9
+ resolve_command_inputs,
10
+ )
11
+
12
+
13
+ HELLO_SCHEMA = CommandSchema(
14
+ name="hello",
15
+ fields=(CommandField("name", prompt="name", required=True),),
16
+ )
17
+
18
+
19
+ @click.group()
20
+ def main() -> None:
21
+ """chatlink command line interface."""
22
+
23
+
24
+ @main.command()
25
+ @click.argument("name", required=False)
26
+ @add_interactive_option
27
+ def hello(name: str | None, interactive: bool | None) -> None:
28
+ """Print a greeting with ChatStyle-backed input resolution."""
29
+
30
+ values = resolve_command_inputs(
31
+ schema=HELLO_SCHEMA,
32
+ provided={"name": name},
33
+ interactive=interactive,
34
+ usage="Usage: chatlink hello [NAME]",
35
+ )
36
+ render_success(f"Hello, {values['name']}!")
37
+
38
+
39
+ if __name__ == "__main__":
40
+ main()
@@ -0,0 +1,10 @@
1
+ from click.testing import CliRunner
2
+
3
+ from chatlink.cli import main
4
+
5
+
6
+ def test_hello_command_accepts_explicit_name():
7
+ result = CliRunner().invoke(main, ["hello", "ChatArch"])
8
+
9
+ assert result.exit_code == 0
10
+ assert "Hello, ChatArch!" in result.output
@@ -0,0 +1,5 @@
1
+ from chatlink import __version__
2
+
3
+
4
+ def test_version_present():
5
+ assert __version__ == "0.0.1"