What ast-grep says, and what it scored.
A tree-sitter AST pattern matcher for structural search and rewrite: precise when you already know the exact shape of the code you want.
We ran it against LemonCrow's local code search, the code_search tool Workspaces Lite gives Claude Code, Codex and OpenCode, on the same 7,213 searches across 14 open-source repositories. ast-grep put the right file first 27.1% of the time; LemonCrow did 58.2%.
| Tool | MRR | Right first | p95 | Slowest |
|---|---|---|---|---|
| LemonCrow local search | 0.676 | 58.2% | 134ms | 319ms |
| ast-grep | 0.312 | 27.1% | 1255ms | 8806ms |
Its speed claim is about exact AST patterns; the queries here are free text and identifiers, which it is not built for. 0.312 MRR against LemonCrow's 0.676. LemonCrow runs ast-grep itself for structural matches.
“ast-grep can precisely search code based on AST, running through ten thousand files in sub seconds.”
| Search | LemonCrow | ast-grep |
|---|---|---|
| Definition | 0.871 | 0.555 |
| Content | 0.864 | 0.591 |
| Semantic intent | 0.576 | 0.000 |
| SWE-bench | 0.493 | 0.230 |
| Agent sessions | 0.571 | 0.179 |
| Repository | LemonCrow | ast-grep |
|---|---|---|
| astropyastropy/astropy | 0.715 | 0.448 |
| djangodjango/django | 0.652 | 0.223 |
| flaskpallets/flask | 0.671 | 0.323 |
| lemoncrowlemoncrow/lemoncrow | 0.537 | 0.224 |
| linuxtorvalds/linux | 0.668 | 0.107 |
| matplotlibmatplotlib/matplotlib | 0.747 | 0.000 |
| pylintpylint-dev/pylint | 0.784 | 0.452 |
| pytestpytest-dev/pytest | 0.739 | 0.455 |
| requestspsf/requests | 0.803 | 0.486 |
| scikit-learnscikit-learn/scikit-learn | 0.669 | 0.330 |
| seabornmwaskom/seaborn | 0.768 | 0.445 |
| sphinxsphinx-doc/sphinx | 0.580 | 0.299 |
| sympysympy/sympy | 0.637 | 0.373 |
| xarraypydata/xarray | 0.764 | 0.448 |
Workspaces Lite is free and open source (Apache-2.0), runs on your machine, needs no LemonCrow account and uploads no source. One command installs it and gives Claude Code its tools; use --agent codex or --agent opencode for those agents.
$ curl -fsSL https://lemoncrow.com/install.sh | bash -s -- --product workspaces --agent claudeThe benchmark scored all 11 third-party tools in BENCHMARKS.md on the same queries. The method, the full table and the raw results are public.