# google/codesearch

Fast, indexed regexp search over large file trees

Repository: https://github.com/google/codesearch
Canonical: https://ross.abutalabs.com/products/codesearch
Homepage: http://swtch.com/~rsc/regexp/regexp4.html
Language: Go
License: BSD-3-Clause
License Family: permissive
Last push: 2025-05-29T12:00:43+00:00

## Health v2 (maintenance only)
Score: 43/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 24, release rhythm 35, longevity 100
- inputs: {"age_days": 4174, "days_push": 461, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3999, forks 402 (observed 2026-08-28T04:08:31.981999+00:00)

## What it is
A set of command-line programs written in Go for indexing and performing regular expression searches over large bodies of source code. It uses a trigram index to enable fast regexp search over large file trees, based on the approach behind Google Code Search.

## Use cases
- search a large codebase with regular expressions quickly
- index a big source tree for fast grep-like queries
- find all usages of a function across a monorepo
- run regexp searches that grep is too slow for
- search code from the command line with an indexed tool

## When to choose
- you need fast regexp search over very large file trees
- you want a lightweight CLI alternative to grep with indexing
- you need linear-time regexp matching without backtracking pitfalls

## When to avoid
- you need semantic or IDE-style code navigation
- you want a hosted or web-based code search service
- your corpus is small enough that plain grep suffices

## Facets
- artifact type: cli-tool
- maturity: maintenance
- function: search-engine, parser, developer-tools, cli
- domain: developer-tools
- platform: windows, cross-platform, cli, go
- tags: regex-search, trigram-index, code-indexing, grep-alternative, command-line, search, algorithms, linux, macos

## Member repositories
- google/codesearch (main) score 43

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:31.981999+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:24:08.945831+00:00, confidence not recorded.
  - readme: https://github.com/google/codesearch (fetched 2026-08-28T04:08:31.981999+00:00, sha 21d266b55281)
  - homepage: http://swtch.com/~rsc/regexp/regexp4.html (fetched 2026-08-29T09:17:14.659564+00:00, sha fd837d3b9479)
  - site_page: https://swtch.com/~rsc/regexp/regexp2.html (fetched 2026-08-29T09:17:14.669252+00:00, sha 1c74f5d11491)
- Data as of 2026-08-30T08:39:29.467469+00:00.
