Hacker Newsnew | past | comments | ask | show | jobs | submit | Runonthespot's commentslogin

Nice catch- should be fixed in latest


Added Ruby, but Elixir not very well supported by tree sitter


interesting - can I ask you to try a ck --index . ?


It'd be nice if respected gitignore. It's turning my M4 MBP into a space heater too.


coming up next.


Fyi, I just grabbed the same lib that ripgrep uses. That bit is extracted iirc, and was quite nice and simple to use.


I saw that you added it, thanks! I'll give this a shot for a few days.


BAAI/bge-small-en-v1.5 but considering switching this to google's latest gemmaembedding - it's fairly switchable.


we all know rust CLI tools are better right?


Please don't post misleading titles. This is in the site guidelines: https://news.ycombinator.com/newsguidelines.html.


I'll add rust, ruby, elixir, Clojure next. It says rust as it's written in rust, sorry about that!


Mainly I wrote it because I noticed Claude's "by design" use of grep meant it couldn't search the code base for things it didn't already know the name of, or find "the auth section". But equally, it's well documented that e.g. Cursor's old RAG technique wasn't that great.

My idea was to make a tool that just does a quick and simple embedding on each file, and uses that to provide a semantic alternative that is much closer to grep in nature, but allows an AI tool like Claude Code to run it from the command line - with some parameters.

Arguably could be MCP, but in my experience setting up a server for a basic tool like this is a whole lot of hassle.

I'm fairly confident that this is a useful tool for CC as it started using it while I was coding it, and even when buggy, was more than willing to work around the issues for the benefit of having semantic search!


CC is so good with grep that I'm half expecting to clutter its context with bad results from semantic search. But also half optimistic at this just improving its search.

If you're getting useful results from hybrid mode that's very interesting to me since well-constructed grep that claude executes don't really look like they'd work great for semantic search to me! But intuition is often wrong on this stuff.

I am very curious your thoughts on speed. I'd rather any tools claude invokes be as fast as possible so it can get feedback immediately and execute again.


if you’re concerned about context you can trivially make a hook that will prune your conversation history of older semantic search results.

i do a lot of context management with hooks for all sorts of tool calls.


That sounds great - do you have any examples?


For example I have a Stop hook that scans my messages to see which files we've worked on. It'll check to see if the changes to those files have been committed and, if not, it will prevent Claude from stopping and send it a message to commit the specific files in a specific style that includes the id of the current session. The same script also cleans up all previous instances of the same message in the conversation, saving like 5k tokens per session.

I have a lot of PreToolUse hooks that injects guideline messages whenever certain tools are called or bash commands run. My hooks also prune older versions of those out of context. All of the transcripts are in ~/.claude/projects/ in jsonl format and are hot-editable.


Starred the repo.

Went to the github repo and was expecting a section about Claude Code and best practices on how to set this up with Claude Code. Very curious to hear how that might work, especially with what you've found compared to Claude Code's love of grep.


> Went to the github repo and was expecting a section about Claude Code and best practices on how to set this up with Claude Code. Very curious to hear how that might work, especially with what you've found compared to Claude Code's love of grep.

A write up on this would be great!


Fair comment- the initial thinking was to have both and in fact a hybrid mode too which fuses results so you can get chunks that match both semantically and on keyword search in one resultset. Later could add a reranker too.


Or another way of thinking. How much is the penalty we are talking about for semantic vs conventional grep?

My thinking is that for large codebase, sorting embedding matches maybe more efficient than reading all files and hence there is no point to put semantic search behind a --semantic flag


Yes- files are hashed and checked whenever you search so index should always remain up to date. Only changed files are reindexed. You can also inspect the metadata (chunking semantics, embeddings). It’s all in the .ck sidecar


It supports most languages but needs a bit of tree-sitter setup to do semantic chunking. Let me know what languages you’d like added


Java would be useful as well for larger backend codebases.


Thanks for your quick response, most large codebases I've been fiddling on is Ruby!


Ruby support has been added!


Amazing how quick you were, thank you!


Go would be my top ask. Shell and make would be nice bonuses.


I'd love to see elixir support.


Sadly, not great support for Elixir from tree-sitter but it should handle them generically as text files



Clojure would be awesome


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: