Hacker News 中文摘要

RSS订阅

Opencode:专为终端打造的AI编程助手 -- Opencode: AI coding agent, built for the terminal

文章摘要

AI编码助手专为终端设计,支持多种安装方式,如curl、npm、brew等,需先卸载旧版本。文档提供配置指南,贡献新功能前建议先通过GitHub讨论。本地运行需Bun和Golang 1.24.x,开发时需团队生成新的API客户端SDK。与Claude Code类似,但完全开源且不绑定特定提供商,推荐Anthropic,也支持OpenAI、Google或本地模型,注重TUI界面。

文章总结

文章主要介绍了一个名为opencode的AI编码代理工具,专为终端设计。以下是详细内容总结:

安装

提供了多种安装方式: - YOLO:通过curl命令直接安装。 - 包管理器:支持npmbunpnpmyarn等。 - macOS:通过brew安装。 - Arch Linux:通过paru安装。 注意:在安装前需移除0.1.x之前的旧版本。

文档

更多配置信息可参考官方文档。

贡献

鼓励开发者提交新功能前先通过GitHub Issues进行讨论,以避免开发不被采用的功能。对于简单的修复则无需提前讨论。

本地运行

本地运行opencode需要以下环境: - Bun - Golang 1.24.x 运行命令: bash $ bun install $ bun run packages/opencode/src/index.ts

开发说明

  • API客户端:在packages/opencode/src/server/server.ts中对TypeScript API端点进行修改后,需要opencode团队生成新的stainless sdk

常见问题

  • 与Claude Code的区别

    • 100%开源。
    • 不绑定任何提供商,支持Anthropic、OpenAI、Google甚至本地模型。
    • 专注于TUI(终端用户界面),由Neovim用户和terminal.shop的创建者开发,旨在突破终端功能的极限。
    • 采用客户端/服务器架构,支持远程驱动(如通过移动应用)。
  • 其他仓库:另一个名称相似的仓库与opencode无关,其背景故事可参考相关链接。

社区

欢迎加入社区,关注YouTube和X.com账号。

文章没有包含图片标记。

评论总结

  1. 项目名称冲突

    • 评论1和评论8指出,项目名称“OpenCode”已被其他项目使用。
    • 关键引用:
      • "Hmm, there is already a similar project with the same name"(评论1)
      • "The name is already taken, openCode is a large important code repository in Europe"(评论8)
  2. 与其他工具的比较

    • 评论2、评论3和评论6提到,OpenCode应与Aider、Claude Code等终端AI编码工具进行比较。
    • 关键引用:
      • "Could really use a comparison versus the seemingly de-facto terminal AI coding tool Aider"(评论2)
      • "Isn't it more appropriate to compare this to aider?"(评论3)
      • "other than the focus on tui design, does this have any advantage over Claude Code, Aider, Gemini using the same model?"(评论6)
  3. 用户界面与功能

    • 评论4、评论5和评论7对OpenCode的用户界面表示赞赏,但也指出了一些功能上的不足。
    • 关键引用:
      • "OpenCode is great. A tier TUI. Basically an open Claude code"(评论4)
      • "the UI looks very great. Just tried it, it's a pity that it doesn't support permissions before executing write/edit commands"(评论5)
      • "UI looks really neat and pleasant to use. Does it create a todo list per prompt similar to Claude Code?"(评论7)
  4. 项目愿景与未来发展

    • 评论9中作者提到,OpenCode目前处于早期开发阶段,未来计划构建多种前端,并专注于代码审查工具的开发。
    • 关键引用:
      • "we're a little over a month into development and have a lot on our roadmap"(评论9)
      • "the goal is to build alternative frontends, mobile, web, desktop, etc"(评论9)
      • "we think of our task as building a very good code review tool"(评论9)

总结:OpenCode的用户界面受到好评,但其名称与其他项目冲突,且功能上仍有改进空间。用户希望看到其与Aider等工具的比较,而作者则强调项目尚处于早期开发阶段,未来将专注于构建多种前端和代码审查工具。