InTerm: Interactive Terminal Library for Rust
InTerm is a Rust library designed to facilitate the creation of interactive terminal applications. It provides a simple and flexible way to create and manage interactive elements within the terminal, allowing for interactive and dynamic user interfaces.
⚠️ Disclaimer: This project is still very much a work in progress, and contributions from the community are highly encouraged and appreciated! If you're interested in contributing, please read our contribution guidelines :)
Table of Contents
Features
- Block Structure: Represents a block of interactive elements or indexed lines in the terminal, consisting of a vector of
InteractiveElementinstances. - InteractiveLine: Represents a line that can be updated in the terminal. It is used within the
Blockstructure to manage individual lines. - Cursor Management: Provides functions to control the cursor position and visibility within the terminal.
- Line Clearing: Allows for clearing a specific line or all interactive element lines in the terminal.
Usage
To use InTerm in your Rust project, follow these steps:
-
Add the
intermdependency to yourCargo.toml:[] = "0.1.0" -
Import the necessary modules into your Rust code:
use ; -
Create a
Blockand interact with interactive elements:let mut elements: = Vecwith_capacity; for idx in 0..10 let block = new.unwrap; // Update an element let elem = &block.interactive_lines; block.update_element.unwrap; // Go to an element block.goto_idx.unwrap; // Clear a line block.clear_line.unwrap; // Clear all lines block.clear_lines.unwrap;
Examples
Check the examples directory for more usage examples.

Contributing
We welcome contributions from the community! If you find a bug or have an idea for an improvement, please read the contribution guidelines and open an issue or create a pull request.
License
This project is licensed under the MIT License.