codespelunker - CLI code search tool that understands code structure and ranks results by relevance. No indexing required
58 points by boyter
58 points by boyter
Neat! How does this compare to ast-grep? https://github.com/ast-grep/ast-grep
Some overlap in what they can do. I am not an expert in it but my understanding is that ast-grep is great as being a structural matcher, IE find me all functions with 3 arguments and such, while cs is more useful for finding where the database migration logic exists. This is because it would rank the results.
Im sure someone is going to come along and correct me on this though. Please don't flame me too hard for it.
I’m excited to try this as well as https://github.com/Cranot/roam-code (posted previously).
oh, I hadn't seen this. It looks super interesting and something I've wanted for a long time
This looks excellent.
I had previously used Hound, which is another great tool but it wasn't doing any code structure understanding.
Thank you. Its the end product of almost 10 years of work from me, combining everything I have learnt into one tool.
Please let me know if you bump into any issues with it.
Oh wow, that's really cool and work really well.
Only issue I really have is that it often finds quite a lot of results and the good matches are at the top so I need to scroll my terminal to see them. Perhaps either a flag to output matches in reverse order, or to only output as many matches as fits the terminal could be good.
| less ?
Good point. Ill add a option to invert. I did consider doing it that way by default but it kept feeling weird when I used it.
I haven't tried this tool yet (I will when I'm home) but +1 to this.
Compilers make this same mistake as well, I wrote about this in 2016.