#345 · 主分类: AI编程助手

opencode-claude-auth

ai anthropic authentication claude claude-code homebrew nodejs oauth opencode opencode-plugin typescript

OpenCode 插件,使用您现有的 Claude Code 凭据——无需单独登录。

项目最后更新:08/03/26

GitHub Stars

1.2K

Forks数量

168

贡献者数量

23

许可证

MIT

收录理由

如果你已经在为 Claude Code 付费,又想把 OpenCode 用起来,这个插件能帮你省掉再配一套 Anthropic 登录的麻烦。它直接读取 Claude Code 已经存好的 OAuth 令牌——macOS 上从钥匙串取,Linux 和 Windows 上从凭据文件读——然后交给 OpenCode 的 Anthropic 提供商。令牌快过期时,它会通过 Anthropic 的 OAuth 端点直接刷新,不消耗任何 LLM 令牌;同时还会把凭据同步到 OpenCode 的 auth.json 作为后备方案。在 macOS 上,它还能自动识别多个 Claude Code 账号,让你用 `opencode auth login` 随时切换。对于已经在用 Claude Code、又想统一到 OpenCode 的团队来说,这确实砍掉了一大块配置上的磕绊,API 密钥的管理也集中到了一处。

相关文章

暂无针对该项目的文章。

如需补充新闻资讯、使用教程、应用测评等内容,欢迎 联系我们推荐选题或投稿。

同类热门项目