#directory #file-content #image #content #pattern #filtering #regex #searcher #lumin

bin+lib lumin

A library for searching and displaying local files

8 releases

Uses new Rust 2024

new 0.1.7 May 13, 2025
0.1.6 May 13, 2025
0.1.3 Apr 23, 2025

#294 in Text processing

Download history 335/week @ 2025-04-21 148/week @ 2025-04-28 104/week @ 2025-05-05

587 downloads per month

MIT license

755KB
792 lines

Contains (ELF exe/lib, 1.5MB) binary_executable, (ELF exe/lib, 1KB) tests/fixtures/binary_files/binary.bin

lumin: A File Searcher

A Rust utility for searching, traversing, and viewing files with rich filtering options and type-aware content handling.

Features

  • Search: Find text patterns in files using regex
  • Traverse: List files in directories with advanced filtering
  • View: Display file contents with type detection (text, binary, image)

Installation

cargo install --path .

Usage

Search for text patterns

lumin search <PATTERN> <DIRECTORY> [OPTIONS]

Options:

  • --case-sensitive: Enable case-sensitive matching
  • --ignore-gitignore: Ignore .gitignore rules

Traverse directories

lumin traverse <DIRECTORY> [OPTIONS]

Options:

  • --case-sensitive: Enable case-sensitive filtering
  • --ignore-gitignore: Ignore .gitignore rules
  • --all-files: Include binary files (default: text files only)

View file contents

lumin view <FILE_PATH> [OPTIONS]

The view command outputs a structured JSON with:

  • File path
  • File type
  • Contents (text, binary, or image with appropriate metadata)

Key Features

  • Gitignore-aware operations
  • Type detection using extension and content analysis
  • Strongly typed output structures
  • Comprehensive error handling

Development

# Build
cargo build

# Test
cargo test

# Format code
cargo fmt

# Run linter
cargo clippy

License

MIT

Contributing

See CONTRIBUTING.md for guidelines.

Dependencies

~9–18MB
~307K SLoC