工具使用笔记

codex

CodeGraph

安装

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 --help

2、如果成功,再进入项目目录:

复制代码
Set-Location "你的项目路径"
例如:
Set-Location "E:\GalbanoCalibration"
或:
cd /d "E:\GalbanoCalibration"

3、初始化项目索引:

复制代码
codegraph init -i

成功后,项目目录里会多一个文件夹:.codegraph 。

这就说明 CodeGraph 已经给你的项目建立索引了。

4、确认索引状态:

复制代码
codegraph status

5、最后执行,配置给 Codex 用:

复制代码
codegraph install --target=codex --yes

完成后,关闭 Codex,再重新打开 Codex。

相关推荐
BryceBorder6 天前
Agent Memory 不只是聊天记录:手搓三大记忆系统
后端·agent·面经·codex·claude code·agent memory
O。O蛋黄酥啊6 天前
Claude Code 记忆机制全拆解:Auto Memory 与 CLAUDE.md 双轨解析
大模型·agent·memory·claude·codex·记忆
JavaPub-rodert7 天前
Codex 里的 GPT-6 Astra、GPT-5.6 Sol、Terra、Luna 怎么选?
ai·codex·skill
Ztiddler7 天前
Codex重新连接解决方法
chatgpt·openai·codex
仙逆GPT7 天前
ChatGPT、Codex工程决策:单Agent什么时候够用,什么时候才值得切到多Agent?
codex·ai agent·chatgptplus·多agent·chatgptpro
AI砖家7 天前
AI 编程面试 20 题:Codex、Claude Code 与 AI 工具使用全攻略
人工智能·语言模型·ai编程·claude·codex
AI砖家7 天前
我用 Codex + GPT-6 Astra 搭了一条自动化剪辑流水线,从安装到批量出片全流程分享
人工智能·语言模型·ai编程·claude·codex
守城小轩8 天前
AcBoter 多账号管理指南:隐私与设置选项(五)
chatgpt·codex·acboter