# biomejs/gritql

GritQL is a query language for searching, linting, and modifying code.

Repository: https://github.com/biomejs/gritql
Canonical: https://ross.abutalabs.com/products/gritql
Homepage: https://docs.grit.io/
Language: Rust
License: MIT
License Family: permissive
Topics: ast, codemod, javascript, linter, refactoring, rust, search, tree-sitter
Last push: 2026-08-16T03:41:31+00:00

## Health v2 (maintenance only)
Score: 80/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 98, release rhythm 65, longevity 64
- inputs: {"age_days": 908, "days_push": 17, "days_rel": 156, "gap_med": 1.0, "n_releases_24m": 73}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4582, forks 125 (observed 2026-08-28T04:08:54.584111+00:00)

## What it is
GritQL is a declarative query language and Rust-based CLI for searching, linting, and rewriting source code using pattern matching over ASTs. It supports many target languages (JavaScript/TypeScript, Python, Java, Terraform, Rust, Go, SQL, and more) and includes auto-fix, custom lint enforcement, and a shareable pattern library.

## Use cases
- find all console.log calls in a codebase
- rewrite console.log to winston.log across a repo
- migrate React class components to hooks
- convert Cypress tests to Playwright
- enforce team-specific lint rules in CI
- automate large-scale API migrations
- remove imports from a specific package

## When to choose
- you need to search or refactor code across millions of lines
- you want codemods without learning each language's AST APIs
- you need custom lint rules with auto-fix in CI
- you want reusable, shareable code search patterns

## When to avoid
- you only need simple regex find-and-replace
- your target language is not among the supported tree-sitter grammars
- you need a GUI-based refactoring tool

## Facets
- artifact type: cli-tool
- maturity: active
- function: search-engine, parser, linter, developer-tools
- domain: developer-tools, parsers
- platform: windows, cli, rust
- tags: gritql, codemod, tree-sitter, code-search, code-transformation, ast-query, refactoring, custom-linting, command-line, automation, linux, macos

## Member repositories
- biomejs/gritql (main) score 80

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:54.584111+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:19:53.392227+00:00, confidence not recorded.
  - readme: https://github.com/biomejs/gritql (fetched 2026-08-28T04:08:54.584111+00:00, sha 4572fc907b4c)
  - homepage: https://docs.grit.io/ (fetched 2026-08-29T09:05:09.338128+00:00, sha e195da36900a)
  - site_page: https://docs.grit.io/language/overview (fetched 2026-08-29T09:05:09.340711+00:00, sha 82740f574b66)
  - site_page: https://docs.grit.io/cli/quickstart (fetched 2026-08-29T09:05:09.342521+00:00, sha 7c768e87c3ea)
- Data as of 2026-08-30T08:39:29.467469+00:00.
