Fast trigram based code search Read-only archive of past code reviews. Source of truth for this repo has moved to

Clone this repo:


  1. 62cfd87 Delete gerrit/zoekt. by Chris Poucet · 5 months ago master
  2. f8e8ada Add notice in README pointing to sourcegraph/zoekt by Keegan Carruthers-Smith · 2 years, 7 months ago main
  3. f7d54fa toc: modify disk format to include names for backwards/forwards compatiblity. by Ryan Hitchman · 2 years, 10 months ago
  4. fcc0c9a doc: note on distro support for ctags with seccomp by Keegan Carruthers-Smith · 2 years, 10 months ago
  5. 88436ac shards: log a summary of shards in toLoad by Keegan Carruthers-Smith · 2 years, 10 months ago

This is a fast text search engine, intended for use with source code. (Pronunciation: roughly as you would pronounce “zooked” in English)

NOTICE: is the active main repository for Zoekt development.



go get


go install
$GOPATH/bin/zoekt-index .


go install
$GOPATH/bin/zoekt 'ngram f:READ'

Indexing git repositories:

go install
$GOPATH/bin/zoekt-git-index -branches master,stable-1.4 -prefix origin/ .

Indexing repo repositories:

go install{repo-index,mirror-gitiles}
zoekt-mirror-gitiles -dest ~/repos/
zoekt-repo-index \
   -name gfiber \
   -base_url \
   -manifest_repo ~/repos/ \
   -repo_cache ~/repos \
   -manifest_rev_prefix=refs/heads/ --rev_prefix= \

Starting the web interface

go install
$GOPATH/bin/zoekt-webserver -listen :6070

A more organized installation on a Linux server should use a systemd unit file, eg.

Description=zoekt webserver

ExecStart=/zoekt/bin/zoekt-webserver -index /zoekt/index -listen :443  --ssl_cert /zoekt/etc/cert.pem   --ssl_key /zoekt/etc/key.pem



Zoekt comes with a small service management program:

go install

cat << EOF > config.json
[{"GithubUser": "username"},
 {"GithubOrg": "org"},
 {"GitilesURL": "", "Name": "zoekt" }

$GOPATH/bin/zoekt-server -mirror_config config.json

This will mirror all repos under ‘’, ‘’, as well as the ‘zoekt’ repository. It will index the repositories.

It takes care of fetching and indexing new data and cleaning up logfiles.

The webserver can be started from a standard service management framework, such as systemd.


It is recommended to install Universal ctags to improve ranking. See here for more information.


Thanks to Alexander Neubeck for coming up with this idea, and helping me flesh it out.


This is not an official Google product