A Rust library for drawing real, pixel-level 2D graphics in the terminal, using the Kitty Graphics Protocol as its first backend.
Currently, TUI toolkits such as ratatui and
cursive can't display real images, smooth shapes, or
pixel-precise positioning because they're fundamentally built around a grid of character cells.
The Kitty Graphics Protocol, however, can render actual pixels in compatible terminals. A few
projects have explored building graphical UIs on top of it (for example,
kui.nvim), but the ecosystem remains small and the
results have generally been experimental.
guiltty aims to provide that same capability — drawable canvases, shapes, sprites, and
viewports — as a standalone, host-independent Rust library, rather than tying it to a single
host application. It does not aim to provide interactive UI controls (buttons, clickable
widgets) or event handling — see docs/spec.md's Boundaries for what's
explicitly out of scope.
This project is still in its early stages of development, but its ambitions are considerable.
Its goals include:
- Creating canvases. [DONE]
- Drawing text and vector shapes. [DONE]
- Placing and animating sprites over preserved backgrounds. [DONE]
- Encoding and transmitting frames via the kitty graphics protocol. [DONE]
- Confirming live rendering against a real kitty-compatible terminal. [IN PROGRESS]
Code-complete but unverified: no kitty-compatible terminal has been available in this environment.
Seedocs/spec-kitty-e2e.mdfor the planned automated + manual verification work. - Carving a terminal into multiple independent viewports. [NOT STARTED]
Design complete — seedocs/design/viewport-regions-zoom-scroll.md— but not yet broken into tasks or implemented. - Zooming and panning across large canvases. [NOT STARTED]
Same design, same status.
What exists today:
- A three-crate Cargo workspace (
guiltty-core,guiltty-kitty,guiltty) matching the architecture described indocs/spec.md. guiltty-core: theColor(RGBA8),Point, andRectprimitives; the backend-agnosticBackendtrait that rendering backends implement; and aCanvassupporting text, shape drawing (lines, rectangles, circles, ellipses, triangles, and arbitrary paths), and movableSprites over a preserved background — all implemented and unit-tested.guiltty-kitty: aKittyBackendimplementingBackend— encodes and transmits aCanvas's pixel buffer as a real kitty graphics protocol escape sequence (built on thekittagecrate), covered by protocol-level tests. Not yet confirmed against a real terminal — see the goals checklist above.guiltty: a facade crate re-exporting the above.- A runnable example (
examples/src/bin/demo.rs) exercising canvas/text/shapes/sprites and two rendered frames, for manual visual verification once a kitty-compatible terminal is available.
Still missing: independent viewport regions, zoom, and scroll/pan for canvases larger than
the terminal (see the goals checklist above). See docs/spec.md's Success
Criteria for the full v0 scope, and
docs/intent/kitty-graphics-ui-toolkit.md for the
confirmed project intent this spec implements.
This is a solo project (author + AI coding agents) with no fixed deadline.
cargo build --workspace
cargo test --workspace
cargo clippy --workspace --all-targets -- -D warnings
cargo fmt --all -- --check
Rust toolchain is pinned via mise (see mise.toml).
MIT — see LICENSE.
