Skip to content

orhun/ratty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

86 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 



Ratty: A GPU-rendered terminal emulator that supports inline 3D graphics πŸ§€
Inspired by TempleOS | Built with Rust & Ratatui
Built with Ratatui badge

ratty-demo-with-audio.mp4

Features

3D mode

Ever wondered what's behind the terminal? Press Ctrl+Alt+Enter!

ratty-3d-with-audio.mp4

Installation

Requirements:

  • Rust toolchain with Cargo
  • A GPU / graphics stack supported by Bevy and wgpu

From source

cargo install --git https://github.com/orhun/ratty

Configuration

The default configuration file is available in config/ratty.toml.

You can copy this file to $HOME/.config/ratty/ratty.toml and customize it.

Changing the cursor

[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, 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+= Increase font size
Ctrl+- Decrease font size
Ctrl+Alt+0 Reset font size
Ctrl+Alt+Enter Toggle 2D / 3D mode
Ctrl+Alt+Up Increase warp
Ctrl+Alt+Down Decrease warp

Inline 3D objects

Ratty uses its own protocol, the Ratty Graphics Protocol, 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/ if you want to build your own terminal applications that involve inline 3D objects.

Examples

Places a single oversized rat directly in your terminal:

ratty-big-rat-with-audio.mp4

TempleOS-inspired document demo with editable text and embedded inline 3D objects:

ratty-document-with-audio.mp4

Split-pane drawing demo with a 2D canvas on the left and a live 3D preview on the right:

ratty-draw-with-audio.mp4

Architecture

Rendering pipeline

The terminal surface currently uses ratatui for the UI buffer, parley_ratatui for text shaping/rendering and Bevy 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
bluesky-video-1777558230431.mp4
  • "These kinds of experiments are where creativity is born." - @Coko7

  • "No comments. Just support." - @Raphamorim (creator of Rio terminal)

  • "tetro-tui running in Ratty" - @Strophox

Screencast.from.2026-05-04.12-11-50.webm

License

All code is licensed under The MIT License.

πŸ¦€ γƒŽ( ΒΊ \_ ΒΊ γƒŽ) - respect crables!

Credits

Ratty logo designed by @Strophox & @Harunocaksiz

Copyright

Copyright Β© 2025, Orhun ParmaksΔ±z

The author does not have a rat under the hat!

About

A GPU-rendered terminal emulator that supports inline 3D graphics πŸ€πŸ§€

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

  •  

Packages

 
 
 

Contributors

Languages