https://github.com/cortexkit/aft
安装
注意
请在环境变量中添加 nodejs 的代理配置,确保下载二进制文件的时候走代理。
# 在 ~/.zshrc 中添加 export NODE_USE_ENV_PROXY=1 # 使环境变量生效 source ~/.zshrc
使用如下命令安装。
bun x @cortexkit/aft@latest setup根据安装脚本的指引,按照默认设置即可。默认应该只有 mv 和 delete 工具以及最下方的 github 工具没有打开。
安装脚本会自动在 opencode.jsonc 中添加如下字段:
"plugins": [
"@cortexkit/aft-opencode",
"-opencode.tool.shell",
"-opencode.tool.patch"
],之后不需特殊调用,在流程中 AFT 会自动发挥作用。
注意
如果工作目录中存在类似
.cache、node_modules之类的与 coding 无关且又有海量文件的文件夹,请确保其在.gitignore中忽略,如果没有.gitignore,那么可以在 AFT 的.aftignore中将其忽略。https://github.com/cortexkit/aft/blob/main/docs/config.md#ignoring-files-gitignore—aftignore
否则,AFT 会耗费大量资源在垃圾文件夹中编制索引。