ccoding 0.1.0__py3-none-any.whl

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.
@@ -0,0 +1,144 @@
1
+ Metadata-Version: 2.4
2
+ Name: ccoding
3
+ Version: 0.1.0
4
+ Summary: Curses-based Claude Code launcher
5
+ Project-URL: Homepage, https://github.com/8DE4732A/ccode
6
+ Project-URL: Repository, https://github.com/8DE4732A/ccode
7
+ Project-URL: Issues, https://github.com/8DE4732A/ccode/issues
8
+ Author: 8de4732a
9
+ License: MIT License
10
+
11
+ Copyright (c) 2025 8DE4732A
12
+
13
+ Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ of this software and associated documentation files (the "Software"), to deal
15
+ in the Software without restriction, including without limitation the rights
16
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
+ copies of the Software, and to permit persons to whom the Software is
18
+ furnished to do so, subject to the following conditions:
19
+
20
+ The above copyright notice and this permission notice shall be included in all
21
+ copies or substantial portions of the Software.
22
+
23
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
+ SOFTWARE.
30
+ License-File: LICENSE
31
+ Keywords: claude,claude-code,curses,launcher,tui
32
+ Classifier: Environment :: Console :: Curses
33
+ Classifier: License :: OSI Approved :: MIT License
34
+ Classifier: Operating System :: POSIX
35
+ Classifier: Programming Language :: Python :: 3
36
+ Classifier: Programming Language :: Python :: 3 :: Only
37
+ Requires-Python: >=3.10
38
+ Requires-Dist: windows-curses; sys_platform == 'win32'
39
+ Description-Content-Type: text/markdown
40
+
41
+ # CCode Launcher (Curses UI)
42
+
43
+ 这是一个基于 curses 的 Claude Code 启动器,提供键盘全操作的终端界面,用于配置 Base URL、API Key、模型选择和常用开关,并直接启动 `claude` 命令。
44
+
45
+ 工具的目的是方便启动claude code时快速选择想要使用的模型。模型网关可以使用litellm proxy 或者 CLI Proxy API
46
+
47
+ ![](screenshot.png)
48
+ ## 功能特点
49
+
50
+ - 终端 curses UI,键盘全操作
51
+ - 主界面选择 OPUS / SONNET / HAIKU 的 owned_by 与 model_id
52
+ - 配置界面编辑 Base URL / API Key 与常用开关
53
+ - 自动保存配置到 `~/.ccode/config.json`
54
+ - 直接启动 `claude` 并传递额外参数
55
+ - 动画 Logo(颜色渐变 / 流光 / 轻微波浪)
56
+
57
+ ## 安装
58
+
59
+ 推荐使用 [uv](https://github.com/astral-sh/uv) 安装为全局工具:
60
+
61
+ ```bash
62
+ uv tool install ccoding
63
+ ```
64
+
65
+ 或使用 [pipx](https://pipx.pypa.io):
66
+
67
+ ```bash
68
+ pipx install ccoding
69
+ ```
70
+
71
+ 安装后直接运行:
72
+
73
+ ```bash
74
+ ccode
75
+ ccode --chrome # 传递额外参数给 claude
76
+ ```
77
+
78
+ ## 开发者运行方式
79
+
80
+ 需要 Python >=3.10,仅依赖标准库(Windows 额外需要 `windows-curses`,安装时自动处理)。
81
+
82
+ ```bash
83
+ git clone https://github.com/8DE4732A/ccode
84
+ cd ccode
85
+ uv sync
86
+ uv run ccode
87
+ ```
88
+
89
+ ## 快捷键(主界面)
90
+
91
+ - `↑ / ↓`:切换 OPUS / SONNET / HAIKU 行
92
+ - `← / →`:切换 owned_by / model_id 字段
93
+ - `a / d`:循环切换当前字段的可选项
94
+ - `b`:刷新模型列表
95
+ - `c`:进入配置界面
96
+ - `Enter`:校验并启动 `claude`
97
+ - `q`:退出
98
+
99
+ > 提示:首次使用需要先在配置界面设置 Base URL 与 API Key,然后返回主界面按 `b` 获取模型列表。
100
+
101
+ ## 快捷键(配置界面)
102
+
103
+ - `↑ / ↓`:移动字段焦点
104
+ - `Enter / Space`:切换开关项
105
+ - 文本输入:编辑 BASE_URL / API_KEY
106
+ - `ESC`:自动保存并返回主界面
107
+
108
+ ## 配置文件
109
+
110
+ 配置自动保存在:
111
+
112
+ ```
113
+ ~/.ccode/config.json
114
+ ```
115
+
116
+ 示例结构:
117
+
118
+ ```json
119
+ {
120
+ "base_url": "http://127.0.0.1:8317",
121
+ "api_key": "",
122
+ "models": {
123
+ "opus": {"owned_by": null, "id": null},
124
+ "sonnet": {"owned_by": null, "id": null},
125
+ "haiku": {"owned_by": null, "id": null}
126
+ },
127
+ "toggles": {
128
+ "CLAUDE_CODE_ENABLE_TELEMETRY": "0",
129
+ "DISABLE_COST_WARNINGS": "1",
130
+ "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
131
+ }
132
+ }
133
+ ```
134
+
135
+ ## 工作原理
136
+
137
+ 1. 从 `~/.ccode/config.json` 读取配置(首次运行自动生成)。
138
+ 2. 根据 Base URL + API Key 拉取模型列表。
139
+ 3. 选择 OPUS / SONNET / HAIKU 的 owned_by / model_id。
140
+ 4. 启动 `claude`,并注入相关环境变量。
141
+
142
+ ## 许可证
143
+
144
+ MIT
@@ -0,0 +1,13 @@
1
+ ccode/__init__.py,sha256=XC7IZRlrsZStGA0IrTOi-KNiNoKAMBCViUMidk4J3Jg,116
2
+ ccode/__main__.py,sha256=bYt9eEaoRQWdejEHFD8REx9jxVEdZptECFsV7F49Ink,30
3
+ ccode/api.py,sha256=D7I6iNaAEsCEDQJ9kuZGRWl58dBUiMarbgp7Xz6TnU0,5030
4
+ ccode/cli.py,sha256=SovAIOMH75HW2Ci8Kl6EKnJ2_lwl7Fx-l7WVWDSiAxY,247
5
+ ccode/config.py,sha256=ERAKljIJdSB2NC0iRtd1JHCtUuLJ14SaTxd2ZCV4_DA,4536
6
+ ccode/env_schema.json,sha256=4_VpMYRwzxMbvO-i9loPvW6spKiHSWBVE-xRUuWYu8c,35490
7
+ ccode/logo.py,sha256=L8nkF8Zx4YlrFGnVONpEc7sWF2aAB3cyoQdtISF-SVM,5514
8
+ ccode/ui.py,sha256=gMIuFG1MUPKeKwYW4DZbL78a0iwUDf-K3mghrXyJwPY,27610
9
+ ccoding-0.1.0.dist-info/METADATA,sha256=sWZm9gbf5pFHq94bcYHq8R-bWZJ58g3ngaWOMdg3uHE,4519
10
+ ccoding-0.1.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
11
+ ccoding-0.1.0.dist-info/entry_points.txt,sha256=ptBb7IhvJcaO8O6rniE90CKmYumTEzPX3dsNVi8bUJU,41
12
+ ccoding-0.1.0.dist-info/licenses/LICENSE,sha256=ghzeEUUCG5lu2DDgFe37bgLJk_0_Y6v-ulXwmYWjQ20,1065
13
+ ccoding-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.29.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ ccode = ccode.cli:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 8DE4732A
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.