Appearance
快速开始
本指南将帮助你在 5 分钟内开始使用 Git Doctor。
环境要求
| 依赖项 | 版本要求 | 说明 |
|---|---|---|
| VS Code | >= 1.85.0 | 必需 |
| Node.js | >= 16.x | 必需 |
| Git | 已安装 | 必需 |
| DeepSeek/Kimi API Key | - | 可选,用于 AI 功能 |
安装方式
方式一:VSIX 安装(推荐)
- 下载项目根目录的
git-doctor-1.0.0.vsix文件 - 在 VS Code 中按
Ctrl+Shift+P打开命令面板 - 输入
Extensions: Install from VSIX... - 选择 VSIX 文件完成安装
- 重启 VS Code
方式二:从源码构建
bash
# 克隆项目
git clone https://github.com/git-doctor/git-doctor.git
cd git-doctor
# 安装依赖
npm install
# 编译
npm run compile
# 打包 VSIX
npm run package方式三:CLI 命令行
bash
# 全局安装
npm install -g git-doctor
# 查看帮助
git-doctor --help第一次诊断
VS Code 插件
- 打开任意 Git 仓库项目
- 点击侧边栏的 Git Doctor 图标(脉搏图标)
- 点击 运行诊断 按钮
或使用命令面板:
- 按
Ctrl+Shift+P - 输入
Git Doctor: 运行完整诊断
CLI 命令行
bash
# 进入 Git 仓库目录
cd your-project
# 运行完整诊断
git-doctor analyze
# 查看各项分析
git-doctor size # 仓库体积
git-doctor commits # 提交质量
git-doctor branches # 分支健康
git-doctor security # 敏感信息诊断结果
诊断完成后,你将看到:
┌─────────────────────────────────────────┐
│ 健康概览 │
├─────────────────────────────────────────┤
│ 📊 健康评分: 85/100 │
│ │
│ 📦 仓库体积: 12.5 MB │
│ 📝 提交规范率: 78% │
│ 🌿 僵尸分支: 2 │
│ 🔒 安全风险: 2 (中) │
└─────────────────────────────────────────┘