codexCodeGraph安装1、在 Windows 左下角搜索PowerShell 然后点开Windows PowerShell。2、安装irm https://raw.githubusercontent.com/colbymchenry/codegraph/main/install.ps1 | iex这是 CodeGraph 官方 README 给的 Windows 安装命令。官方也说明这个方式不要求你提前安装 Node.js。CodeGraph 已经安装成功了只是没有加入 PATH所以 PowerShell 找不到codegraph命令。它已经装在这里C:\Users\Administrator\AppData\Local\codegraph\current测试 C:\Users\Administrator\AppData\Local\codegraph\current\codegraph.exe --help如果能显示帮助信息说明程序没问题。3、永久加入 PATH 安装成功后把 CodeGraph 加到环境变量 PATH$cgBin C:\Users\Administrator\AppData\Local\codegraph\current\bin $userPath [Environment]::GetEnvironmentVariable(Path, User) if (($userPath -split ;) -notcontains $cgBin) { [Environment]::SetEnvironmentVariable(Path, $cgBin;$userPath, User) }执行完以后关闭 PowerShell重新打开一个新的 PowerShell。然后测试codegraph --help若能显示一堆命令则说明 PATH 修好了。安装成功后在对应项目使用全程在 PowerShell 中输入。1、确认可用codegraph --help2、如果成功再进入项目目录Set-Location 你的项目路径 例如 Set-Location E:\GalbanoCalibration 或 cd /d E:\GalbanoCalibration3、初始化项目索引codegraph init -i成功后项目目录里会多一个文件夹.codegraph。这就说明 CodeGraph 已经给你的项目建立索引了。4、确认索引状态codegraph status5、最后执行配置给 Codex 用codegraph install --targetcodex --yes完成后关闭 Codex再重新打开 Codex。
工具使用笔记
发布时间:2026/5/26 14:55:40
codexCodeGraph安装1、在 Windows 左下角搜索PowerShell 然后点开Windows PowerShell。2、安装irm https://raw.githubusercontent.com/colbymchenry/codegraph/main/install.ps1 | iex这是 CodeGraph 官方 README 给的 Windows 安装命令。官方也说明这个方式不要求你提前安装 Node.js。CodeGraph 已经安装成功了只是没有加入 PATH所以 PowerShell 找不到codegraph命令。它已经装在这里C:\Users\Administrator\AppData\Local\codegraph\current测试 C:\Users\Administrator\AppData\Local\codegraph\current\codegraph.exe --help如果能显示帮助信息说明程序没问题。3、永久加入 PATH 安装成功后把 CodeGraph 加到环境变量 PATH$cgBin C:\Users\Administrator\AppData\Local\codegraph\current\bin $userPath [Environment]::GetEnvironmentVariable(Path, User) if (($userPath -split ;) -notcontains $cgBin) { [Environment]::SetEnvironmentVariable(Path, $cgBin;$userPath, User) }执行完以后关闭 PowerShell重新打开一个新的 PowerShell。然后测试codegraph --help若能显示一堆命令则说明 PATH 修好了。安装成功后在对应项目使用全程在 PowerShell 中输入。1、确认可用codegraph --help2、如果成功再进入项目目录Set-Location 你的项目路径 例如 Set-Location E:\GalbanoCalibration 或 cd /d E:\GalbanoCalibration3、初始化项目索引codegraph init -i成功后项目目录里会多一个文件夹.codegraph。这就说明 CodeGraph 已经给你的项目建立索引了。4、确认索引状态codegraph status5、最后执行配置给 Codex 用codegraph install --targetcodex --yes完成后关闭 Codex再重新打开 Codex。