跳到正文

Terminal

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

功能

用自然语言提问

输入你的需求,agent 会在工作时展示计划。

批准要运行的内容

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

随心定制

按一个键就能切换主题,从默认主题到 tokyonight 等。

Mini

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

  • 任意终端可在任意 shell、编辑器内置终端或远程服务器中使用。
  • 时间线中的 diffagent 每做一处编辑,都会以 diff 显示在时间线中。
  • 稍后继续用 -c 继续上一个会话,或用 -s 继续任意会话。
  • 单次运行opencode run 发送一条消息并输出回复。
  • agent 和命令用 shift+tab 切换 agent,用 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.4.3

    Added Find in session behind the Find in session experiment (`experimental["session-find"]

    Added Find in session behind the Find in session experiment (experimental["session-find"]: true): press <leader>f, super+f, or run /find to search loaded messages incrementally.#64870

    查看 v2.4.3 的全部亮点

    改进

    • TerminalText selections now render using theme colors (text.selection and background.selection), and provider lists now use the same ordering as Desktop and opencode auth login.#65776#66736

    修复

    • TerminalFixed three batches of TUI issues covering session list pinning and renaming, stashed input modes, pinned permission prompts, "none" in keybind arrays, "Jump to latest", Mermaid bold tags and unspaced edge labels, symlinked cli.json live reload, clickable bare URLs in user messages, unmatched leader sequences, and opencode mini --replay-limit, plus an empty slot-path hang.#66795#66813#66841#66863
  2. v2.4.2

    The model picker stays responsive with large catalogs, such as OpenRouter's

    查看 v2.4.2 的全部亮点

    改进

    • TerminalThe goal dialog scrolls when the goal is long.#65906
    • TerminalUpdated OpenTUI to 0.9.9.#65919

    修复

    • TerminalFixed /models showing only free models when the TUI opened a session in another directory.#66424
    • TerminalFixed type-to-filter in Message Actions.#65903
    • TerminalFixed removing theme from config not switching back to the default theme.#65925
    • TerminalFixed quick successive settings changes overwriting each other.#65761
    还有 1 项 修复
  3. v2.4.1

    Config-Only Providers Show Their Models

    Providers you set up only in your config, such as Ollama, now show their models in /models without a /connect login.#65793

    查看 v2.4.1 的全部亮点

    改进

    • Core, Terminal, DesktopWith experimental.model_speeds enabled, model service tiers are exposed as remembered speeds instead of separate model-picker entries.#65749
查看全部更新