https://github.com/orhun/ratty
A GPU-rendered terminal emulator with inline 3D graphics ๐๐ง
https://github.com/orhun/ratty
3d 3d-graphics command gpu gpu-rendering graphics ratatui ratty rust templeos terminal terminal-emulator terminal-emulators terminal-graphics
Last synced: 10 days ago
JSON representation
A GPU-rendered terminal emulator with inline 3D graphics ๐๐ง
- Host: GitHub
- URL: https://github.com/orhun/ratty
- Owner: orhun
- License: mit
- Created: 2026-04-20T21:22:09.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2026-05-23T10:19:18.000Z (21 days ago)
- Last Synced: 2026-05-23T21:05:40.887Z (21 days ago)
- Topics: 3d, 3d-graphics, command, gpu, gpu-rendering, graphics, ratatui, ratty, rust, templeos, terminal, terminal-emulator, terminal-emulators, terminal-graphics
- Language: Rust
- Homepage: https://ratty-term.org/
- Size: 16.6 MB
- Stars: 2,329
- Watchers: 10
- Forks: 54
- Open Issues: 33
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
Ratty: A GPU-rendered terminal emulator with inline 3D graphics ๐ง
Inspired by TempleOS | Built with Rust & Ratatui
["Rodent-obsessed developer creates Ratty to bring 3D graphics to the command line"](https://www.theregister.com/software/2026/05/11/ratty-terminal-emulator-brings-3d-graphics-to-the-command-line/5238299) - The Register
["This New Terminal is Absurd (But Totally Fun)"](https://itsfoss.com/ratty-terminal/) - It's FOSS
["10 weird OSS projects you need right now... "](https://www.youtube.com/watch?v=qPuzWFvRajk) - Fireship
## Features
- Spinning rat cursor ([customizable](#changing-the-cursor))
- Traditional 2D and [new 3D mode](#3d-mode)!
- [Inline 3D objects](#inline-3d-objects)
- [GPU-backed text rendering](#rendering-pipeline)
- Image support (via Kitty Graphics Protocol >:\()
โถ๏ธ [Watch the demo video here!](https://youtu.be/cY9AX5j-osY)
๐ [Read the behind the scenes blog post here!](https://blog.orhun.dev/introducing-ratty)
### 3D mode
Ever wondered what's _behind_ the terminal? Press Ctrl+Alt+Enter!
## Installation
[](https://repology.org/project/ratty/versions)
Requirements:
- A GPU / graphics stack supported by Bevy and wgpu
- Melted cheese (optional but recommended)
### [crates.io](https://crates.io/crates/ratty)
```bash
cargo install ratty
```
### [Arch Linux](https://archlinux.org/packages/extra/x86_64/ratty/)
```bash
sudo pacman -S ratty
```
### Binary releases
Prebuilt binaries are available on the [GitHub releases page](https://github.com/orhun/ratty/releases) for direct download.
### From Git
Requirements:
- Rust toolchain with Cargo
- on Bazzite / Bluefin: `sudo rpm-ostree install gcc fontconfig-devel wayland-devel` (then reboot)
- on Debian / Ubuntu: `sudo apt-get update ; sudo apt-get install gcc pkgconf libfontconfig-dev libwayland-dev`
- on Fedora: `sudo dnf install gcc fontconfig-devel wayland-devel`
```bash
cargo install --git https://github.com/orhun/ratty
```
## Configuration
The default configuration file is available in [`config/ratty.toml`](config/ratty.toml).
You can copy this file to `$HOME/.config/ratty/ratty.toml` and customize it.
### Changing the cursor
```toml
[cursor.model]
path = "CairoSpinyMouse.obj"
scale_factor = 6.0
brightness = 0.5
x_offset = 0.5
plane_offset = 18.0
visible = true
[cursor.animation]
spin_speed = 1.4
bob_speed = 2.2
bob_amplitude = 0.08
```
For [`cursor.model.path`](config/ratty.toml), Ratty supports both `.obj` and `.glb` assets.
Other useful cursor fields are:
- `scale_factor`: scales the model relative to the terminal cell size
- `brightness`: adjusts the cursor material brightness
- `x_offset`: shifts the cursor model horizontally inside the cell
- `plane_offset`: pushes the cursor away from the warped terminal surface in 3D mode
- `visible`: show the custom 3D cursor model instead of only the terminal cursor
## Key Bindings
| Key | Action |
| ----------------------------------------------- | -------------------- |
| Ctrl+Alt+C | Copy selection |
| Ctrl+Alt+V | Paste clipboard |
| Ctrl+Alt+Enter | Toggle 2D / 3D mode |
| Ctrl+Alt+M | Toggle Mobius mode |
| Ctrl+Alt+Up | Increase warp |
| Ctrl+Alt+Down | Decrease warp |
| Alt+PageUp | Scroll one page up |
| Alt+PageDown | Scroll one page down |
| Alt+Up | Scroll one line up |
| Alt+Down | Scroll one line down |
| Ctrl+= | Increase font size |
| Ctrl+- | Decrease font size |
| Ctrl+Alt+0 | Reset font size |
## Inline 3D objects
Ratty uses its own protocol, the [Ratty Graphics Protocol](protocols/graphics.md),
to place inline 3D objects in terminal space.
RGP supports:
- registering `.obj` and `.glb` assets by path
- placing them at terminal cell anchors
- animation, scale, color, depth and other attributes
There is a Ratatui widget called `ratatui-rgp` available in
[`widget/`](widget/) if you want to build your own terminal applications that involve inline 3D objects.
### Examples
#### [Big rat](widget/examples/big_rat.rs)
Places a single oversized rat directly in your terminal:
#### [Document](widget/examples/document.rs)
TempleOS-inspired document demo with editable text and embedded inline 3D objects:
#### [Draw](widget/examples/draw.rs)
Split-pane drawing demo with a 2D canvas on the left and a live 3D preview on the right:
### Apps
Here are some applications explicitly built around Ratty's Graphics Protocol:
#### [Ratscad](https://github.com/qewer33/ratscad)
Terminal CAD:
#### [Ratty-runner](https://github.com/ozzyocak/ratty-runner)
Endless runner built for Ratty:
#### [ComChan](https://github.com/Vaishnav-Sabari-Girish/ComChan)
A blazingly fast serial monitor with plotter TUI and 3D telemetry
## Architecture
### Rendering pipeline
The terminal surface currently uses [`ratatui`](https://github.com/ratatui/ratatui) for the UI buffer,
[`parley_ratatui`](https://github.com/gold-silver-copper/parley_ratatui) for text shaping/rendering
and [Bevy](https://bevyengine.org/) for scene presentation.
Current workflow:
1. Ratatui buffer on CPU
2. Parley/Vello renders on GPU
3. Read back RGBA to CPU
4. Copy into Bevy image
5. Bevy presents that image in 2D and 3D
Terminal drawing is GPU-rendered through Parley/Vello, but the main terminal
image still crosses back through CPU memory before Bevy presents it. This is a
GPU-powered bridge, not a fully GPU-resident shared-texture path.
If the project later moves to a fully GPU-resident path, that will require a
dedicated Bevy render integration that renders into a Bevy-owned texture on
Bevy's render-world device instead of using the current readback bridge.
## Endorsements
- _"This is like a legitimately cool project but also I just spent like 20 minutes adjusting the config for the rat spinning to see him spin faster and more erratically and it cracked me up"_ - [@vimlena.com](https://bsky.app/profile/vimlena.com/post/3mkoshbzpvs2y)
- _"These kinds of experiments are where creativity is born."_ - [@Coko7](https://github.com/Coko7)
- _"No comments. Just support."_ - [@Raphamorim](https://github.com/raphamorim/) (creator of Rio terminal)
- _"[tetro-tui](https://github.com/Strophox/tetro-tui) running in Ratty"_ - [@Strophox](https://github.com/Strophox)
## License
All code is licensed under The MIT License.
๐ฆ ใ( ยบ \_ ยบ ใ) - respect crables!
## Credits
Ratty logo designed by [@Strophox](https://github.com/Strophox) & [@Harunocaksiz](https://github.com/harunocaksiz)
## Copyright
Copyright ยฉ 2026, [Orhun Parmaksฤฑz](mailto:orhunparmaksiz@gmail.com)
The author does not have a rat under the hat!