| Crates.io | spec-ai-tui |
| lib.rs | spec-ai-tui |
| version | 0.6.0-prerelease.12 |
| created_at | 2025-12-01 18:07:41.177772+00 |
| updated_at | 2026-01-04 05:04:09.956551+00 |
| description | Terminal User Interface for spec-ai built from scratch on crossterm |
| homepage | |
| repository | https://github.com/geoffsee/spec-ai |
| max_upload_size | |
| id | 1960238 |
| size | 372,651 |
Terminal User Interface framework for spec-ai built from scratch on crossterm.
This crate provides a complete TUI framework with:
Rect, Point, Size for layout calculationsspec-ai-tui
├── app # Application framework and runner
├── buffer # Cell-based screen buffer with diff rendering
├── event # Input events and async event loop
├── geometry # Point, Rect, Size primitives
├── layout # Constraint-based layout engine
├── style # Colors, modifiers, and text styling
├── terminal # Terminal backend abstraction
└── widget # Widget traits and built-in widgets
use spec_ai_tui::{
App, AppRunner, Buffer, Event, Rect,
Constraint, Direction, Layout,
Color, Style, Widget,
};
struct MyApp;
impl App for MyApp {
type State = MyState;
fn init(&self) -> Self::State {
MyState::default()
}
fn handle_event(&mut self, event: Event, state: &mut Self::State) -> bool {
// Return true to quit
false
}
fn render(&self, state: &Self::State, area: Rect, buf: &mut Buffer) {
// Render your UI
}
}
crossterm - Cross-platform terminal manipulationtokio - Async runtime for event loopunicode-width - Proper Unicode character width handlingThis is an internal crate primarily used by:
spec-ai-tui-app - The interactive terminal applicationFor end-user documentation, see the main spec-ai README.