TreeSearch
A structure-aware document and code retrieval library that searches by keyword over a document's tree structure using SQLite full-text search, without embeddings or chunking.
TreeSearch retrieves matches from large codebases and structured documents using SQLite FTS5 keyword search over a preserved document tree, rather than splitting text into chunks and comparing vector embeddings. It supports Markdown, plain text, code files parsed with a Python abstract syntax tree or regex for languages such as Java, Go, JavaScript, and C++, HTML, XML, JSON, CSV, PDF, and DOCX, aiming for millisecond-latency search over tens of thousands of documents.
It is available as a Python library and CLI, installed with pip, and as a standalone Rust CLI binary called ts, installable through Homebrew, Cargo, or a prebuilt download for macOS, Linux, and Windows. Both CLIs support prefix and contains-style wildcard queries as well as raw regex or FTS5 expression queries.
It is written in Python and Rust, and released under the Apache-2.0 license.