CLIM is a project developed by Maloll. Its core objective is to experiment with and build various CLI navigation systems and interactive menus across different programming languages as I learn them.
While this project starts as a personal laboratory, the long-term goal is to package these systems into professional, reusable libraries for everyone β€οΈ.
I am currently focusing on the Rust implementation.
- β Raw Mode & Alternate Screen: Full control over the terminal buffer without polluting command history.
- β
Keyboard Capture: Real-time detection of
Up,Down,Enter, andEsckeys. - β Dynamic Selection: Interactive visual feedback when navigating through list items.
- β Clean UI: Automatic cursor hiding and screen cleanup on exit.
- β Scrolling Support: Implementation of "Viewports" to handle lists longer than the terminal height.
- β Search & Filtering: Real-time string matching to find items instantly in large datasets.
- β Diverse Menu Layouts: Beyond simple lists implementing grids, tree views, detailed view with horizontal navigation.
- β Layout system: A new way of creating menus, by adding items next to each other.
- π Deep Customization: Full control over the UI allowing users to tweak colors, borders, symbols, and highlighting styles to suit any terminal theme.
- β Library Packaging: Refactoring the code into a standalone Rust Crate.
- β Multiple Languages: Developing equivalent versions in Python and Bash.
The current implementation allows you to turn a simple Vec<String> into a fully interactive menu that returns the selected index.
let items = vec!["Apple".to_string(), "Banana".to_string(), "Cherry".to_string()];
let mut menu = List::create(items);
// This will launch the interactive TUI and return the chosen index
let choice = menu.launch();
println!("User selected index: {}", choice);