jina-grep
A command-line semantic grep for Apple Silicon that reranks or searches files by meaning using Jina embedding models running locally through MLX, with no PyTorch or cloud dependency.
jina-grep runs one of six Jina embedding models locally on the GPU through MLX, using either a unified checkpoint with dynamic LoRA adapter switching, letting one base model in memory serve multiple task types by swapping its adapter in about 20 milliseconds, or a single checkpoint with instruction prefixes for code-focused models. It supports four modes: piping the output of a regular grep command in for semantic reranking, searching files directly with a natural-language query, zero-shot classification, and code-aware search.
It can run serverless, loading the model in-process for a single query and exiting, which suits scripts or CI since macOS keeps the weights in its page cache afterward, or as a persistent background server that keeps the model resident in GPU memory so each subsequent query takes about 10 milliseconds; the serverless mode automatically detects and uses an already-running persistent server over HTTP. It requires Python 3.10 or newer and an Apple Silicon Mac.