Cockpit
A terminal multiplexer library for Ratatui applications.
Cockpit enables running multiple OS processes in split panes with crash isolation. Each pane runs in its own PTY (pseudo-terminal), so if one process crashes, the others continue running unaffected.
Features
- PTY Management: Spawn processes in pseudo-terminals using
portable-pty - Terminal Emulation: Full VT100/ANSI terminal emulation via
vt100 - Split Layouts: Horizontal and vertical pane splits
- Crash Isolation: Each process runs independently
- Ratatui Integration: Widgets for rendering panes
- Mouse Support: Click to focus panes
Installation
Add to your Cargo.toml:
[]
= "0.1"
Quick Start
use ;
async
Example
Run the interactive example:
Controls:
- Ctrl+Q: Quit
- Ctrl+N: Focus next pane
- Mouse click: Focus pane under cursor
License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.