talira

Fast trigram-based code search engine

open sourceApache-2.0self-hostablefree

Zoekt is a text search engine for source code that answers substring and regular expression searches fast across one repository or thousands, using a trigram index. Its query language has boolean operators and filters such as file:, and it ranks results with code signals like whether a match is on a symbol (from Universal Ctags). You can use its commands to index local Git repositories or directories and search them, or run its index server, which mirrors and reindexes repositories from GitHub, GitLab, Gitea, Gerrit, Gitiles or Bitbucket Server on a schedule, with its web server, which serves a search UI, a JSON search API and a gRPC API. It's written in Go and ships as one container image. Han-Wen Nienhuys created it, and Sourcegraph has maintained this fork of the original google/zoekt repository since 2017, with an index server for Sourcegraph among its commands. Apache-2.0.

Problems it solves

  • search all of my company's repositories fast with regex, on my own server
  • self-hosted code search across thousands of git repos
  • a code search backend with an API that I can build tools on

Features

  • substring and regex search over a trigram index
  • boolean query language
  • symbol-aware ranking with Universal Ctags
  • index server that mirrors repositories from code hosts
  • web UI
  • JSON and gRPC search APIs
  • container image

Capabilities

Has an APIplan not known
Has a command line toolplan not known

Alternatives

The same job

These do what Zoekt does.

  1. Hound Lightning fast code searching made easy
  2. Sourcegraph Code understanding for humans and agents
  3. OpenGrok A fast and usable source code search and cross reference engine
  4. livegrep Fast interactive regex search over large source code repositories

Compare Zoekt with the top 3