tmenu

Crates.iotmenu
lib.rstmenu
version0.1.0
created_at2025-05-10 06:00:42.105092+00
updated_at2025-05-10 06:00:42.105092+00
descriptionA simple TUI fuzzy finder
homepage
repositoryhttps://github.com/m1dsolo/tmenu
max_upload_size
id1668116
size29,182
Yang (m1dsolo)

documentation

README

A Simple Rust TUI Fuzzy Finder

A simple command-line fuzzy finder application written in Rust using the ratatui library, inspired by dmenu. It reads newline-separated options from standard input, allows filtering and selection using a terminal user interface (TUI), and prints the selected option to standard output.

Installation

You can install tmenu either via cargo install from crates.io or by building from source.

Via cargo install (Recommended)

cargo install tmenu

Building from source

git clone https://github.com/m1dsolo/tmenu.git
cd tmenu
cargo build --release

The executable will be located at ./target/release/tmenu. You can manually copy it to a directory in your system's PATH or run it directly using cargo run --release.

Usage

Pipe a list of newline-separated strings to the standard input of the program. The TUI will appear on your terminal's standard error stream, allowing you to interactively select an item. The selected item will be printed to standard output when you press Enter.

Key bindings:

  • Ctrl+j to move down the list
  • Ctrl+k to move up the list
  • Enter to select an item
  • Esc to exit without selection

Examples

# Example 1: List files in current directory
ls -1 | tmenu

# Example 2: Find files in the current directory (max depth 1)
find . -maxdepth 1 | tmenu

# Example 3: Filter a list from a file
cat your_list.txt | tmenu

TODO

  • vim keybindings for input
  • faster filtering
  • more examples

License

MIT © m1dsolo

Commit count: 1

cargo fmt