Feature 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> 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"
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 ...).
Feature 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, ...):
Sample Usage / Output
The prompt part
opencode>might be used to instead show mode (build>), show additionally model name (build@gpt-5>orgpt-5@build>), or even context informationgpt-5@build[21k/16%]>.Why?
Mockup with existing functionality
opencode runand--continueThis is a small wrapper script
opencode-repl.shthat demonstrates what I have in mind: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 ...).