use of ripgrep

Status Fixed / completed
Maintainer reply ✓ Yes — bcherny
Activity 5 comments · opened Feb 25, 2025 · closed Feb 25, 2025
💡 Likely answer: A maintainer (bcherny, collaborator) responded on this thread — see the highlighted reply below.

Hi, I have ripgrep installed on macOS via cargo. I notice that claude code will use grep at times but have not seen it call ripgrep. Is there a way to determine if claude code has identified that rg is on the path or has access to it and is actively using it? I think it would be helpful to know this directly. I didn't see anything on the docs about it.

Second question. If I have extended docs (say in multiple txt files) what is the best way to let claude know they are there and should reference them? The same goes for if I download the source for a library I am using, can I have claude look through the source and check for implementation of a class or method and make sure it is being used correctly?

View original on GitHub ↗

5 Comments

bcherny collaborator · 1 year ago

Hey! When claude uses the Search tool, that's actually ripgrep under the hood. Are you seeing it use that tool?

Second question. If I have extended docs (say in multiple txt files) what is the best way to let claude know they are there and should reference them? The same goes for if I download the source for a library I am using, can I have claude look through the source and check for implementation of a class or method and make sure it is being used correctly?

The best way is to just tell claude! "I have extended docs in foo.txt and bar.txt -- please read them"

gideongrinberg · 1 year ago

@bcherny I've seen it do that, but I also sometimes see it grep through files. Do you know if there's a reason for that? It seems to take longer.

mrmikardo · 1 year ago

I also have this issue: Claude seems to use grep all the time, even though ripgrep is installed and globally available on my system.

gideongrinberg · 1 year ago

This seems to work a lot better now

github-actions[bot] · 1 year ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.