Skip to content

[FEATURE]: OpenCode REPL mode, a simpler alternative to the TUI #4355

Closed

Description

@tnglemongrass

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

This ticket is about exploring the idea of a simpler variant of the interactive TUI mode, that looks and feels closer to using a typical REPL (bash, python, ...):

  • One-dimensional output, relies on the terminal for managing scrollback buffer.
  • Readline-shortcuts, including typical Ctrl-R for backward history search.
  • Prompt-like interaction, alternating between asking for user input and showing output.

Sample Usage / Output

opencode repl
opencode> create a react component
...opencode output...
opencode> add styling with tailwind
...opencode output...
opencode> /exit

The prompt part opencode> might be used to instead show mode (build> ), show additionally model name (build@gpt-5> or gpt-5@build> ), or even context information gpt-5@build[21k/16%]> .

Why?

Mockup with existing functionality opencode run and --continue

  • There are two commands that can already do most of the heavy-lifting:
    • opencode run "first user prompt"
    • opencode run --continue "follow-up user prompts"
Image

This is a small wrapper script opencode-repl.sh that demonstrates what I have in mind:

#!/bin/bash

echo -ne "\033[32mopencode\033[0m> "
read userInput

opencode run "$userInput"

while true; do
    echo -ne "\033[32mopencode\033[0m> "
    read userInput

    if [ "$userInput" = "exit" ]; then
        break
    fi

    opencode run --continue "$userInput"
done

Integration in opencode itself would allow for a much tighter integration though (streaming, mode and model switching, ctrl-c handling, tab-tab preview/completion for slash commands ...).

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Nov 15, 2025
  2. github-actions commented on Nov 15, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    While these issues address related aspects like interactive prompts, readline navigation, and alternative interaction modes, your REPL mode request is more comprehensive and focused on a simpler, one-dimensional terminal-based interface.

    Feel free to ignore if none of these address your specific case.

  3. changed the title [-][FEATURE]: OpenCode REPL mode, a simpler variant of the TUI mode[/-] [+][FEATURE]: OpenCode REPL mode, a simpler alternative to the TUI[/+] on Nov 15, 2025
  4. rekram1-node commented on Nov 16, 2025

    @rekram1-node
    Collaborator

    Yeah we've talked about this one before internally

  5. Sleepful commented on Jan 14, 2026

    @Sleepful
    Contributor

    +1, the current TUI implementation makes it impossible for my friend to use OpenCode because the TUI is really poor UX with assistive technologies.

  6. dennischenfeng commented on Feb 20, 2026

    @dennischenfeng

    +1, I use a screenreader (NVDA) since I'm a visually impaired engineer, and I agree that the TUI is difficult to navigate.

  7. IndianBoy42 commented on Feb 20, 2026

    @IndianBoy42

    So the question is can this be created as a plugin/out of tree? There are many alternate webui and desktop GUI, so alternate tui should be doable right?

  8. Fryuni commented on Feb 20, 2026

    @Fryuni

    I don't know if a plugin can register a new command. But as a wrapper that runs opencode serve and provides a repl connected to the server should be simple to do.

  9. github-actions commented on Apr 22, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

discussionUsed for feature requests, proposals, ideas, etc. Open discussion

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions