Go libraries
Parts of tuios that you can use in your own Go programs, each a Go module of its own under a tuios.dev import path.
Some parts of tuios are Go modules of their own. You can import one without the rest of tuios. Each module has a tuios.dev import path. The code is in the tuios repository, in a folder with the same name.
progstatus
Read and write the Program Status Protocol, OSC 7501. A program says what it does, and a terminal shows it.
vt
A terminal emulator in pure Go. Feed it what a program prints, and read the screen, the scrollback and the modes.
swatch
Read the desktop's colour theme as a palette with semantic roles, and follow it while your program runs. The first source is Omarchy.
shot
Render a terminal screen to PNG, SVG, HTML, ANSI or text, with an optional window frame.
tml
The TML language: parse, print and validate documents for terminal surfaces, with bindings, actions and JSON Patch.
loom
Draw TML documents into terminal cells: flex layout, theme roles at every colour depth, redraws of only what changed, and local keys and clicks.
plot
Bar, line, area, sparkline, gauge, histogram, heatmap and pie charts as terminal cells, in braille, block elements or ASCII.
sketch
Draw Mermaid diagrams as SVG, PNG or box-drawing text, in pure Go. A port of pele by kepano.
acp
A client for the Agent Client Protocol, versions 1 and 2. Start a coding agent, open a session, send prompts and read typed updates.
harness
Recognise coding-agent CLIs and read their state from the screen, with one TOML manifest per agent and a reason for every answer.
Embed tuios
Run the whole window manager inside your own Bubble Tea program, with the pkg/tuios package.
How they fit together
┌────────────────────┐ ┌───────────────────────────┐ │ tml: the language │─────┐ │ loom: draws documents │ └────────────────────┘ ├►│ │──── cells ──┐ │ └───────────────────────────┘ │ │ │ ┌──────────────┐ │ │ ┌────────────────┐ │ plot: charts │─────┘ ┌───────────────────┐ │ │ shot: pictures │ │ │──────────►│ sketch: Mermaid │ ├►│ │ └──────────────┘ └───────────────────┘ │ └────────────────┘ │ ┌─────────────────────────┐ ┌───────────────────────┐ │ │ progstatus: OSC 7501 │───────►│ vt: terminal emulator │───── screens ─┘ └─────────────────────────┘ └───────────────────────┘ ┌───────────────────────────┐ │ swatch: desktop themes │ └───────────────────────────┘
99 columns, 17 rows. No layout fits in 80 columns, so it is drawn at its full width. It shrinks to fit the page. Select Full size to read it at full size.
flowchart LR
tml["tml: the language"] --> loom["loom: draws documents"]
plot["plot: charts"] --> loom
progstatus["progstatus: OSC 7501"] --> vt["vt: terminal emulator"]
loom -- cells --> shot["shot: pictures"]
vt -- screens --> shot
swatch["swatch: desktop themes"]
plot --> sketch["sketch: Mermaid"]- loom draws tml documents, and uses plot for the charts.
- vt reads OSC 7501 reports with progstatus.
- shot turns cells into pictures: a vt screen, or loom's and plot's cells.
- sketch uses plot to draw XY charts as text.
- swatch stands alone.
- acp stands alone. It needs only the standard library.
- harness stands alone. See agents for how tuios uses it.
tuios uses all ten. Each page shows pictures that the docs build draws from real code with these libraries.
Install a library
go get tuios.dev/progstatus
go get tuios.dev/vt
go get tuios.dev/swatch
go get tuios.dev/shot
go get tuios.dev/tml
go get tuios.dev/loom
go get tuios.dev/plot
go get tuios.dev/sketch
go get tuios.dev/acp
go get tuios.dev/harnessThe go command asks tuios.dev where the code is. Go 1.25 or later can fetch a library directly. With the default module proxy, any Go version can fetch it.
Versions
Each library has its own versions. A library tag has the folder name as a prefix, such as progstatus/v0.1.0. The libraries are at v0, so the API can change between minor versions.
Report a problem in the tuios issue tracker.
Contributing
Build TUIOS from source, run the tests, and send a pull request.
progstatus
A Go package for the Program Status Protocol, OSC 7501. Write a report from a program, or read reports in a terminal.
tuios lives only at tuios.dev and github.com/Gaurav-Gosain/tuios. tuios has no X or Twitter account. An account that offers a tuios token or presale is not this project.