Show HN: GritQL, a Rust CLI for rewriting source code 31 by morgante | 7 comments on Hacker News. 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. - Performance is often an afterthought, so iter...