{"slug": "ast-grep", "name": "ast-grep", "category": "search", "category_name": "Search", "description": "", "recommenders": 2, "commenters": 5, "warners": 0, "score": 2.671, "rising": 0.67, "first": "2026-01-11", "latest": "2026-10-13", "why": "oxlint and some general ast-grep rules have pretty much been an absolute necessity for any of my LLM based code generation.", "why_is_quote": true, "has_verdict": false, "sentiment": {"recommend": 2, "neutral": 3, "compare": 0, "warn": 0}, "spark": [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1], "listed": false, "loved": [], "caveat": "", "short_quote": "oxlint and some general ast-grep rules have pretty much been an absolute necessity for any of my LLM based code generation.", "icon": false, "domain": null, "github_repo": null, "official_url": "", "pricing": "", "aliases": ["ast-grep"], "verdict": null, "praise": [{"label": "", "summary": "", "quotes": [{"id": 801268129, "item_id": 50079258, "url": "https://news.ycombinator.com/item?id=50079258", "by": "navs", "date": "2026-10-13", "stance": "recommend", "quote": "oxlint and some general ast-grep rules have pretty much been an absolute necessity for any of my LLM based code generation.", "excerpt": "oxlint and some general ast-grep rules have pretty much been an absolute necessity for any of my LLM based code generation. I started down this path after looking at what coderabbit suggested in https://github.com/coderabbitai/ast-grep-essentials", "context": "", "use_case": "linting LLM-generated code", "switched_from": "", "story": "Show HN: Deslop \u2013 Oxlint rules for AI-generated TypeScript"}, {"id": 759275968, "item_id": 47454748, "url": "https://news.ycombinator.com/item?id=47454748", "by": "raulparada", "date": "2026-03-20", "stance": "recommend", "quote": "we use https://ast-grep.github.io (on a pre-commit hook) for such cases, which bridges the linter gaps nicely", "excerpt": "Not out-of-the-box afaik, but we use https://ast-grep.github.io (on a pre-commit hook) for such cases, which bridges the linter gaps nicely.", "context": "", "use_case": "custom code linting rules", "switched_from": "", "story": "Be intentional about how AI changes your codebase"}]}], "caveats": [], "who": [{"by": "dkn", "context": "works in large, old codebases", "url": "https://news.ycombinator.com/item?id=49856487", "date": "2026-09-26"}, {"by": "vinhnx", "context": "author of VT Code", "url": "https://news.ycombinator.com/item?id=48332763", "date": "2026-05-29"}], "tags": [], "use_cases": ["linting llm-generated code", "code search for agents", "structured code parsing", "custom code linting rules", "code context extraction"], "compared": [{"slug": "tree-sitter", "name": "tree-sitter", "co": 3, "switched_from": 0, "switched_to": 0}], "makers": [], "threads": [{"url": "https://news.ycombinator.com/item?id=50075809", "title": "Show HN: Deslop \u2013 Oxlint rules for AI-generated TypeScript", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=49855018", "title": "One Month Without AI", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=48332098", "title": "Show HN: VT Code \u2013 open-source terminal coding agent in Rust", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=47446373", "title": "Be intentional about how AI changes your codebase", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=46577242", "title": "Ask HN: What Are You Working On? (January 2026)", "mentions": 1}], "sentiment_by_month": {"2025-11": {}, "2025-12": {}, "2026-01": {"neutral": 1}, "2026-02": {}, "2026-03": {"recommend": 1}, "2026-04": {}, "2026-05": {"neutral": 1}, "2026-06": {}, "2026-07": {}, "2026-08": {}, "2026-09": {"neutral": 1}, "2026-10": {"recommend": 1}}, "quotes": [{"id": 801268129, "item_id": 50079258, "url": "https://news.ycombinator.com/item?id=50079258", "by": "navs", "date": "2026-10-13", "stance": "recommend", "quote": "oxlint and some general ast-grep rules have pretty much been an absolute necessity for any of my LLM based code generation.", "excerpt": "oxlint and some general ast-grep rules have pretty much been an absolute necessity for any of my LLM based code generation. I started down this path after looking at what coderabbit suggested in https://github.com/coderabbitai/ast-grep-essentials", "context": "", "use_case": "linting LLM-generated code", "switched_from": "", "story": "Show HN: Deslop \u2013 Oxlint rules for AI-generated TypeScript"}, {"id": 797703792, "item_id": 49856487, "url": "https://news.ycombinator.com/item?id=49856487", "by": "dkn", "date": "2026-09-26", "stance": "neutral", "quote": "A step up from that is ast-grep and I need to explore this tool more", "excerpt": "I have had a ton of success in exposing AST-based tools to agents when working in large, old codebases. Without them, not only do agents get simple things like function call counts wrong, they tend to return different results. I use this as an example when showing people how the tooling works. Grep is fine for simple use cases. A step up from that is ast-grep and I need to explore this tool more. But I had the most s", "context": "works in large, old codebases", "use_case": "code search for agents", "switched_from": "", "story": "One Month Without AI"}, {"id": 773324209, "item_id": 48332763, "url": "https://news.ycombinator.com/item?id=48332763", "by": "vinhnx", "date": "2026-05-29", "stance": "neutral", "quote": "I have tried using ast-grep for structured code parsing understanding", "excerpt": "Thank you for checking out VT Code! \u201cLLM-native code understanding\u201d refers to VT Code's approach of using LLM as the primary mechanism for semantic code analysis rather than relying solely on traditional static analysis tools. I have tried using ast-grep for structured code parsing understanding as a ground truth before/after the agent executes a code analysis or does a code edit/write operation and code context unde", "context": "author of VT Code", "use_case": "structured code parsing", "switched_from": "", "story": "Show HN: VT Code \u2013 open-source terminal coding agent in Rust"}, {"id": 759275968, "item_id": 47454748, "url": "https://news.ycombinator.com/item?id=47454748", "by": "raulparada", "date": "2026-03-20", "stance": "recommend", "quote": "we use https://ast-grep.github.io (on a pre-commit hook) for such cases, which bridges the linter gaps nicely", "excerpt": "Not out-of-the-box afaik, but we use https://ast-grep.github.io (on a pre-commit hook) for such cases, which bridges the linter gaps nicely.", "context": "", "use_case": "custom code linting rules", "switched_from": "", "story": "Be intentional about how AI changes your codebase"}, {"id": 745275488, "item_id": 46579718, "url": "https://news.ycombinator.com/item?id=46579718", "by": "emporas", "date": "2026-01-11", "stance": "neutral", "quote": "for the moment it calls ast-grep under the hood", "excerpt": "I am writing a Context Retrieval and Context Minimization program for Rust code. I am trying to automate my own workflow in how I use LLMs. The program is gonna do, what I am currently doing by hand, opening files and copying function/method signatures usually, from files all over the place. The key here is to fetch into the context window only what is needed for one-question/one-answer and no more, hence the Context", "context": "", "use_case": "code context extraction", "switched_from": "", "story": "Ask HN: What Are You Working On? (January 2026)"}]}