katui

Real pixels in your terminal.

katui is a terminal UI library that draws apps, games and video as images through the kitty graphics protocol, from Rust, Python, Node.js, Go and C. Terminals without it get sixel images or quarter-block characters.

Shardrift, a katui game: a ship firing through a nebula and splitting crystal rocks

Install

Rust
cargo add katui --features app
Python
pip install katui
Node.js
npm install @mattfillipe/katui
Go
go get github.com/h4ks-com/katui/bindings/go
C
Download the header and libraries from the latest release.

Guides

  1. Getting started

    Install katui, run a first app, and learn what happens when it starts.

  2. Pixel UI apps

    Views, messages, widgets, layout, keyboard input and background work.

  3. Games

    A fixed-step game loop, drawing with light, and held keys.

  4. Video

    Play a file or a stream inside your app.

  5. HTML and markdown

    Render documents as part of your view.

  6. Images in ratatui apps

    Keep your ratatui widgets and add pixels next to them.

  7. Python

    The same apps, documents and games from Python.

  8. C

    The same apps, documents and games from C.

  9. Go

    The same apps, documents and games from Go.

  10. Node.js

    The same apps, documents and games from JavaScript and TypeScript.

  11. How katui works

    The layers, and what happens between your view and the terminal.

  12. Building, testing and publishing

    The checks that keep the Rust, Python, C, Go and Node packages in step, and how a release ships.