跳到正文

Terminal

快速的终端界面,可在任意 shell、编辑器或远程服务器中使用。用自然语言描述需求,看着每处编辑以 diff 呈现,并选择哪些命令可以自动运行。

功能

用自然语言提问

输入您的需求,代理会在工作时展示计划。

批准要运行的内容

编辑以 diff 显示,命令会等待您的许可。

随心定制

一键切换主题,从默认主题到 tokyonight 等。

Mini

运行 opencode mini,回复会输出到您自己的滚动记录中。

  • 任意终端可在任意 shell、编辑器的终端或远程服务器中使用。
  • 时间线中的 diff代理每做一处编辑,都会以 diff 显示在时间线中。
  • 稍后继续用 -c 继续上一个会话,或用 -s 继续任意会话。
  • 单次运行opencode run 发送一条消息并输出回复。
  • 代理和命令用 shift+tab 切换代理,用 ctrl+p 打开所有命令。
  • 自动批准使用 --auto 运行,即可允许所有您未拒绝的操作。
  • 任意服务器使用 --server 通过 URL 连接到 OpenCode 服务器。
  • 使用统计opencode stats 显示可分享的使用统计。

  • curlcurl -fsSL https://opencode.ai/v2/install | bash
  • npmnpm install -g @opencode/cli
  • bunbun install -g --trust @opencode/cli
  • brewbrew install anomalyco/tap/opencode-v2
  • paruparu -S opencode-beta

更新日志

  1. v2.2.5

    The connect menu no longer lists MCP servers

    The connect menu no longer lists MCP servers, which are managed in their own place.#60675

  2. v2.2.4

    Preserved prompt cursor styles applied by plugins when themes or unrelated prompt state change

    修复

    • TerminalAdded missing right padding to edit and patch diffs.#60614
    • TerminalExtended the vertical session-tab activity pulse across the full tab width.#60338
  3. v2.2.3

    Added lazy loading for stored image references when experimental.media_blob is enabled

    Added lazy loading for stored image references when experimental.media_blob is enabled. Images are downloaded only for previews, while undo, revert, fork, and prompt recall restore referenced attachments safely.#60116

    破坏性变更

    TUI plugins require OpenTUI 0.8

    @opencode/plugin now requires @opentui/core and @opentui/solid 0.8.0 or later. In OpenTUI 0.8, a ScrollBox's wrapper, viewport, content, and scrollbars are facade objects instead of renderables, and a custom RenderContext must implement clock and onAnimationTick. See the OpenTUI 0.8.0 release notes.

    #60385

    改进

    • TerminalAdded a distinct marker for the selected composer suggestion in the new designs.#60393

    修复

    • TerminalFixed PHP syntax highlighting for code blocks without an opening <?php tag.#60359
    • TerminalPreserved # in file-search paths unless it introduces a valid line range.#60336
    • TerminalKept the configured default cursor style after config reloads.#60302
    • TerminalMatched the search cursor to the highlighted row when a selection dialog has no query.#60310
查看全部更新