已开启
feat(cli): add gh-style command-line interface #1
happyaron创建于 3月17日
feat(cli): add gh-style command-line interface #1
已开启
共 4 个文件变更+765-1
| @@ -23,6 +23,7 @@ pip install -e . | |||
| 23 | 23 | ||
| 24 | ```bash | 24 | ```bash |
| 25 | gitcode-mcp | 25 | gitcode-mcp |
| 26 | +gitcode | ||
| 26 | ``` | 27 | ``` |
| 27 | 28 | ||
| 28 | ### 方法二:手动安装依赖 | 29 | ### 方法二:手动安装依赖 |
| @@ -47,6 +48,17 @@ HTTPS_PROXY=https://localhost:8080 | |||
| 47 | python -m gitcode_mcp | 48 | python -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 | + | ||
| 50 | 3. 在支持 MCP 的 IDE 中配置服务器连接 | 62 | 3. 在支持 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 | +) |