SSHUI
A Rust framework for building interactive terminal user interfaces (TUIs) that run over SSH. Built on top of Ratatui and russh.
Demo
https://github.com/user-attachments/assets/f3a5bf04-11df-4d3f-a8c0-1e2e67021fa4
Features
- SSH Server - Host your TUI application on an SSH server
- Ratatui Integration - Build beautiful terminal UIs using the Ratatui framework
- Client Isolation - Each SSH client gets its own application instance
- ANSI Rendering - Full support for colors and styles
- Terminal Resizing - Handles dynamic terminal size changes
- Customizable Auth - Ask for a specific username and password (or not!)
- Backend Support - Write your own backend to connect clients to each other!
Installation
Add to your Cargo.toml:
[]
= "0.2"
= "0.28"
= "1.0"
Quick Start
Implement the App trait for your TUI:
use ;
use Result;
Start the SSH server:
async
Connect via SSH:
Press Ctrl+C to exit.
Examples
The repository includes example applications:
- Example - All the following examples at once :)
- Graph - A really cool grapher in the terminal (holy moly)
- Counter - A simple incrementing counter with keyboard controls
- Wordle - A word guessing game
- Login - A 'Hello World' behind the username 'hello' and password 'world'
Run an example: (you can specify the port with --port {number})
Then connect via SSH:
Limitations
- Cursor position cannot be queried from SSH clients, so
get_cursor()always returns (0, 0) - Password authentication is disabled by default (implement
auth_password()if needed) - Pixel dimensions are not available over SSH
License
© Kodeur_Kubik - Code available under the MIT License