Terminal interface
Starting with version 0.36.0, tuna http, tuna tcp, tuna ssh, tuna postgres, tuna redis and tuna kubernetes show a full-screen interface (TUI) instead of a text log. It turns on automatically when output goes to a terminal.
What's on the screen
The header always shows:
- the account;
- the tunnel address (Forwarding) and the local address it points to;
- the inspector address;
- connection status:
onlineorreconnecting; - messages from the server.
The main area depends on the tunnel type:
| Tunnel | What it shows |
|---|---|
| HTTP | A request feed (newest on top) and metrics: total requests, rpm, p50, p90, number of 4xx and 5xx responses. Enter opens request details: headers and a formatted JSON body |
| Postgres, Redis | Sessions on the left: ● — active, ○ — closed, • — has unseen events. Events of the selected session on the right, highlighted: queries, number of rows returned, errors |
| SSHd | Connection instructions and a session feed, including denied attempts. Enter on an active session opens a live view, on a finished one — its recording |
| Kubernetes | The header shows the service account, namespace, restrictions and access expiry, below is the feed of guest requests |
| TCP | The tunnel log |
Hotkeys
Common to all tunnels:
| Key | Action |
|---|---|
Ctrl+C | Stop the tunnel and exit. This is the only way to exit, q only goes back. On the QR code screen and in the SSH session viewer Ctrl+C only closes them |
c | Copy the tunnel address |
i | Open the inspector in a browser |
l | Show or hide the log (except TCP, where the log is the main screen) |
Q | Show a QR code for the tunnel address, Enter or Ctrl+C goes back, the tunnel keeps running |
↑ ↓ | Select an entry |
g / G | Jump to newest / oldest entries |
Esc, q | Back from details and the log |
g, or ↑ on the first entry, turns on follow mode: the selection moves to new entries as they arrive.
HTTP:
| Key | Action |
|---|---|
Enter | Request details |
r | Replay the request |
/ | Filter by method, path or status, Esc clears the filter |
o | Open the tunnel address in a browser |
Postgres and Redis:
| Key | Action |
|---|---|
Tab | Switch between the session list and events |
y | Copy the query |
SSHd:
| Key | Action |
|---|---|
Enter | Watch an active session or replay a finished one. Ctrl+C closes only the viewer, the tunnel keeps running |
With the interface on, the --qr flag shows the QR code screen once after connecting, Enter or Ctrl+C returns to the main screen.
With --inspect=false requests and sessions are not recorded, so the HTTP, Postgres and Redis feeds stay empty.
Turning it off
To get the text log back, start the tunnel with one of these flags:
tuna http 8080 --log=stdout
tuna http 8080 --log=stderr
tuna http 8080 --log-format=json
Or set the environment variable TUNA_TUI=0.
With --log=/path/to/file.log the interface stays on and the log is also written to the file.
The interface does not turn on automatically when:
- output is redirected to a file or a pipe, or the tunnel runs as a service or under systemd;
CIorNONINTERACTIVEis set;TERM=dumb;- tuna is run by an AI agent (
AI_AGENT,CLAUDECODEorCURSOR_AGENTis set). In this case you can turn it on withTUNA_TUI=1.
The tuna start command keeps its text output.