snapfind

Crates.iosnapfind
lib.rssnapfind
version1.0.0
created_at2025-03-27 17:30:39.548423+00
updated_at2025-03-27 17:30:39.548423+00
descriptionFast, memory-efficient file search utility with predictable resource usage
homepagehttps://github.com/xosnrdev/snapfind#readme
repositoryhttps://github.com/xosnrdev/snapfind
max_upload_size
id1608248
size75,890
Success Kingsley (xosnrdev)

documentation

README

SnapFind

Fast, memory-efficient file search utility with predictable resource usage.

Features

  • Content-aware search with relevance scoring
  • Fixed memory bounds (no dynamic allocations after initialization)
  • Text type detection (plain text, markdown, source code, config files)
  • Glob pattern matching
  • Fast indexing with bounded resource usage

Install

cargo install snapfind

Usage

Index a directory:

snap index [DIR]

Search for files:

snap search "your query" [DIR]

Limitations

  • Maximum number of files: 1,000
  • Maximum directory depth: 1,000
  • Maximum file size: 10MB
  • Maximum indexed content: 1,000 bytes per file
  • Maximum query length: 50 bytes
  • Only handles text files (binary files are excluded)

Examples

Search by content:

# Find code
snap search "fn main" ~/code

# Find documentation
snap search "# Introduction" ~/docs

# Use glob patterns
snap search "*.txt" ~/documents

License

MIT License

Commit count: 37

cargo fmt