HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
biomejs
gritql
Rust2024–2025
biomejs / gritql

gritql

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

5Distinct people
13Mentions
0Explicit recommenders
4.6KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

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

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by month13 dated mentions

Observed mentions: 2024-03-20 19:23:11 UTC to 2025-08-19 22:43:26 UTC.

0122024-03-01 00:00:00 UTC to 2024-04-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 commentsMar 20242024-04-01 00:00:00 UTC to 2024-05-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2024-05-01 00:00:00 UTC to 2024-06-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2024-06-01 00:00:00 UTC to 2024-07-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024-07-01 00:00:00 UTC to 2024-08-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-08-01 00:00:00 UTC to 2024-09-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-09-01 00:00:00 UTC to 2024-10-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024-10-01 00:00:00 UTC to 2024-11-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-11-01 00:00:00 UTC to 2024-12-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsNov 20242024-12-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-01 00:00:00 UTC to 2025-02-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025-02-01 00:00:00 UTC to 2025-03-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-03-01 00:00:00 UTC to 2025-04-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-04-01 00:00:00 UTC to 2025-05-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025-05-01 00:00:00 UTC to 2025-06-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2025-06-01 00:00:00 UTC to 2025-07-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025-07-01 00:00:00 UTC to 2025-08-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-08-01 00:00:00 UTC to 2025-09-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsAug 2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Mar 20242024-03-01 00:00:00 UTC2024-04-01 00:00:00 UTC211
Apr 20242024-04-01 00:00:00 UTC2024-05-01 00:00:00 UTC202
May 20242024-05-01 00:00:00 UTC2024-06-01 00:00:00 UTC202
Jun 20242024-06-01 00:00:00 UTC2024-07-01 00:00:00 UTC101
Jul 20242024-07-01 00:00:00 UTC2024-08-01 00:00:00 UTC000
Aug 20242024-08-01 00:00:00 UTC2024-09-01 00:00:00 UTC000
Sep 20242024-09-01 00:00:00 UTC2024-10-01 00:00:00 UTC101
Oct 20242024-10-01 00:00:00 UTC2024-11-01 00:00:00 UTC000
Nov 20242024-11-01 00:00:00 UTC2024-12-01 00:00:00 UTC000
Dec 20242024-12-01 00:00:00 UTC2025-01-01 00:00:00 UTC000
Jan 20252025-01-01 00:00:00 UTC2025-02-01 00:00:00 UTC101
Feb 20252025-02-01 00:00:00 UTC2025-03-01 00:00:00 UTC000
Mar 20252025-03-01 00:00:00 UTC2025-04-01 00:00:00 UTC000
Apr 20252025-04-01 00:00:00 UTC2025-05-01 00:00:00 UTC101
May 20252025-05-01 00:00:00 UTC2025-06-01 00:00:00 UTC110
Jun 20252025-06-01 00:00:00 UTC2025-07-01 00:00:00 UTC101
Jul 20252025-07-01 00:00:00 UTC2025-08-01 00:00:00 UTC000
Aug 20252025-08-01 00:00:00 UTC2025-09-01 00:00:00 UTC101

What Hacker News says

13 sources
Yikes, this is a pretty bad vulnerability. It's good that they fixed it, but damning that it was ever a problem in the first place. Rule #1 of building any cloud platform analyzing user code is that you must run analyzers in isolated environments. Even beyond analysis tools frequently allowing direct code injection through plugins, linters/analyzers/compiler are complex software artifacts with large surface areas for bugs. You should ~never assume it's safe to run a tool against arbitrary repos in a shared environment. I also ran a code analysis platform, where we ran our own analyzer[1] against customer repos. Even though we developed the analyzer ourself, and didn't include any access to environment variables or network requests, I still architected it so executions ran in a sandbox. It's the only safe way to analyze code. [1] https://g
Read the rest
In How we exploited CodeRabbit: From simple PR to RCE and write access on 1M repos
"Better" is always "for what metric" but if nothing else having the source code to the stack is always "better" IMHO even if one doesn't choose to self-host, and that goes double for SigNoz choosing a permissive license, so one doesn't have to get lawyers involved to run it --- While digging into Honeycomb's open source story, I did find these two awesome toys, one relevant to the otel discussion and one just neato https://github.com/honeycombio/refinery (Apache 2) -- Refinery is a tail-based sampling proxy and operates at the level of an entire trace. Refinery examines whole traces and intelligently applies sampling decisions to each trace. These decisions determine whether to keep or drop the trace data in the sampled data forwarded to Honeycomb. https://github.com/honeycombio/gritql (MIT) -- GritQL is a declarative query language for s
Read the rest
earching and modifying source code
In GitHub CI/CD observability with OpenTelemetry step by step guide
Awesome. Had a feeling this was going to be a smalltalk thing. Seems to involve/extend moose[1] among other things. Judging from the comments and such interesting projects languishing in obscurity.. smalltalk / pharo[2] still has a PR problem even though I think a lot of people are kind of fascinated by the ideas of image-based persistence[3]. The typical easy comparisons to VMs, IDEs, and notebooks all seem to fail to capture an important part of the essence. Hence the need for new vocabulary like "moldable development" and "contextual micro tools" which is all part of the appeal and part of the problem. It really is a different kind of thing. I (still) hope it all catches on a bit more but my sense is that it probably needs to present itself as a bit less academic. Compare the moose touting of "meta-meta-modeling" with something l
Read the rest
ike gritql[4], which focuses more on use-cases, and seems to be gaining in popularity rather than remaining obscure. Seems like maybe it's time for a change in tactics to bring in a wider audience. [1] https://en.wikipedia.org/wiki/Moose_(analysis) [2] https://en.wikipedia.org/wiki/Pharo [3] https://en.wikipedia.org/wiki/Smalltalk#Image-based_persiste... [4] https://github.com/getgrit/gritql
In Glamorous Toolkit
The Slack engineering blog[0] is more pragmatic, and shows more about how the approaches were actually combined. This is basically our whole business at grit.io and we also take a hybrid approach. We've learned a fair amount from building our own tooling and delivering thousands of customer migrations. 1. Pure AI is likely to be inconsistent in surprising ways, and it's hard to iterate quickly. Especially on a large codebase, you can't interactively re-apply the full transform a bunch. 2. A significant reason syntactic tools (like jscodeshift) fall down is just that most codemod scripts are pretty verbose and hard to iterate on. We ended up open sourcing our own codemod engine[1] which has its own warts, but the declarative model makes handling exceptions cases much faster. 3. No matter what you do, you need to have an interactive feedbac
Read the rest
k loop. We do two levels of iteration/feedback: (a) automatically run tests and verify/edit transformations based on their output, (b) present candidate files for approval / feedback and actually integrate feedback provided back into your transformation engine. [0] https://slack.engineering/balancing-old-tricks-with-new-feat... [1] https://github.com/getgrit/gritql
In AI-powered conversion from Enzyme to React Testing Library
Yeah it doesn't look like this is AST-aware at all. If you want to do queries that understand the grammar, https://github.com/getgrit/gritql is closer to what you're looking for. (Disclaimer: I'm the author.) Ex. here's how you would search for your example of looking for a string unless it's inside a string constant. [0] grit apply '"this_string" => `new_string` where $match <: not within string()' [0] https://app.grit.io/studio?key=v8iA8zIbHs2uCykNpSF_G
In Amber: A code search and replace tool
I've issued a few bounties on my repo [0], and it's worked fairly well from my perspective. I'm both the bounty assigner and the maintainer in this case. Keep in mind that open source is always a bit messy, and a lot of people on all projects (even without bounties) never actually follow through with contributions that they plan to do for a whole host of reasons. The way I've approached it is once someone either has a track record of contributing or makes substantial (visible) process on a PR I assign the bounty to them. [0] https://github.com/getgrit/gritql/issues?q=is%3Aopen+is%3Ais...
In Ask HN: I have been unable to land a job in two years, does anybody
morgante·Mar 20, 2024Submission

Show HN: GritQL, a Rust CLI for rewriting source code

Hi everyone! I’m excited to open source GritQL, a Rust CLI for searching and transforming source code. GritQL comes from my experiences with conducting large scale refactors and migrations. Usually, I would start exploring a codebase with grep. This is easy to start with, but most migrations end up accumulating additional requirements like ensuring the right packages are imported and excluding cases which don’t have a viable migration path. Eventually, to build a complex migration, I usually ended up having to write a full codemod program with a tool like jscodeshift. This comes with its own problems: - Most of the exploratory work has to be abandoned as you figure out how to represent your original regex search as an AST. - Reading/writing a codemod requires mentally translating from AST names back to what source code actually looks like
Read the rest
. - Performance is often an afterthought, so iterating on a large codemod can be painfully slow. - Codemod frameworks are language-specific, so if you’re hopping between multiple languages—or trying to migrate a shared API—you have to learn different tools. GritQL is an attempt to develop a powerful middle ground: - Exploratory analysis is easy: just put a code snippet in backticks and use $metavariables for placeholders. - Incrementally add complexity by introducing side conditions with where clauses. - Reuse named patterns to avoid rebuilding queries, and use shared patterns from our standard library for common tasks like ensuring modules are imported. - Iterate on large codebases quickly: we use Rust for maximum performance GritQL has already been used on thousands of repositories for complex migrations[1] but we're excited to collaborate more with the open source community. [1] Ex. https://github.com/openai/openai-python/discussions/742
280 points · Open discussion

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.