KinoTuition demo
Mix.install([
{:kino_tuition, github: "ausimian/kino_tuition"}
])
A tuition session in the browser
Run the cell below. It opens an xterm.js terminal wired to a tuition session —
the tuition_demo reference loop — running entirely on the server, its frames
streamed to the browser and your keystrokes streamed back.
Note:
tuition_demoprobes terminal capabilities at startup. Over Livebook that probe is unreliable (seeKinoTuition.Backend): colours may fall back to the 256-colour baseline and, on a slow link, a brief burst of stray input can appear at startup. The shell cell below uses a non-probing host and is unaffected.
KinoTuition.new(fn opts -> :tuition_demo.start(opts) end, cols: 100, rows: 30)
Hosting the multi-pane shell
Any tuition host works — you just forward the options map (with backend: and
bridge: already merged in) to it. tuition_shell.start/2 takes {Module, Title}
pane specs; tuition_widget_demo is the demo pane module tuition ships (it
implements the tuition_pane behaviour). The shell does not probe.
panes = [{:tuition_widget_demo, "Widgets"}]
KinoTuition.new(fn opts -> :tuition_shell.start(panes, opts) end, cols: 120, rows: 40)