本指南帮助你在 iFlow CLI 中安装和配置 GSD (Get Shit Done) 插件。
- Node.js 18+
- npm 或 npx
- iFlow CLI 已安装
macOS / Linux:
bash -c "$(curl -fsSL https://gitee.com/iflow-ai/iflow-cli/raw/main/install.sh)"Windows:
请访问 iFlow CLI 官网 获取 Windows 安装指南
macOS / Linux:
curl -fsSL https://raw.githubusercontent.com/pioneerAlone/gsd-iflow-installer/main/scripts/unix/install.sh | bashWindows (PowerShell):
irm https://raw.githubusercontent.com/pioneerAlone/gsd-iflow-installer/main/scripts/windows/install.ps1 | iexmacOS / Linux:
# 1. 安装 GSD 到 Gemini CLI 目录
npx get-shit-done-cc@latest --gemini --global
# 2. 创建 iFlow 配置目录
mkdir -p ~/.iflow/commands
# 3. 复制 GSD 文件到 iFlow 目录
cp -r ~/.gemini/commands/gsd ~/.iflow/commands/
cp -r ~/.gemini/agents ~/.iflow/
cp -r ~/.gemini/get-shit-done ~/.iflow/
cp -r ~/.gemini/hooks ~/.iflow/
cp ~/.gemini/gsd-file-manifest.json ~/.iflow/
cp ~/.gemini/package.json ~/.iflow/
# 4. 修复路径引用
sed -i '' "s|/Users/$(whoami)/\.gemini/|/Users/$(whoami)/\.iflow/|g" ~/.iflow/commands/gsd/*.toml
# 5. 配置 settings.json(见下方说明)Windows (PowerShell):
# 1. 安装 GSD 到 Gemini CLI 目录
npx get-shit-done-cc@latest --gemini --global
# 2. 创建 iFlow 配置目录
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.iflow\commands"
# 3. 复制 GSD 文件到 iFlow 目录
Copy-Item -Path "$env:USERPROFILE\.gemini\commands\gsd" -Destination "$env:USERPROFILE\.iflow\commands\" -Recurse
Copy-Item -Path "$env:USERPROFILE\.gemini\agents" -Destination "$env:USERPROFILE\.iflow\" -Recurse
Copy-Item -Path "$env:USERPROFILE\.gemini\get-shit-done" -Destination "$env:USERPROFILE\.iflow\" -Recurse
Copy-Item -Path "$env:USERPROFILE\.gemini\hooks" -Destination "$env:USERPROFILE\.iflow\" -Recurse
Copy-Item -Path "$env:USERPROFILE\.gemini\gsd-file-manifest.json" -Destination "$env:USERPROFILE\.iflow\" -ErrorAction SilentlyContinue
Copy-Item -Path "$env:USERPROFILE\.gemini\package.json" -Destination "$env:USERPROFILE\.iflow\" -ErrorAction SilentlyContinue
# 4. 修复路径引用
$userHome = $env:USERPROFILE -replace '\\', '/'
Get-ChildItem "$env:USERPROFILE\.iflow\commands\gsd\*.toml" | ForEach-Object {
$content = Get-Content $_.FullName -Raw
$content = $content -replace "$userHome/\.gemini/", "$userHome/\.iflow/"
Set-Content -Path $_.FullName -Value $content -NoNewline
}
# 5. 配置 settings.json(见下方说明)编辑 ~/.iflow/settings.json,添加以下配置:
{
"experimental": {
"enableAgents": true
},
"hooks": {
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "node \"$HOME/.iflow/hooks/gsd-check-update.js\""
}
]
}
],
"PostToolUse": [
{
"hooks": [
{
"type": "command",
"command": "node \"$HOME/.iflow/hooks/gsd-context-monitor.js\""
}
]
}
]
},
"statusLine": {
"type": "command",
"command": "node \"$HOME/.iflow/hooks/gsd-statusline.js\""
}
}{
"selectedAuthType": "oauth-iflow",
"baseUrl": "https://apis.iflow.cn/v1",
"modelName": "glm-5",
"mcpServers": {
"context7": {
"command": "npx",
"args": ["-y", "@iflow-mcp/context7-mcp@1.0.0"]
}
},
"experimental": {
"enableAgents": true
},
"hooks": {
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "node \"$HOME/.iflow/hooks/gsd-check-update.js\""
}
]
}
],
"PostToolUse": [
{
"hooks": [
{
"type": "command",
"command": "node \"$HOME/.iflow/hooks/gsd-context-monitor.js\""
}
]
}
]
},
"statusLine": {
"type": "command",
"command": "node \"$HOME/.iflow/hooks/gsd-statusline.js\""
}
}重启 iFlow CLI 后执行:
/gsd:help
如果看到 GSD 命令列表,说明安装成功!
不要直接使用 /gsd:update!
原因:
- GSD 官方安装程序安装到
~/.gemini/目录 - iFlow CLI 使用
~/.iflow/目录 /gsd:update会更新~/.gemini/而不是~/.iflow/
macOS / Linux:
# 下载更新脚本
curl -fsSL https://raw.githubusercontent.com/pioneerAlone/gsd-iflow-installer/main/scripts/unix/update.sh -o ~/.iflow/update-gsd.sh
chmod +x ~/.iflow/update-gsd.sh
# 运行更新
~/.iflow/update-gsd.shWindows (PowerShell):
# 下载更新脚本
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/pioneerAlone/gsd-iflow-installer/main/scripts/windows/update.ps1" -OutFile "$env:USERPROFILE\.iflow\update-gsd.ps1"
# 运行更新
& "$env:USERPROFILE\.iflow\update-gsd.ps1"macOS / Linux:
# 1. 重新安装到 Gemini 目录
npx get-shit-done-cc@latest --gemini --global
# 2. 复制更新后的文件
cp -r ~/.gemini/commands/gsd ~/.iflow/commands/
cp -r ~/.gemini/agents ~/.iflow/
cp -r ~/.gemini/get-shit-done ~/.iflow/
cp -r ~/.gemini/hooks ~/.iflow/
cp ~/.gemini/gsd-file-manifest.json ~/.iflow/
cp ~/.gemini/package.json ~/.iflow/
# 3. 修复路径引用
sed -i '' "s|/Users/$(whoami)/\.gemini/|/Users/$(whoami)/\.iflow/|g" ~/.iflow/commands/gsd/*.toml
# 4. 重启 iFlow CLIWindows (PowerShell):
# 1. 重新安装到 Gemini 目录
npx get-shit-done-cc@latest --gemini --global
# 2. 复制更新后的文件
Copy-Item -Path "$env:USERPROFILE\.gemini\commands\gsd" -Destination "$env:USERPROFILE\.iflow\commands\" -Recurse -Force
Copy-Item -Path "$env:USERPROFILE\.gemini\agents" -Destination "$env:USERPROFILE\.iflow\" -Recurse -Force
Copy-Item -Path "$env:USERPROFILE\.gemini\get-shit-done" -Destination "$env:USERPROFILE\.iflow\" -Recurse -Force
Copy-Item -Path "$env:USERPROFILE\.gemini\hooks" -Destination "$env:USERPROFILE\.iflow\" -Recurse -Force
Copy-Item -Path "$env:USERPROFILE\.gemini\gsd-file-manifest.json" -Destination "$env:USERPROFILE\.iflow\" -Force -ErrorAction SilentlyContinue
Copy-Item -Path "$env:USERPROFILE\.gemini\package.json" -Destination "$env:USERPROFILE\.iflow\" -Force -ErrorAction SilentlyContinue
# 3. 修复路径引用
$userHome = $env:USERPROFILE -replace '\\', '/'
Get-ChildItem "$env:USERPROFILE\.iflow\commands\gsd\*.toml" | ForEach-Object {
$content = Get-Content $_.FullName -Raw
$content = $content -replace "$userHome/\.gemini/", "$userHome/\.iflow/"
Set-Content -Path $_.FullName -Value $content -NoNewline
}
# 4. 重启 iFlow CLI| 命令 | 用途 |
|---|---|
/gsd:help |
显示所有命令 |
/gsd:new-project |
新项目初始化 |
/gsd:new-milestone |
新里程碑 |
/gsd:plan-phase N |
规划阶段 N |
/gsd:execute-phase N |
执行阶段 N |
/gsd:progress |
查看进度 |
/gsd:pause-work |
暂停工作,创建恢复文件 |
/gsd:check-todos |
检查待办事项 |
解决方案:
- 确认文件已复制到
~/.iflow/commands/gsd/ - 确认
~/.iflow/settings.json中experimental.enableAgents为true - 重启 iFlow CLI
解决方案:
# 重新修复路径
sed -i '' "s|/Users/$(whoami)/\.gemini/|/Users/$(whoami)/\.iflow/|g" ~/.iflow/commands/gsd/*.toml解决方案:
- 确认
~/.iflow/hooks/目录存在且包含.js文件 - 确认
settings.json中 hooks 配置正确 - 检查 Node.js 是否在 PATH 中
解决方案:
- Windows 使用
$env:USERPROFILE\.iflow\代替~/.iflow/ - 确保使用 PowerShell 运行脚本,不要使用 CMD
macOS / Linux:
curl -fsSL https://raw.githubusercontent.com/pioneerAlone/gsd-iflow-installer/main/scripts/unix/uninstall.sh | bashWindows (PowerShell):
& "$env:USERPROFILE\.iflow\uninstall-gsd.ps1"gsd-iflow-installer/
├── .github/
│ └── workflows/
│ ├── test.yml # CI 测试工作流
│ └── release.yml # 发布工作流
├── scripts/
│ ├── unix/ # macOS/Linux 脚本
│ │ ├── install.sh
│ │ ├── update.sh
│ │ └── uninstall.sh
│ └── windows/ # Windows 脚本
│ ├── install.ps1
│ ├── update.ps1
│ └── uninstall.ps1
└── README.md
macOS / Linux:
~/.iflow/
├── commands/
│ └── gsd/ # GSD 命令文件
│ ├── help.toml
│ ├── new-project.toml
│ └── ...
├── agents/ # GSD 代理
│ ├── gsd-codebase-mapper.md
│ ├── gsd-debugger.md
│ └── ...
├── get-shit-done/ # GSD 工作流
│ ├── workflows/
│ ├── templates/
│ └── references/
├── hooks/ # GSD 钩子
│ ├── gsd-check-update.js
│ ├── gsd-context-monitor.js
│ └── gsd-statusline.js
├── settings.json # iFlow 配置
├── gsd-file-manifest.json
├── package.json
└── update-gsd.sh # 更新脚本
Windows:
C:\Users\<用户名>\.iflow\
├── commands\gsd\
├── agents\
├── get-shit-done\
├── hooks\
├── settings.json
├── gsd-file-manifest.json
├── package.json
└── update-gsd.ps1
MIT