gitcode-cli 0.2.13__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.13"
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,392 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: gitcode-cli
3
- Version: 0.2.13
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.12-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.12/gc_0.2.12_amd64.deb
68
-
69
- # 安装
70
- sudo dpkg -i gc_0.2.12_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.12/gc-0.2.12-1.x86_64.rpm
78
-
79
- # 安装
80
- sudo rpm -i gc-0.2.12-1.x86_64.rpm
81
- ```
82
-
83
- ### PyPI (跨平台)
84
-
85
- ```bash
86
- # 使用 pip 安装
87
- pip install gitcode-cli
88
-
89
- # 或指定版本
90
- pip install gitcode-cli==0.2.5
91
- ```
92
-
93
- ### 规划中的安装方式
94
-
95
- 以下安装方式正在开发中:
96
-
97
- - [ ] 预编译二进制文件(Linux/macOS/Windows)
98
- - [ ] Homebrew (macOS/Linux)
99
- - [ ] Scoop (Windows)
100
- - [ ] Docker 镜像
101
-
102
- ## 快速开始
103
-
104
- ### 认证
105
-
106
- **方式一:设置环境变量(推荐)**
107
-
108
- ```bash
109
- # 设置 Token 环境变量
110
- export GC_TOKEN="your_gitcode_token"
111
-
112
- # 或使用备用变量名
113
- export GITCODE_TOKEN="your_gitcode_token"
114
-
115
- # 添加到 shell 配置文件(永久生效)
116
- echo 'export GC_TOKEN="your_gitcode_token"' >> ~/.bashrc
117
- source ~/.bashrc
118
- ```
119
-
120
- **方式二:交互式登录**
121
-
122
- ```bash
123
- # 交互式登录(需输入 Token)
124
- gc auth login
125
-
126
- # 使用 Token 参数登录
127
- gc auth login --token YOUR_TOKEN
128
- ```
129
-
130
- **获取 Token:**
131
- 1. 登录 [GitCode](https://gitcode.com)
132
- 2. 进入 设置 -> 私人令牌
133
- 3. 点击"生成新令牌",选择所需权限
134
- 4. 复制生成的 Token
135
-
136
- **验证认证:**
137
-
138
- ```bash
139
- # 查看认证状态
140
- gc auth status
141
- ```
142
-
143
- > 📖 **完整命令指南**: 查看 [COMMANDS.md](./docs/COMMANDS.md) 获取所有命令的详细使用说明和示例。
144
-
145
- ## 命令示例
146
-
147
- ### 仓库操作
148
-
149
- ```bash
150
- # 克隆仓库
151
- gc repo clone owner/repo
152
-
153
- # 创建新仓库
154
- gc repo create my-repo --public
155
-
156
- # 查看仓库信息
157
- gc repo view owner/repo
158
-
159
- # Fork 仓库
160
- gc repo fork owner/repo
161
-
162
- # 删除仓库
163
- gc repo delete owner/repo
164
- ```
165
-
166
- ### Issue 管理
167
-
168
- ```bash
169
- # 创建 Issue
170
- gc issue create --title "Bug report" --body "Description"
171
-
172
- # 列出 Issues
173
- gc issue list --state open
174
-
175
- # 查看 Issue 详情
176
- gc issue view 123
177
-
178
- # 关闭 Issue
179
- gc issue close 123
180
-
181
- # 重开 Issue
182
- gc issue reopen 123
183
-
184
- # 添加评论
185
- gc issue comment 123 --body "Comment text"
186
-
187
- # 管理 Issue 标签
188
- gc issue label 123 --add bug,enhancement
189
-
190
- # 查看 Issue 关联的 PRs
191
- gc issue prs 123
192
- ```
193
-
194
- ### Pull Request 管理
195
-
196
- ```bash
197
- # 创建 PR(自动检测当前分支)
198
- gc pr create --title "New feature" --base main
199
-
200
- # 创建跨仓库 PR(从 fork 到 upstream)
201
- gc pr create -R upstream/repo --fork myfork/repo --title "Feature"
202
-
203
- # 列出 PR
204
- gc pr list --state open
205
-
206
- # 查看 PR 详情
207
- gc pr view 456
208
-
209
- # 查看 PR 评论
210
- gc pr comments 456
211
-
212
- # 回复 PR 评论
213
- gc pr reply 456 --discussion <discussion_id> --body "Reply text"
214
-
215
- # 检出 PR 分支
216
- gc pr checkout 456
217
-
218
- # 合并 PR
219
- gc pr merge 456 --squash
220
-
221
- # 关闭/重开 PR
222
- gc pr close 456
223
- gc pr reopen 456
224
-
225
- # 编辑 PR
226
- gc pr edit 456 --title "New title"
227
- gc pr edit 456 --draft true
228
-
229
- # 代码检视
230
- gc pr review 456 --approve
231
- gc pr review 456 --request
232
- gc pr review 456 --comment "Review comment"
233
- ```
234
-
235
- ### Release 管理
236
-
237
- ```bash
238
- # 创建 Release(建议包含 --notes 参数)
239
- gc release create v1.0.0 --title "Version 1.0" --notes "Release notes"
240
-
241
- # 列出 Releases
242
- gc release list -R owner/repo
243
-
244
- # 查看 Release 详情
245
- gc release view v1.0.0 -R owner/repo
246
-
247
- # 上传资产到 Release
248
- gc release upload v1.0.0 app.zip -R owner/repo
249
- gc release upload v1.0.0 file1.tar.gz file2.rpm -R owner/repo
250
-
251
- # 下载 Release 资产
252
- gc release download v1.0.0 -R owner/repo
253
- gc release download v1.0.0 app.zip -R owner/repo -o ./downloads/
254
-
255
- # 删除 Release
256
- gc release delete v1.0.0 -R owner/repo
257
- ```
258
-
259
- > **注意**: `release create` 命令建议包含 `--notes` 参数,否则可能返回错误。
260
-
261
- ## 功能特性
262
-
263
- | 功能 | 描述 |
264
- |------|------|
265
- | 🔐 认证管理 | Token 认证、多账户支持、安全存储 |
266
- | 📦 仓库操作 | 克隆、创建、Fork、查看、删除 |
267
- | 🐛 Issue 管理 | 创建、列表、查看、关闭、重开、评论 |
268
- | 🔀 PR 管理 | 创建、列表、查看、检出、合并、关闭 |
269
- | 👀 代码检视 | 批准、请求修改、添加评论 |
270
- | 🏷️ 标签管理 | 创建、列表、删除 |
271
- | 🎯 里程碑管理 | 创建、列表、查看、删除 |
272
- | 🚀 Release 管理 | 创建、列表、查看、上传资产、下载资产 |
273
-
274
- ## 命令概览
275
-
276
- ```
277
- gc <command> <subcommand> [flags]
278
-
279
- Commands:
280
- auth 认证管理 (login, logout, status, token)
281
- repo 仓库操作 (clone, create, list, view, fork, delete)
282
- issue Issue 管理 (create, list, view, close, reopen, comment)
283
- pr PR 管理 (create, list, view, checkout, merge, close, reopen, review, diff, ready)
284
- label 标签管理 (create, list, delete)
285
- milestone 里程碑管理 (create, list, view, delete)
286
- release Release 管理 (create, list, view, upload, download, delete)
287
- version 显示版本信息
288
- ```
289
-
290
- ## 配置
291
-
292
- 配置文件位置: `~/.config/gc/config.yaml`
293
-
294
- ```yaml
295
- # 默认主机
296
- host: gitcode.com
297
-
298
- # Git 协议
299
- git_protocol: https
300
-
301
- # 默认编辑器
302
- editor: vim
303
-
304
- # 分页器
305
- pager: less
306
- ```
307
-
308
- ### 环境变量
309
-
310
- | 变量 | 描述 |
311
- |------|------|
312
- | `GC_TOKEN` | 认证 Token |
313
- | `GITCODE_TOKEN` | 备用 Token |
314
- | `GC_HOST` | 默认主机 |
315
- | `NO_COLOR` | 禁用颜色输出 |
316
-
317
- ## Shell 补全
318
-
319
- ```bash
320
- # Bash
321
- gc completion bash > /etc/bash_completion.d/gc
322
- source ~/.bashrc
323
-
324
- # Zsh
325
- gc completion zsh > "${fpath[1]}/_gc"
326
- source ~/.zshrc
327
-
328
- # Fish
329
- gc completion fish > ~/.config/fish/completions/gc.fish
330
- source ~/.config/fish/config.fish
331
- ```
332
-
333
- ## 文档
334
-
335
- - [命令指南](./docs/COMMANDS.md) - 所有命令的详细使用说明和示例
336
- - [版本发布](./RELEASE.md) - 发布流程和产物说明
337
- - [AI 操作指南](./docs/AI-GUIDE.md) - 使用 AI 助手操作 GitCode 的完整指南
338
- - [打包发布](./docs/PACKAGING.md) - DEB/RPM 包构建和发布流程
339
- - [贡献指南](./CONTRIBUTING.md) - 开发和发布流程
340
- - [安全策略](./SECURITY.md) - 敏感信息保护和安全规范
341
- - [CLAUDE.md](./CLAUDE.md) - AI 辅助开发指南
342
- - [需求文档](./issues-plan/) - 完整需求规格和里程碑规划
343
-
344
- ## 技术栈
345
-
346
- | 组件 | 技术 |
347
- |------|------|
348
- | 语言 | Go 1.22+ |
349
- | 命令框架 | Cobra |
350
- | 配置格式 | YAML |
351
- | 目标平台 | Linux, macOS, Windows |
352
-
353
- ## 开发
354
-
355
- ```bash
356
- # 克隆仓库
357
- git clone https://gitcode.com/gitcode-cli/cli.git
358
- cd gitcode-cli
359
-
360
- # 安装依赖
361
- make deps
362
-
363
- # 构建
364
- make build
365
-
366
- # 运行测试
367
- make test
368
-
369
- # 代码检查
370
- make lint
371
-
372
- # 运行
373
- make run
374
- ```
375
-
376
- ## 贡献
377
-
378
- 欢迎贡献代码!请查看 [贡献指南](./CONTRIBUTING.md)。
379
-
380
- ## 许可证
381
-
382
- [MIT License](./LICENSE)
383
-
384
- ## 致谢
385
-
386
- 本项目参考了 [GitHub CLI](https://github.com/cli/cli) 的设计与实现,感谢 GitHub 团队的开源贡献。
387
-
388
- ## 相关链接
389
-
390
- - [GitCode](https://gitcode.com) - GitCode 平台
391
- - [API 文档](https://gitcode.com/docs/api) - GitCode API 参考
392
- - [问题反馈](https://gitcode.com/gitcode-cli/cli/issues) - 提交 Bug 或建议
@@ -1,14 +0,0 @@
1
- gc_cli/__init__.py,sha256=v7ZKbRU4kXr-TeAdvaJuJrt0uc4dpttM9iArBKQ_KJ8,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=mpXgWDrLnb12OoY1rjVUnWlV60Fj2XHiHs8HzMNvJKA,7631000
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.13.dist-info/licenses/LICENSE,sha256=WsjkQaj0PPK_TKVoHDok218rd8JZdj1GIJ5TrrZD6jE,1253
10
- gitcode_cli-0.2.13.dist-info/METADATA,sha256=uhypZYLfDE7LPTm5NXcqTCHe5GsGueLUunCCggREN_I,9025
11
- gitcode_cli-0.2.13.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
12
- gitcode_cli-0.2.13.dist-info/entry_points.txt,sha256=IXAR-ST1fHD9LRD7nYjxTBfXjI_CgfEc3BPZmLef2OY,43
13
- gitcode_cli-0.2.13.dist-info/top_level.txt,sha256=2fSmR3kQ-XhdgFQdVvWmZcEyERJKVZVxOhk7tna1Sus,7
14
- gitcode_cli-0.2.13.dist-info/RECORD,,