This looks interesting and I look forward to trying it but the title here should really just use the description of the repo, or that be adjusted.
Apart from anything else it appears to be very misleading as Rust (ironically) according to the documentation is not one of the languages supported.
ozten · 1h ago
This generalizes to a whole new category of tools: UX which requires more thought and skill, but is way more powerful. Human devs are mostly too lazy to use, but LLMs will put in the work to use them.
0x696C6961 · 1h ago
This is cool, but I don't understand why it tries to re-implement (a subset of) grep. Not only that, but the grep-like behaviour is the default and I need to opt-in to the semantic search using the --sem flag. If I want grep I can use grep/ripgrep.
Runonthespot · 1h ago
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.
alvis · 49m ago
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
Alifatisk · 2h ago
At this point, we aren't even saying it's written in Rust anymore, we just mention it in the title whenever possible.
I did look into the core features and I gotta say, that looked quite cool. It's like Google search, but for the codebase. What does it take to support other languages?
Runonthespot · 1h ago
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
Alifatisk · 54m ago
Thanks for your quick response, most large codebases I've been fiddling on is Ruby!
benzible · 1h ago
I'd love to see elixir support.
Bigsy · 1h ago
Clojure would be awesome
dmd · 1h ago
What does this have to do with Claude Code?
Runonthespot · 56m ago
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!
alvis · 54m ago
A proper title could be "Semantic grep with completely local embeddings"
Put the title aside, the tool, if it works as described, is pretty insane
skybrian · 2h ago
This looks very useful.
Looks like you have to build an index. When should it be rebuilt? Any support for automatic rebuilds?
Runonthespot · 1h ago
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
ayhanfuat · 3h ago
Isn't Claude Code's selling point that it doesn't use embeddings?
joshuanapoli · 3h ago
I don’t think that “Claude Code” is relevant to this semantic grep tool.
Runonthespot · 2h ago
bear in mind that Claude Code by default uses grep - if you watch you'll see if it's looking for something it doesn't know the name of, it flails around with different patterns. Try this tool, tell CC to take a look using ck --help and take it for a spin.
CC in my case likes it so much, it started using it to debug the repo rather than grep and suggesting its own additions
Runonthespot · 2h ago
Note that it’s grep AND semantic - so Claude can start with a grep strategy and if it finds nothing can switch to semantic, and since it’s local and fast, it keeps in sync easily enough
brookst · 2h ago
How do you tell CC to use it? Just as an entry in Claude.md?
Runonthespot · 2h ago
To start with just tell it- but yes Claude.md works too.
“We have a new grep semantic hybrid tool installed called ck - check it out using ck --help and take it for a spin”
dprophecyguy · 3h ago
this is so cool, is there any other tool which is more mature?
redhale · 3h ago
I recently saw SemTools [0], but have not tried it out yet myself.
LlamaIndex is batting a thousand since their inception. Can't go wrong with this tool, either.
Runonthespot · 3h ago
Agreed - Logan is a legend, this is similar but simpler - no dependency on external models (might add it)
cheesyFishes · 18m ago
Thanks!
Seems like CLI tools are all the rage these days
fakebizprez · 3h ago
We really are living in the golden age of the terminal. I thought this would take a chunk out of Typescript/node marketshare of young coders, but i'm starting to see more and more of these animals building TUIs using nothing but npm packages.
Have they no shame?
floydnoel · 2h ago
Last week I built my own CLI coding agent tool using just nodejs and zero dependencies! It is a lot of fun to build, really, I think everyone should try it out
Runonthespot · 3h ago
help make it mature :D Add any issues
AmazingTurtle · 1h ago
Why does it need to say RUST in the headline as if this was a feature, lol
Apart from anything else it appears to be very misleading as Rust (ironically) according to the documentation is not one of the languages supported.
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
I did look into the core features and I gotta say, that looked quite cool. It's like Google search, but for the codebase. What does it take to support other languages?
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!
Put the title aside, the tool, if it works as described, is pretty insane
Looks like you have to build an index. When should it be rebuilt? Any support for automatic rebuilds?
CC in my case likes it so much, it started using it to debug the repo rather than grep and suggesting its own additions
“We have a new grep semantic hybrid tool installed called ck - check it out using ck --help and take it for a spin”
[0] https://github.com/run-llama/semtools
Seems like CLI tools are all the rage these days
Have they no shame?