2026-20

SSH PTYs for Great Good

All my work happens over SSH. None of my client machines (ranging from macbooks to android tablets) require any form of setup to get going, and they are always consistently themed.

So I've stuck a small SSH-app into the Tangled appview to browse CI logs from the terminal:

If you push or update a branch on a remote, and CI was triggered by that push, a helpful message is supplied:

λ jj git push -c @-
  -- snip --
remote: →  Browse CI logs in your terminal:
remote:    ssh -t -p 3333 tangled.org did:plc:j5hmlfdrwkvtxm7cjmu7j2is 796ecc5b0ce5381ed5b5021e7cc28b4b05e03c92

This ssh command runs a TUI using bubbletea over SSH, using wish. It is especially nice for streaming CI logs because the screen-program is totally unaware of ANSI escape codes, but they are handled correctly by virtue of writing to a PTY. Both ends (the commands running in the CI job and the PTY) are speaking the same language.

Squeezing Performance out of go-git

For the knotmirror service, we serve repository data over an XRPC API. This translation from git's ODB to XRPC used go-git. However, with increasing loads and larger repos, go-git slowly became infeasiable. As it turns out, shelling out to git instead and parsing output is a far superior option in terms of memory usage. We have been slowing swapping out all our XRPC APIs to use git for-each-ref and git rev-list.