A fully-local semantic search CLI. Ingest documents, embed them locally, and run vector search — no external services required.
litesearch ingest runs a document through a four-stage pipeline:
- Parse: extracts plain text from the file using LiteParse
- Chunk: splits the text into overlapping segments using Chonkie (default: 512 characters)
- Embed: generates 768-dimensional embeddings locally using
nomic-ai/nomic-embed-text-v1.5via@huggingface/transformers - Store: upserts vectors and payloads into a local Qdrant Edge shard persisted at
.litesearch.qdrant/
litesearch retrieve embeds the query with the same model and performs a cosine similarity search against the local shard.
The vector store is backed by qdrant-edge-utils, a Rust native addon (napi-rs) that wraps qdrant-edge for on-disk mmap-backed storage.
- Bun
- Rust toolchain (only needed if rebuilding
qdrant-edge-utilsfrom source)
bun installbun run ingest <file> [options]| Option | Description |
|---|---|
-c, --config <path> |
Path to a LiteParse config file |
-s, --chunk-size <number> |
Chunk size in characters (default: 512) |
bun run retrieve <query> [options]| Option | Description |
|---|---|
-f, --files <paths...> |
Restrict search to specific ingested document paths |
-l, --limit <number> |
Maximum number of results (default: 10) |
-t, --score-threshold <number> |
Minimum cosine similarity score |
bun run ingest ./data/report.pdf
bun run retrieve "quarterly revenue breakdown" --limit 5Output:
[0.8723] ./data/report.pdf
Revenue for Q3 reached $4.2M, up 18% from the prior quarter...
[0.8341] ./data/report.pdf
The board approved a revised forecast of $17M for the full fiscal year...
You can also use the terminal interface to access the ingestion and retrieval functionalities interactively:
bun run tuiYou can then follow the prompts from terminal, as in this image:
src/
index.ts # CLI entry point (commander)
pipelines.ts # ingest and retrieve orchestration
parsing.ts # document parsing via LiteParse
chunk.ts # text chunking via Chonkie
embed.ts # local embedding via transformers.js
store.ts # vector upsert and search
tui.ts # utilities to run the terminal interface
packages/
qdrant-edge-utils/
src/lib.rs # Rust native addon wrapping qdrant-edge
The local shard is stored in .litesearch.qdrant/ in the working directory. This directory is created automatically on first ingest. To reset the store, delete this directory.
bun run lint
bun run format