沈宁 (@shenning) 在 opencode 实战经验分享: opencode 的安装和配置,使用自己的 CPA 模型 中发帖
1、安装 OpenCode
npm i -g opencode-ai
mac和Linux推荐使用brew,这样更稳定
brew install anomalyco/tap/opencode
2、打开 OpenCode
opencode
3、安装 oh-my-opencode 插件(使用opencode 这个插件必装)
把这个链接复制粘贴到 opencode 会话里,让它自己动:
Install and configure by following the instructions here https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/refs/heads/master/README.md
如果不放心,可以自己进入官网,跟着教程手动安装
然后根据指引登录你的 google 账号和 gpt 或者 c...