Tangled – tail CI logs over SSH

nerdypepper1 pts0 comments

Tail CI logs over SSH — Tangled's Blog

If you push to a new branch on a remote, if CI was<br>triggered, Tangled now helpfully supplies an ssh command<br>for you:

λ jj git push -c @-<br>-- snip --<br>remote: → Browse CI logs in your terminal:<br>remote: ssh -t -p 3333 tangled.org did:plc:j5hmlfdrwkvtxm7cjmu7j2is 796ecc5b0ce5381ed5b5021e7cc28b4b05e03c92<br>Paste that command in a new shell, and you are dropped into<br>a fullblown TUI, served over SSH:

Try it for yourself:

ssh -t -p 3333 tangled.org did:plc:j5hmlfdrwkvtxm7cjmu7j2is 796ecc5b0ce5381ed5b5021e7cc28b4b05e03c92

That SSH commmand runs a "screen based" program on the<br>remote machine. In this case, the program is a TUI built<br>using<br>bubbletea and<br>wish.

SSH powered interfaces are wonderful for several reasons:

They require zero installation

They work great for interactive bits like menus

They have all the upsides of running a TUI: you can<br>persist them over tmux, theme them with terminal colors<br>etc.

But they are doubly wonderful when streaming CI logs, the<br>screen-program is totally unaware of ANSI escape codes, but<br>they are handled correctly by virtue of writing to a PTY.<br>Both ends (the commands running in the CI job and the PTY)<br>are speaking the same language.

tangled logs remote program tail push

Related Articles