You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Add --no-mouse and --mouse CLI overrides #60942
I have searched for an existing request for these CLI overrides. Related mouse-capture reports are linked below.
Describe the enhancement you want to request
I use the TUI both locally and over SSH. Most of my mouse interaction is copying code, error messages and stack traces between applications. With mouse capture enabled, native terminal selection and middle-click PRIMARY paste are intercepted. On my GNOME Terminal SSH setup, the application's clipboard integration does not provide the workflow I need.
mouse: false in ~/.config/opencode/cli.json is available, but I want to choose this per launch:
opencode --no-mouse # let the terminal handle selection and paste
opencode --mouse # force application mouse capture
The explicit flag should override the config setting for the lifetime of that invocation, including config reloads. Omitting both flags should preserve the configured behavior. The flags should not rewrite the config file.
Reproduction: Set "mouse": true in cli.json, launch OpenCode over SSH, and try native drag-selection and middle-click paste. Currently there is no CLI switch to release mouse capture for just that launch.
Environment: v2.2.5-based local build; Linux x86_64 (remote kernel 6.8.0-142-generic); Bash; GNOME Terminal on the SSH client; remote TERM=xterm-256color. The clipboard symptom was observed before enabling a local model-discovery plugin. No terminal plugin was configured.
Related:#7926 requested a config/environment switch; #50208 describes clipboard trouble over SSH/tmux. This request is for an explicit CLI override, avoiding terminal-capability detection.
Thanks for the clear request! You'd like --no-mouse / --mouse flags that override the mouse setting in cli.json for one launch (including across config reloads) without changing the file. Maintainers will consider it.
In the meantime you can already get this behaviour with an environment variable. OPENCODE_CLI_CONFIG_CONTENT is merged over cli.json every time the config is loaded or reloaded, and it is never written back to the file. It's already in v2.2.5:
OPENCODE_CLI_CONFIG_CONTENT='{"mouse":false}' opencode # let the terminal handle selection and paste
OPENCODE_CLI_CONFIG_CONTENT='{"mouse":true}' opencode # force mouse capture
If you want it to feel like a flag, add a shell alias, e.g. alias opencode-nomouse='OPENCODE_CLI_CONFIG_CONTENT={"mouse":false} opencode'.
Activity
opencodejr commentedon Oct 31, 2026
Thanks for the clear request! You'd like
--no-mouse/--mouseflags that override themousesetting incli.jsonfor one launch (including across config reloads) without changing the file. Maintainers will consider it.In the meantime you can already get this behaviour with an environment variable.
OPENCODE_CLI_CONFIG_CONTENTis merged overcli.jsonevery time the config is loaded or reloaded, and it is never written back to the file. It's already in v2.2.5:If you want it to feel like a flag, add a shell alias, e.g.
alias opencode-nomouse='OPENCODE_CLI_CONFIG_CONTENT={"mouse":false} opencode'.Related issues:
mousesetting that exists now.