gitmyhub

ratty

Rust ★ 3.0k updated 2d ago

A GPU-rendered terminal emulator with inline 3D graphics 🐀🧀

Ratty is a terminal emulator — the app you type commands into — that goes beyond a normal black-and-white text window by rendering everything through your computer's GPU and adding inline 3D graphics directly inside the terminal. Most terminals display only flat text; Ratty lets you embed spinning 3D objects right in the command window alongside your text output.

It has two display modes. In normal 2D mode it behaves like a standard terminal but with GPU-accelerated text rendering. Pressing Ctrl+Alt+Enter switches to 3D mode, which warps the terminal surface into a three-dimensional space you can explore. There is also a spinning 3D rat cursor that can be replaced with any .obj or .glb 3D model file, with configurable spin speed, scale, and brightness.

For developers who want to build their own terminal programs with embedded 3D visuals, Ratty ships a widget library called ratatui-rgp. This widget follows the Ratty Graphics Protocol, a custom spec that lets you register 3D model files and anchor them at specific positions in the terminal grid. A split-pane drawing demo and a document-style demo are included as example applications.

The project is built in Rust using Ratatui for the text UI layer, Vello for GPU text rendering, and Bevy for 3D scene presentation. A GPU is required. You can install it from crates.io with cargo install ratty, from the Arch Linux package repository, or via prebuilt binaries on the GitHub releases page. It is licensed under MIT. The full README is longer than what was provided.