安装opencode
安装命令
使用 NPM 安装
npminstall-gopencode-ai验证
opencode--version安装githup
下载Windows 安装包(.msi 文件),地址:https://cli.github.com/
双击安装,修改安装目录,完成后,重启 CMD
验证命令:
gh--version登录GitHub CLI
在 CMD 中运行:
gh auth login按提示操作:
选择:https
选择登录方式:选 GitHub.com
认证方式:选 Login with a web browser
按回车后会自动打开浏览器,在浏览器中授权设备登录,完成后再回到 CMD
验证登录成功:
cmd
gh auth status应该显示 Logged in to github.com as 你的用户名
安装oh-my-opencode
方式一:让 AI 代理安装
Install and configure oh-my-opencode by following the instructions here: https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/refs/heads/master/docs/guide/installation.md方式二:命令行安装
bunx oh-my-opencodeinstall--no-tui--claude=max20--openai=yes--gemini=yes验证命令:
bun--version验证全部安装好了
bunx oh-my-opencode doctor显示绿色:
注意:如果提示这个错误
在C:\Users\a.config\opencode目录下新建:tui.json
输入一下内容:
{"plugin":["oh-my-openagent/tui"]}安装Superpowers
在opencode里面输入:
Fetch and follow instructions from https://raw.githubusercontent.com/obra/superpowers/refs/heads/main/.opencode/INSTALL.md验证:
Tell me about your superpowers