# git-semantic

git-semantic is a Rust command-line tool that searches a repository's commit history by meaning instead of exact keywords, so a query like "race condition" can find a commit described as a synchronization bug even without matching words.

Traditional git search tools require guessing the exact words an author used; git-semantic instead builds a local index using ONNX embeddings and an HNSW graph, combined with exact-token matching for identifiers such as a CVE number, a file path or a commit hash, so a search can match on meaning and precise tokens at once. A diversity option keeps near-identical dependency-bump commits from filling the results, and a JSON output mode supports piping into other tools or scripts.

Everything runs locally with no API keys or cloud calls: the first search in a repository downloads a roughly 130 megabyte embedding model once and builds the index, after which searches return in about one hundred milliseconds and stay flat as history grows.

It installs through Cargo, registers itself as a git subcommand, and ships shell completions for bash, zsh, fish, elvish and PowerShell.

Website: https://github.com/yanxue06/git-semantic-search
