工具使用笔记

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。

相关推荐
段一凡-华北理工大学19 分钟前
工业智能体:从Codex/Claude到项目实战~系列文章06:一张蓝图看懂“工业智能体×高炉炼铁“
人工智能·claude·codex·工业智能体·高炉炼铁智能化·高炉智能体技术栈
小年糕是糕手2 天前
【AI】用 AI 做自己的个人网站(上):选模板、写提示词,做出第一版
人工智能·app·网页开发·codex·index·styles·0基础教程
段一凡-华北理工大学3 天前
工业智能体:从Codex/Claude到项目实战~系列文章05:从“AI助手“到“工业智能体“:能力跃迁与落地范式
人工智能·python·claude·codex·工业智能体·高炉炼铁智能化
孤狼GPT7 天前
ChatGPT、Codex数据库实战:MyBatis-Plus第一页查询正常,翻到第10000页为什么越来越慢?
mysql·chatgpt·mybatis-plus·codex·深分页
仙逆GPT8 天前
ChatGPT、Codex工程实战:Agent接入企业知识库,文档明明更新了,为什么回答还是旧版本?
chatgpt·codex·rag·企业知识库·ai agent
孤狼GPT9 天前
ChatGPT、Codex工程实战:Spring Boot的SSE一直在推送,为什么经过Nginx后前端才一次性显示?
spring boot·chatgpt·sse·codex·chatgptplus
孤狼GPT9 天前
ChatGPT、Codex性能实战:MySQL升级到8.0后,SQL没改,为什么接口P99反而翻倍?
spring boot·chatgpt·sql优化·codex·mysql8.0
变量棱镜10 天前
GPT-6.1 Terra 正式上线
gpt·ai·openai·codex
sg_knight11 天前
Bug 定位实战:把报错丢给 Codex,它是怎么修的
chatgpt·llm·bug·openai·agent·ai编程·codex