opencode 实战经验分享: opencode 的安装和配置,使用自己的 CPA 模型

2026-04-11 14:390阅读0评论SEO资讯
  • 内容介绍
  • 文章标签
  • 相关推荐
问题描述:

1、安装 OpenCode

npm i -g opencode-ai

mac和Linux推荐使用brew,这样更稳定

brew install anomalyco/tap/opencode

2、打开 OpenCode

opencode

3、安装 oh-my-opencode 插件(使用opencode 这个插件必装)

把这个链接复制粘贴到 opencode 会话里,让它自己动(需要先登录 opencode 账号,免费注册,可以免费使用 GLM4.7):

Install and configure by following the instructions here https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/refs/heads/master/README.md

如果不放心,可以自己进入官网,跟着教程手动安装

github.com

GitHub - code-yeongyu/oh-my-opencode: The Best Agent Harness. Meet Sisyphus: The...

The Best Agent Harness. Meet Sisyphus: The Batteries-Included Agent that codes like you.

然后根据指引登录你的 google 账号和 gpt 或者 claude 账号(可选)

4、安装 opencode-dcp 插件

这个工具主要是可以通过从对话历史记录中删除过时的工具输出,自动减少