chai-framework

Crates.iochai-framework
lib.rschai-framework
version1.0.1
created_at2026-01-03 02:09:05.708341+00
updated_at2026-01-03 02:09:05.708341+00
descriptionA framework for creating TUI SSH programs in Rust
homepage
repository
max_upload_size
id2019469
size101,979
Kieran Llarena (kllarena07)

documentation

README

Chai ☕️🌿

A framework for creating TUI SSH programs in Rust, powered by ratatui and russh.

Why Chai

The Chai framework makes it easy to host your ratatui TUI apps on an SSH server.

First, encapsulate your TUI program within a stateful struct. Then, implement the ChaiApp trait for this struct to satisfy the required interface abstractions. After that, it's simple plug-and-play by providing your new struct to the ChaiServer.

mod app;
use app::MyApp; // your TUI program
use chai_framework::{ChaiApp, ChaiServer, load_host_keys};

#[tokio::main]
async fn main() {
    let host_key = load_system_host_keys("id_ed25519");
    let config = Config {
        // server config here
        keys: vec![host_key],
    };

    let mut server = ChaiServer::<MyApp>::new(2222);
    server.run(config).await.expect("Failed running server");
}

For examples, see here.

Made with ❤️ by krayondev

Commit count: 0

cargo fmt