RETUI can frame the shell without pretending to own it.
A terminal-looking launcher is not automatically a Linux environment. Termux already does that job properly. RETUI's part is to make the useful pieces reachable from the launcher without blurring who owns the process.
The boundary is the feature
Termux owns the shell, packages, scripts, tmux sessions, running commands, and network work. RETUI owns its terminal-styled surfaces, input controls, suggestions, module panels, and the routes that ask Termux to do something.
That may sound like implementation detail, but it changes how the system behaves. Removing a script module from RETUI does not delete the script. Closing a workspace does not pretend the tmux session never existed. Updating the launcher does not replace your Termux environment.
Setup is explicit because Android makes it explicit
RETUI dispatches through Termux's `RUN_COMMAND` surface. Termux has to expose that surface, allow external apps, and be given storage access when your scripts need shared storage.
termux-setup-storage mkdir -p ~/.termux echo 'allow-external-apps = true' >> ~/.termux/termux.properties termux-reload-settings
Then grant RETUI the Termux `RUN_COMMAND` permission in Android settings. Back in the launcher, let the bridge tell you what is missing.
tbridge -status tbridge -doctor tbridge -probe
`tbridge -setup` prints the current checklist on the phone. `-doctor` reports whether Termux is installed, whether this Termux build declares `RUN_COMMAND`, and whether RETUI has been granted it. A failed bridge should explain its missing piece instead of returning a mysterious empty panel.
For one job, run one script
The lightest path is the RETUI Termux console. Use it to check the connection, open Termux itself, or dispatch a script that prints a result and exits.
termux termux -status termux -setup termux -run /data/data/com.termux/files/home/retui/test.sh
The console keeps common operations nearby, including registered Termux apps. It is a launcher surface over Termux work, not an emulated shell implemented by RETUI.
For glanceable output, use a module
A script that checks a server, formats a small report, or reads safe launcher data does not always need a full terminal session. Register it as a module and let RETUI render stdout as a panel.
module -add server termux:/data/data/com.termux/files/home/retui/server-health.sh module -refresh server module -show server
The script can emit plain text or structured markers such as `::title`, `::body`, `::pre`, and `::suggest`. RETUI also materialises a narrow set of read-only values for scripts, including current time, battery, network, brightness, theme, UI, storage, and upcoming calendar data.
Those values are deliberately narrow. Contacts, arbitrary Android actions, and notification replies are not handed to every shell script as convenient global variables.
For a persistent tool, use the workspace
Midnight Commander, htop, SSH, NeoVim, and REPLs need a real terminal session that survives longer than one command. The optional tmux workspace gives them a phone-friendly RETUI frame while Termux keeps the actual process alive.
The workspace is hidden by default. Install the local helper from Termux, then opt into its toolbar button.
pkg install curl tmux socat -y curl -fsSL https://raw.githubusercontent.com/DvilSpawn/Re-TUI/master/termux/retui/install.sh | sh
config -set show_tmux_workspace_button true tmux
RETUI provides the screen, input field, key tray, gestures, window navigation, and reconnection controls. The bridge bootstraps with `RUN_COMMAND`, then prefers token-protected local IPC for live input and changed-frame streaming. The traffic remains on the device.
A phone needs terminal controls a laptop takes for granted
The workspace key tray includes Escape, Tab, arrows, page keys, modifiers, function keys, insert, delete, enter, and backspace. Swipe the tray to move between navigation and function-key modes. Swipe the terminal pane to move between tmux windows.
Local colon commands manage the RETUI side of the workspace:
:help:new [name]:prev:next:launch:status:refresh:reconnect:home`:status` is the useful one when something feels stale. It checks the Termux install, `RUN_COMMAND`, socket state, terminal geometry, and saved launcher count without pretending every failure means the same thing.
Launchers should return to work, not duplicate it
The workspace has built-in launchers for shell, htop, Midnight Commander, nano, vim, Python, Node, and logs. You can save your own. Launching an id first looks for an existing matching tmux window and focuses it; only a missing one creates a new window.
tmux launch mc tmux launch logs tmux switch 2 tmux switch 2:bash
That makes aliases useful without turning them into window factories.
alias -add MC tmux launch mc alias -add LOGS tmux launch logs alias -add BASH2 tmux switch 2
Termux apps sit between a module and a workspace
A Termux app is a registered, persistent session for an interactive shell tool that deserves its own RETUI-styled surface. RETUI owns the registration, window, input, and action chips. Termux owns the command and tmux process.
termux -app-add radio bash ~/retui/radio.sh termux -app radio termux -app-info radio termux -app-actions radio
Static action chips can send small inputs into the running app. The shell project does not need a special RETUI manifest; registration stays with the launcher where it can be inspected, changed, or removed.
Choose the smallest honest surface
termux -runA script should run once, print its result, and finish.
module -add ... termux:The result should become a small glanceable panel in the launcher.
termux -appAn interactive shell program needs a focused RETUI window and persistent session.
tmuxA full terminal tool needs its real TUI, keys, windows, and long-lived shell state.
filesThe job is browsing, opening, moving, or managing files.
The best Termux integration is not the one that hides Termux. It is the one that lets the shell stay real while making its useful work feel at home inside RETUI.