Better HN
topnewbestaskshowjobs
Log inSign up

Runonthespot

97 karma · joined Jul 6, 2021 (5y ago) · 21 submissions

Submissions

comment 6mo ago · link · parent

Done some work fixing some of these issues. Please do raise issues when you find them and I'll get them fixed! (author)

comment 1y ago · link · parent

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

comment 1y ago · link · parent

Ruby support has been added!

comment 1y ago · link · parent

Nice catch- should be fixed in latest

comment 1y ago · link · parent

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

comment 1y ago · link · parent

coming up next.

comment 1y ago · link · parent

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

comment 1y ago · link · parent

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

comment 1y ago · link · parent

we all know rust CLI tools are better right?

comment 1y ago · link · parent

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

comment 1y ago · link · parent

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!

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

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

comment 1y ago · link · parent

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

comment 1y ago · link · parent

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”

comment 1y ago · link · parent

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

comment 1y ago · link · parent

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

comment 1y ago · link · parent

Agreed - Logan is a legend, this is similar but simpler - no dependency on external models (might add it)

comment 1y ago · link · parent

help make it mature :D Add any issues

20.

Show HN: Semantic grep with local embeddings(github.com ↗)

179 points · by Runonthespot · 1y ago · 78 comments