gitcode-cli 0.2.12__py3-none-any.whl → 0.3.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.
gc_cli/__init__.py CHANGED
@@ -4,7 +4,7 @@ GitCode CLI - Command line tool for GitCode.
4
4
  This package provides a Python wrapper for the gc binary.
5
5
  """
6
6
 
7
- __version__ = "0.2.12"
7
+ __version__ = "0.3.0"
8
8
  __author__ = "GitCode CLI Contributors"
9
9
  __all__ = ["__version__", "main"]
10
10
 
@@ -0,0 +1,27 @@
1
+ Metadata-Version: 2.1
2
+ Name: gitcode-cli
3
+ Version: 0.3.0
4
+ Summary: GitCode CLI - Command line tool for GitCode
5
+ Author-email: GitCode CLI Contributors <support@gitcode.com>
6
+ License: MIT
7
+ Keywords: gitcode,cli,git,devops
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Environment :: Console
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.8
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Topic :: Software Development
19
+ Classifier: Topic :: Utilities
20
+ Classifier: License :: OSI Approved :: MIT License
21
+ Requires-Python: >=3.8
22
+ Project-URL: Homepage, https://gitcode.com/gitcode-cli/cli
23
+
24
+ GitCode CLI - Command line tool for GitCode
25
+
26
+ Binary executables are available at:
27
+ https://gitcode.com/gitcode-cli/cli/releases
@@ -0,0 +1,9 @@
1
+ gc_cli/__init__.py,sha256=VljLbVD3K21mCiUkiBrfKDmgXr20Md4_Az1d-Nd7vgc,241
2
+ gc_cli/wrapper.py,sha256=bJ5aqTRADaV_GX079pBPVhzbRYDZwjaRoK1nmUjVIoE,2119
3
+ gc_cli/bin/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ gitcode_cli-0.3.0.dist-info/METADATA,sha256=nF-wIITsdnyeWpZd9NI_T80j3tLTukg9PU2YeUvFNTM,1019
5
+ gitcode_cli-0.3.0.dist-info/WHEEL,sha256=2jHdxKWnCIK_lI5LTqwkSmjgOUSsTtjdBrux51aJqKg,77
6
+ gitcode_cli-0.3.0.dist-info/entry_points.txt,sha256=IXAR-ST1fHD9LRD7nYjxTBfXjI_CgfEc3BPZmLef2OY,43
7
+ gitcode_cli-0.3.0.dist-info/top_level.txt,sha256=2fSmR3kQ-XhdgFQdVvWmZcEyERJKVZVxOhk7tna1Sus,7
8
+ gitcode_cli-0.3.0.dist-info/licenses/LICENSE,sha256=WsjkQaj0PPK_TKVoHDok218rd8JZdj1GIJ5TrrZD6jE,1253
9
+ gitcode_cli-0.3.0.dist-info/RECORD,,
@@ -1,5 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (82.0.1)
2
+ Generator: manual
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
-
Binary file
Binary file
gc_cli/bin/gc-linux-amd64 DELETED
Binary file
gc_cli/bin/gc-linux-arm64 DELETED
Binary file
Binary file
@@ -1,424 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: gitcode-cli
3
- Version: 0.2.12
4
- Summary: GitCode CLI - Command line tool for GitCode
5
- Author-email: GitCode CLI Contributors <support@gitcode.com>
6
- Maintainer-email: GitCode CLI Contributors <support@gitcode.com>
7
- License-Expression: MIT
8
- Project-URL: Homepage, https://gitcode.com/gitcode-cli/cli
9
- Project-URL: Documentation, https://gitcode.com/gitcode-cli/cli
10
- Project-URL: Repository, https://gitcode.com/gitcode-cli/cli
11
- Project-URL: Issues, https://gitcode.com/gitcode-cli/cli/issues
12
- Keywords: gitcode,cli,git,devops
13
- Classifier: Development Status :: 4 - Beta
14
- Classifier: Environment :: Console
15
- Classifier: Intended Audience :: Developers
16
- Classifier: Operating System :: OS Independent
17
- Classifier: Programming Language :: Python :: 3
18
- Classifier: Programming Language :: Python :: 3.8
19
- Classifier: Programming Language :: Python :: 3.9
20
- Classifier: Programming Language :: Python :: 3.10
21
- Classifier: Programming Language :: Python :: 3.11
22
- Classifier: Programming Language :: Python :: 3.12
23
- Classifier: Topic :: Software Development
24
- Classifier: Topic :: Utilities
25
- Requires-Python: >=3.8
26
- Description-Content-Type: text/markdown
27
- License-File: LICENSE
28
- Dynamic: license-file
29
-
30
- # GitCode CLI
31
-
32
- [![AI 操作指南](https://img.shields.io/badge/📖_使用_AI_操作_GitCode_指南-点击查看-FF6B6B?style=for-the-badge)](./docs/AI-GUIDE.md)
33
-
34
- [![Go Version](https://img.shields.io/badge/Go-1.22+-00ADD8?style=flat&logo=go)](https://golang.org)
35
- [![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
36
- [![Release](https://img.shields.io/badge/Release-v0.2.11-blue)](https://gitcode.com/gitcode-cli/cli/releases)
37
-
38
- GitCode 命令行工具,为 GitCode 用户提供便捷的命令行操作体验。
39
-
40
- ## 安装
41
-
42
- ### 从源码构建
43
-
44
- **前置要求:**
45
- - Go 1.22+
46
-
47
- ```bash
48
- # 克隆仓库
49
- git clone https://gitcode.com/gitcode-cli/cli.git
50
- cd cli
51
-
52
- # 构建
53
- go build -o gc ./cmd/gc
54
-
55
- # 安装到用户目录
56
- mkdir -p ~/.local/bin
57
- mv gc ~/.local/bin/
58
- export PATH="$HOME/.local/bin:$PATH"
59
- ```
60
-
61
- ### Linux 包管理器
62
-
63
- **DEB (Debian/Ubuntu):**
64
-
65
- ```bash
66
- # 从 Releases 下载 .deb 包
67
- wget https://gitcode.com/gitcode-cli/cli/releases/download/v0.2.11/gc_0.2.11_amd64.deb
68
-
69
- # 安装
70
- sudo dpkg -i gc_0.2.11_amd64.deb
71
- ```
72
-
73
- **RPM (RHEL/CentOS/Fedora):**
74
-
75
- ```bash
76
- # 从 Releases 下载 .rpm 包
77
- wget https://gitcode.com/gitcode-cli/cli/releases/download/v0.2.11/gc-0.2.11-1.x86_64.rpm
78
-
79
- # 安装
80
- sudo rpm -i gc-0.2.11-1.x86_64.rpm
81
- ```
82
-
83
- ### PyPI (跨平台)
84
-
85
- **方式一:pipx 安装(推荐)**
86
-
87
- ```bash
88
- # 使用 pipx 安装(自动管理虚拟环境)
89
- pipx install gitcode-cli
90
-
91
- # 或指定版本
92
- pipx install gitcode-cli==0.2.11
93
- ```
94
-
95
- **方式二:虚拟环境安装**
96
-
97
- ```bash
98
- # 创建虚拟环境
99
- python3 -m venv myenv
100
- source myenv/bin/activate # Linux/macOS
101
- # myenv\Scripts\activate # Windows
102
-
103
- # 安装
104
- pip install gitcode-cli
105
- ```
106
-
107
- **方式三:系统安装(需 --break-system-packages)**
108
-
109
- > ⚠️ Python 3.11+ 受 PEP 668 限制,需要额外参数
110
-
111
- ```bash
112
- pip install gitcode-cli --break-system-packages
113
- ```
114
-
115
- **Windows 用户**
116
-
117
- ```powershell
118
- # PowerShell 安装
119
- pip install gitcode-cli
120
-
121
- # 或使用 pipx
122
- pipx install gitcode-cli
123
- ```
124
-
125
- ### 规划中的安装方式
126
-
127
- 以下安装方式正在开发中:
128
-
129
- - [ ] 预编译二进制文件(Linux/macOS/Windows)
130
- - [ ] Homebrew (macOS/Linux)
131
- - [ ] Scoop (Windows)
132
- - [ ] Docker 镜像
133
-
134
- ## 快速开始
135
-
136
- ### 认证
137
-
138
- **方式一:设置环境变量(推荐)**
139
-
140
- ```bash
141
- # 设置 Token 环境变量
142
- export GC_TOKEN="your_gitcode_token"
143
-
144
- # 或使用备用变量名
145
- export GITCODE_TOKEN="your_gitcode_token"
146
-
147
- # 添加到 shell 配置文件(永久生效)
148
- echo 'export GC_TOKEN="your_gitcode_token"' >> ~/.bashrc
149
- source ~/.bashrc
150
- ```
151
-
152
- **方式二:交互式登录**
153
-
154
- ```bash
155
- # 交互式登录(需输入 Token)
156
- gc auth login
157
-
158
- # 使用 Token 参数登录
159
- gc auth login --token YOUR_TOKEN
160
- ```
161
-
162
- **获取 Token:**
163
- 1. 登录 [GitCode](https://gitcode.com)
164
- 2. 进入 设置 -> 私人令牌
165
- 3. 点击"生成新令牌",选择所需权限
166
- 4. 复制生成的 Token
167
-
168
- **验证认证:**
169
-
170
- ```bash
171
- # 查看认证状态
172
- gc auth status
173
- ```
174
-
175
- > 📖 **完整命令指南**: 查看 [COMMANDS.md](./docs/COMMANDS.md) 获取所有命令的详细使用说明和示例。
176
-
177
- ## 命令示例
178
-
179
- ### 仓库操作
180
-
181
- ```bash
182
- # 克隆仓库
183
- gc repo clone owner/repo
184
-
185
- # 创建新仓库
186
- gc repo create my-repo --public
187
-
188
- # 查看仓库信息
189
- gc repo view owner/repo
190
-
191
- # Fork 仓库
192
- gc repo fork owner/repo
193
-
194
- # 删除仓库
195
- gc repo delete owner/repo
196
- ```
197
-
198
- ### Issue 管理
199
-
200
- ```bash
201
- # 创建 Issue
202
- gc issue create --title "Bug report" --body "Description"
203
-
204
- # 列出 Issues
205
- gc issue list --state open
206
-
207
- # 查看 Issue 详情
208
- gc issue view 123
209
-
210
- # 关闭 Issue
211
- gc issue close 123
212
-
213
- # 重开 Issue
214
- gc issue reopen 123
215
-
216
- # 添加评论
217
- gc issue comment 123 --body "Comment text"
218
-
219
- # 管理 Issue 标签
220
- gc issue label 123 --add bug,enhancement
221
-
222
- # 查看 Issue 关联的 PRs
223
- gc issue prs 123
224
- ```
225
-
226
- ### Pull Request 管理
227
-
228
- ```bash
229
- # 创建 PR(自动检测当前分支)
230
- gc pr create --title "New feature" --base main
231
-
232
- # 创建跨仓库 PR(从 fork 到 upstream)
233
- gc pr create -R upstream/repo --fork myfork/repo --title "Feature"
234
-
235
- # 列出 PR
236
- gc pr list --state open
237
-
238
- # 查看 PR 详情
239
- gc pr view 456
240
-
241
- # 查看 PR 评论
242
- gc pr comments 456
243
-
244
- # 回复 PR 评论
245
- gc pr reply 456 --discussion <discussion_id> --body "Reply text"
246
-
247
- # 检出 PR 分支
248
- gc pr checkout 456
249
-
250
- # 合并 PR
251
- gc pr merge 456 --squash
252
-
253
- # 关闭/重开 PR
254
- gc pr close 456
255
- gc pr reopen 456
256
-
257
- # 编辑 PR
258
- gc pr edit 456 --title "New title"
259
- gc pr edit 456 --draft true
260
-
261
- # 代码检视
262
- gc pr review 456 --approve
263
- gc pr review 456 --request
264
- gc pr review 456 --comment "Review comment"
265
- ```
266
-
267
- ### Release 管理
268
-
269
- ```bash
270
- # 创建 Release(建议包含 --notes 参数)
271
- gc release create v1.0.0 --title "Version 1.0" --notes "Release notes"
272
-
273
- # 列出 Releases
274
- gc release list -R owner/repo
275
-
276
- # 查看 Release 详情
277
- gc release view v1.0.0 -R owner/repo
278
-
279
- # 上传资产到 Release
280
- gc release upload v1.0.0 app.zip -R owner/repo
281
- gc release upload v1.0.0 file1.tar.gz file2.rpm -R owner/repo
282
-
283
- # 下载 Release 资产
284
- gc release download v1.0.0 -R owner/repo
285
- gc release download v1.0.0 app.zip -R owner/repo -o ./downloads/
286
-
287
- # 删除 Release
288
- gc release delete v1.0.0 -R owner/repo
289
- ```
290
-
291
- > **注意**: `release create` 命令建议包含 `--notes` 参数,否则可能返回错误。
292
-
293
- ## 功能特性
294
-
295
- | 功能 | 描述 |
296
- |------|------|
297
- | 🔐 认证管理 | Token 认证、多账户支持、安全存储 |
298
- | 📦 仓库操作 | 克隆、创建、Fork、查看、删除 |
299
- | 🐛 Issue 管理 | 创建、列表、查看、关闭、重开、评论 |
300
- | 🔀 PR 管理 | 创建、列表、查看、检出、合并、关闭 |
301
- | 👀 代码检视 | 批准、请求修改、添加评论 |
302
- | 🏷️ 标签管理 | 创建、列表、删除 |
303
- | 🎯 里程碑管理 | 创建、列表、查看、删除 |
304
- | 🚀 Release 管理 | 创建、列表、查看、上传资产、下载资产 |
305
-
306
- ## 命令概览
307
-
308
- ```
309
- gc <command> <subcommand> [flags]
310
-
311
- Commands:
312
- auth 认证管理 (login, logout, status, token)
313
- repo 仓库操作 (clone, create, list, view, fork, delete)
314
- issue Issue 管理 (create, list, view, close, reopen, comment)
315
- pr PR 管理 (create, list, view, checkout, merge, close, reopen, review, diff, ready)
316
- label 标签管理 (create, list, delete)
317
- milestone 里程碑管理 (create, list, view, delete)
318
- release Release 管理 (create, list, view, upload, download, delete)
319
- version 显示版本信息
320
- ```
321
-
322
- ## 配置
323
-
324
- 配置文件位置: `~/.config/gc/config.yaml`
325
-
326
- ```yaml
327
- # 默认主机
328
- host: gitcode.com
329
-
330
- # Git 协议
331
- git_protocol: https
332
-
333
- # 默认编辑器
334
- editor: vim
335
-
336
- # 分页器
337
- pager: less
338
- ```
339
-
340
- ### 环境变量
341
-
342
- | 变量 | 描述 |
343
- |------|------|
344
- | `GC_TOKEN` | 认证 Token |
345
- | `GITCODE_TOKEN` | 备用 Token |
346
- | `GC_HOST` | 默认主机 |
347
- | `NO_COLOR` | 禁用颜色输出 |
348
-
349
- ## Shell 补全
350
-
351
- ```bash
352
- # Bash
353
- gc completion bash > /etc/bash_completion.d/gc
354
- source ~/.bashrc
355
-
356
- # Zsh
357
- gc completion zsh > "${fpath[1]}/_gc"
358
- source ~/.zshrc
359
-
360
- # Fish
361
- gc completion fish > ~/.config/fish/completions/gc.fish
362
- source ~/.config/fish/config.fish
363
- ```
364
-
365
- ## 文档
366
-
367
- - [命令指南](./docs/COMMANDS.md) - 所有命令的详细使用说明和示例
368
- - [版本发布](./RELEASE.md) - 发布流程和产物说明
369
- - [AI 操作指南](./docs/AI-GUIDE.md) - 使用 AI 助手操作 GitCode 的完整指南
370
- - [打包发布](./docs/PACKAGING.md) - DEB/RPM 包构建和发布流程
371
- - [贡献指南](./CONTRIBUTING.md) - 开发和发布流程
372
- - [安全策略](./SECURITY.md) - 敏感信息保护和安全规范
373
- - [CLAUDE.md](./CLAUDE.md) - AI 辅助开发指南
374
- - [需求文档](./issues-plan/) - 完整需求规格和里程碑规划
375
-
376
- ## 技术栈
377
-
378
- | 组件 | 技术 |
379
- |------|------|
380
- | 语言 | Go 1.22+ |
381
- | 命令框架 | Cobra |
382
- | 配置格式 | YAML |
383
- | 目标平台 | Linux, macOS, Windows |
384
-
385
- ## 开发
386
-
387
- ```bash
388
- # 克隆仓库
389
- git clone https://gitcode.com/gitcode-cli/cli.git
390
- cd gitcode-cli
391
-
392
- # 安装依赖
393
- make deps
394
-
395
- # 构建
396
- make build
397
-
398
- # 运行测试
399
- make test
400
-
401
- # 代码检查
402
- make lint
403
-
404
- # 运行
405
- make run
406
- ```
407
-
408
- ## 贡献
409
-
410
- 欢迎贡献代码!请查看 [贡献指南](./CONTRIBUTING.md)。
411
-
412
- ## 许可证
413
-
414
- [MIT License](./LICENSE)
415
-
416
- ## 致谢
417
-
418
- 本项目参考了 [GitHub CLI](https://github.com/cli/cli) 的设计与实现,感谢 GitHub 团队的开源贡献。
419
-
420
- ## 相关链接
421
-
422
- - [GitCode](https://gitcode.com) - GitCode 平台
423
- - [API 文档](https://gitcode.com/docs/api) - GitCode API 参考
424
- - [问题反馈](https://gitcode.com/gitcode-cli/cli/issues) - 提交 Bug 或建议
@@ -1,14 +0,0 @@
1
- gc_cli/__init__.py,sha256=AmdjrxBldAV4GEKenHqwIK0Uk2Cpwkum6nRjWAFVBfc,242
2
- gc_cli/wrapper.py,sha256=bJ5aqTRADaV_GX079pBPVhzbRYDZwjaRoK1nmUjVIoE,2119
3
- gc_cli/bin/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- gc_cli/bin/gc-darwin-amd64,sha256=2KDMnRiZY0EHxykJv6Ws92a6PsgP-p4EyPCgaNgxQnY,7837504
5
- gc_cli/bin/gc-darwin-arm64,sha256=XPlVwQQvWl30SC0hetlfx7xfNtgrZ1RnRdC3uLvg9L8,7527202
6
- gc_cli/bin/gc-linux-amd64,sha256=7ubyH5czeqzxQaQtu78j3T_1-guqdYfFk4UTqv_EwKs,11168501
7
- gc_cli/bin/gc-linux-arm64,sha256=BtOI81diBCrt8_9tev3mB3mmnXAHs1NIKK1gmnCSph0,7340184
8
- gc_cli/bin/gc-windows-amd64.exe,sha256=2UPt5x1keSCWuyrBY2yy6cMRtJE6qEtZNyRIlXBIji0,7902720
9
- gitcode_cli-0.2.12.dist-info/licenses/LICENSE,sha256=WsjkQaj0PPK_TKVoHDok218rd8JZdj1GIJ5TrrZD6jE,1253
10
- gitcode_cli-0.2.12.dist-info/METADATA,sha256=3NeljQXP5oiA8V3PWqEhBBr_6FJZABi0zE4ATACu1fo,9617
11
- gitcode_cli-0.2.12.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
12
- gitcode_cli-0.2.12.dist-info/entry_points.txt,sha256=IXAR-ST1fHD9LRD7nYjxTBfXjI_CgfEc3BPZmLef2OY,43
13
- gitcode_cli-0.2.12.dist-info/top_level.txt,sha256=2fSmR3kQ-XhdgFQdVvWmZcEyERJKVZVxOhk7tna1Sus,7
14
- gitcode_cli-0.2.12.dist-info/RECORD,,