Skip to content

yoruboku/text-finder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Text Finder

A fast, minimal CLI text/code finder with a professional TUI (Terminal User Interface). Search for text or patterns across all files in a directory tree.

Features

  • 🔍 Full recursive search - Searches through all files and subdirectories
  • 📁 All file types - Not limited to specific extensions
  • Fast - Built with Rust for optimal performance
  • 🎨 Professional TUI - Clean terminal interface with real-time results
  • 🔣 Regex support - Use regular expressions for advanced pattern matching
  • 📊 Context preview - See matched lines with surrounding context
  • ⌨️ Vim-like navigation - Quick keyboard shortcuts for power users

Installation

# Build from source
cargo build --release

# The binary will be at:
# ./target/release/text-finder

Usage

TUI Mode (Interactive)

# Basic search
./text-finder "search pattern"

# Search in specific directory
./text-finder "pattern" /path/to/search

# Case-insensitive search
./text-finder -i "pattern"

# Use regex
./text-finder -r "^\s*fn\s+\w+"

# Limit search depth
./text-finder --max-depth 3 "pattern"

CLI Mode (Pipe output)

# Output results to stdout (when not in TTY)
./text-finder "pattern" | grep -v "^$"

Keyboard Shortcuts

Key Action
j / Next result
k / Previous result
g Go to first result
G Go to last result
Tab Switch between results/preview panes
/ Start new search
q / Esc Quit

Command Line Options

Usage: text-finder [OPTIONS] <PATTERN> [PATH]

Arguments:
  <PATTERN>  Search pattern
  [PATH]     Path to search in (defaults to current directory) [default: .]

Options:
  -r, --regex              Use regex pattern
  -i, --ignore-case        Case insensitive search
  -m, --max-depth <DEPTH>  Maximum search depth
  -h, --help               Print help

Example

# Search for "TODO" comments in current directory
./text-finder "TODO"

# Search for function definitions using regex
./text-finder -r "fn\s+\w+\s*\("

# Case-insensitive search in specific folder
./text-finder -i "error" ./src

Tech Stack

  • Rust - For performance and reliability
  • Ratatui - TUI framework
  • Crossterm - Terminal manipulation
  • Clap - CLI argument parsing
  • Walkdir - Recursive directory traversal
  • Regex - Pattern matching

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors