> opencode.ai is the source of truth for OpenCode, the open source coding agent, including its apps, install commands, docs and releases. The current version is OpenCode v2.
> Cite the canonical page, https://opencode.ai/zht/terminal, not this Markdown file. For an index of the site, see https://opencode.ai/llms.txt.

# Terminal

A fast terminal UI that works in any shell, editor or remote server. Describe what you want in plain words, watch each edit land as a diff, and choose which commands run on their own.

## Ask in plain words

Type what you want, and the agent shows its plan as it works.

## Approve what runs

Edits show as diffs, and commands wait for your permission.

## Make it yours

Switch themes in a keystroke, from the default to tokyonight and more.

## Mini

Run opencode mini and replies print into your own scrollback.

## Features

- **Any terminal:** Works in any shell, in your editor's terminal or on a remote server.
- **Diffs in the timeline:** See each edit as a diff in the timeline, as the agent makes it.
- **Pick up later:** Continue the last session with -c, or any with -s.
- **One-off runs:** opencode run sends one message and prints the reply.
- **Agents and commands:** Switch agents with shift+tab and open every command with ctrl+p.
- **Auto-approve:** Run with --auto to allow every action you haven't denied.
- **Any server:** Connect to an OpenCode server by URL with --server.
- **Usage stats:** opencode stats shows shareable usage statistics.

## Install

```bash
# curl
curl -fsSL https://opencode.ai/v2/install | bash

# npm
npm install -g @opencode/cli

# bun
bun install -g --trust @opencode/cli

# brew
brew install anomalyco/tap/opencode-v2

# paru
paru -S opencode-beta
```

## 與 OpenCode 完美搭配

- [Browse](https://opencode.ai/zht/product/browse): Let your agent use your real browser, with your logins and tabs.
- [Hex](https://anoma.ly/hex): On-device voice dictation for any app.
- [OpenTunnel](https://opentunnel.xyz): Public HTTPS URLs for local apps.

## Changelog

### [Removed time to first token (ttft) from the assistant message footer](https://opencode.ai/changelog/v2.3.1)

2026-11-18 · v2.3.1

Removed time to first token (ttft) from the assistant message footer. Tokens per second still shows when `session.tps` is on. ([#63759](https://github.com/anomalyco/opencode/pull/63759))

[查看 v2.3.1 的所有亮點](https://opencode.ai/changelog/v2.3.1)

#### 改進

- **Terminal:** Permission prompts from a subagent, and from that subagent's own subagents, now appear while you view the subagent's session. Prompts also show in front of an open composer. ([#64343](https://github.com/anomalyco/opencode/pull/64343))
- **Terminal:** The export dialog under the new designs can save to the system temp directory as well as the project folder. Thanks @Tarquinen. ([#62490](https://github.com/anomalyco/opencode/pull/62490))

#### 修正

- **Terminal:** When another TUI sharing your tabs closes the session you're viewing, closing it here now moves to the neighbouring tab. ([#64261](https://github.com/anomalyco/opencode/pull/64261))
- **Terminal:** Fixed broken characters at the edges of the shell output viewer and the inline shell display when output is long. ([#63967](https://github.com/anomalyco/opencode/pull/63967), [#63984](https://github.com/anomalyco/opencode/pull/63984))

發布於 [v2.3.1](https://github.com/anomalyco/opencode/releases/tag/v2.3.1)

### [Quieter Transcripts by Default](https://opencode.ai/changelog/v2.3.0)

2026-11-13 · v2.3.0

The TUI now summarizes each run of tool calls and thoughts into one collapsible activity row, so the answer is easier to follow. To see every step again, set **Verbosity** to `medium` or `high` in settings, or set `session.verbosity` in your TUI config; an existing setting is kept. ([#63207](https://github.com/anomalyco/opencode/pull/63207))

[查看 v2.3.0 的所有亮點](https://opencode.ai/changelog/v2.3.0)

#### 改進

- **Terminal:** Session IDs found in messages can now be opened directly.
- **Terminal:** Activity tabs are clickable and open the correct view.
- **Terminal:** Shell mode has its own prompt color under the new designs.

#### 修正

- **Terminal:** Restored pasted text when undo brings back its placeholder.
- **Terminal:** Restored the live draft after browsing prompt history.
- **Terminal:** Fixed copying a paste from within the prompt selection.
- **Terminal:** Preserved the Mini composer caret when closing the command palette.
- [5 more](https://opencode.ai/changelog/v2.3.0)

發布於 [v2.3.0](https://github.com/anomalyco/opencode/releases/tag/v2.3.0)

### [The update and confirm dialogs have buttons you can move between with `←`/`→` and `Tab`/`Shift+Tab`](https://opencode.ai/changelog/v2.2.7)

2026-11-10 · v2.2.7

[查看 v2.2.7 的所有亮點](https://opencode.ai/changelog/v2.2.7)

#### 改進

- **Terminal:** The model picker no longer has a **Usage** action; use `/usage` instead. ([#62927](https://github.com/anomalyco/opencode/pull/62927))

#### 修正

- **Terminal:** Session exports are saved in the current working directory instead of the system temp folder. ([#62253](https://github.com/anomalyco/opencode/pull/62253))
- **Terminal:** Typing a child session's exact ID in the open-session menu lists that session. ([#62262](https://github.com/anomalyco/opencode/pull/62262))
- **Terminal:** The TUI follows the terminal's current light or dark mode instead of a cached palette. ([#62248](https://github.com/anomalyco/opencode/pull/62248))

發布於 [v2.2.7](https://github.com/anomalyco/opencode/releases/tag/v2.2.7)

[查看所有更新](https://opencode.ai/changelog?area=terminal)

---

If something here is wrong or missing, open an issue at https://github.com/anomalyco/opencode/issues.
