已开启
feat(cli): add gh-style command-line interface #1
happyaron创建于 3月17日
feat(cli): add gh-style command-line interface #1
已开启
happyaron创建于 3月17日
共 4 个文件变更+765-1
MREADME.md+12-0
@@ -23,6 +23,7 @@ pip install -e .
23 23 
24```bash24```bash
25gitcode-mcp25gitcode-mcp
26+gitcode
26```27```
27 28 
28### 方法二:手动安装依赖29### 方法二:手动安装依赖
@@ -47,6 +48,17 @@ HTTPS_PROXY=https://localhost:8080
47python -m gitcode_mcp48python -m gitcode_mcp
48```49```
49 50 
51+3. 使用 CLI 直接操作 GitCode:
52+```bash
53+gitcode auth status
54+gitcode repo list
55+gitcode repo view owner/repo
56+gitcode issue create owner/repo --title "Bug report" --body "Steps to reproduce"
57+gitcode pr create owner/repo --title "Ship feature" --head feature-branch --base main --body "Ready for review"
58+gitcode search repos mcp server
59+gitcode api GET /user/repos --field per_page=20 --json
60+```
61+ 
503. 在支持 MCP 的 IDE 中配置服务器连接623. 在支持 MCP 的 IDE 中配置服务器连接
51 63 
52### 代理支持64### 代理支持
@@ -39,6 +39,7 @@ setup(
39 entry_points={39 entry_points={
40 "console_scripts": [40 "console_scripts": [
41 "gitcode-mcp=gitcode_mcp.server:main",41 "gitcode-mcp=gitcode_mcp.server:main",
42+ "gitcode=gitcode_mcp.cli:main",
42 ],43 ],
43 },44 },
44-) 45+)
Asrc/gitcode_mcp/cli.py+493-0文件内容审核中,请稍后刷新重试
Atests/unit/test_cli.py+258-0文件内容审核中,请稍后刷新重试