Easiest way to do it any language is to shell out to gum: https://github.com/charmbracelet/gum
For more fine grained controls, you can look into TUI frameworks like bubbletea, ratatui, Textual etc.
For more fine grained controls, you can look into TUI frameworks like bubbletea, ratatui, Textual etc.