Zoekt indexes repositories for substring and regexp code search with boolean queries. Use CLI tools locally or pair indexserver with webserver for remote repos and APIs.
Overview
Zoekt is a text search engine aimed at source code. It combines trigram indexing with syntactic signals to support fast substring and regular expression queries, boolean operators, and ranking that favors symbol matches and other code-aware heuristics.
Operators can index individual git repositories or directories from the command line, sync local repo sets, or run an indexserver that mirrors organizations from hosts such as GitHub and periodically reindexes. Search happens through a zoekt CLI, a web UI, a JSON RPC API, or gRPC with structured queries and streaming results.
The project publishes a container image bundling binaries, git, and universal-ctags for symbol metadata that improves relevance. Universal ctags installation is recommended for best ranking. Zoekt forked from an earlier Google codebase and continues maintenance under Sourcegraph.
Deployment patterns include mounting an index volume for zoekt-webserver on a port, or running zoekt-indexserver with mirror configuration for automated fetching and cleanup.
Key features
- Substring and regexp search with boolean queries
- Git and plain directory indexing commands
- Indexserver mirroring from code hosts
- Web UI plus JSON and gRPC search APIs
- BM25 and context-line search options
- Docker image with git and universal-ctags
Use cases
- Searching large monorepos or many clones
- Self-hosted code search behind a VPN
- Local offline indexing of git checkouts
- Feeding IDE or agent tools via search APIs