Expand description
kou — Virtual terminal automation.
PTY management + a real VT100/ANSI screen emulator (via vte) + screen
rendering that can rasterise to PNG with proper fonts or describe the frame
to a capable terminal through a graphics protocol (kitty / iTerm2).
Extracted from tairitsu’s vtty engine as a standalone library.
§Quick Start
use kou::VttyManager;
let mgr = VttyManager::new();
let info = mgr.launch("bash", None, &[], 80, 24, None).await?;
mgr.send_text(&info.id, "echo hello\n").await?;
let screen = mgr.screenshot(&info.id).await?;
println!("{}", screen);Re-exports§
pub use font::FontCache;pub use font::FontFamily;pub use font::FontSet;pub use font::locate_system_fonts;pub use graphics::GraphicsProtocol;pub use graphics::InlineImage;pub use graphics::InlineImageStore;pub use graphics::KittyDecodeState;pub use graphics::Placement;pub use graphics::extract_kitty_apcs;pub use graphics::process_kitty_apc;pub use read::ReadStyle;pub use read::read;pub use read::read_default;pub use render::THEMES;pub use render::Theme;pub use render::render_graphics;pub use render::render_png;pub use render::render_png_supersampled;pub use render::theme_by_name;pub use screen::Screen;pub use vtty::SessionInfo;pub use vtty::VttyManager;pub use vtty::VttySession;pub use vtty::VttySessionId;pub use vtty::encode_input;pub use vtty::parse_keys;
Modules§
- font
- Font discovery & loading — build-time font fetching.
- graphics
- Terminal graphics protocols.
- mcp
- Standalone MCP (Model Context Protocol) server for kou.
- pty
- PTY (pseudo-terminal) management — cross-platform.
- read
- LLM-friendly screen reading.
- render
- Screen rendering.
- screen
- VT100/ANSI terminal screen emulator.
- vtty
- VTty session manager — lifecycle, I/O, screen state.