anomalyco / anomalyco/opencode

[FEATURE]: Add cursor_style configuration support in tui.json

Open
#38,931 3 comments 0 reactions 1 assignee View on GitHub

@kommander is already working on this.

Since Jul 26, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Verification
  • I searched for existing feature requests.
  • I discussed this in Discord (if there's an existing conversation).
Description

OpenCode currently hardcodes terminal escape sequences that force a block cursor shape, ignoring the native terminal cursor configuration (commonly beam/vertical line in Terminal.app, iTerm2, and other emulators). The TUI initialization in @opentui/core sets terminal raw mode and emits default escape sequences that reset user cursor preferences.

Proposed Solution

Expose a cursor_style key in tui.json config that accepts one of three values - beam, underline, or block - and emits the corresponding DECSCUSR escape codes during terminal initialization.

Example config:

{
  "$schema": "https://opencode.ai/tui.json",
  "cursor_style": "beam"
}
Alternative solutions
  • A settings popup in the TUI itself.
  • Using an environment variable to configure cursor shape.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.