{"by":"bshzzle","descendants":59,"id":41711032,"kids":[41716817,41718303,41713892,41712783,41716494,41721540,41717702,41713685,41712278,41715150,41734339,41713284,41715575,41716996,41711960,41711170,41713657,41716616,41715884,41711753,41717140,41714246],"score":259,"text":"Hi HN,<p>We’re Brendan and Michael, the creators of Sourcebot (<a href=\"https:&#x2F;&#x2F;github.com&#x2F;sourcebot-dev&#x2F;sourcebot\">https:&#x2F;&#x2F;github.com&#x2F;sourcebot-dev&#x2F;sourcebot</a>). Sourcebot is an open-source code search tool that allows you to quickly search across many large codebases. Check out our demo video here: <a href=\"https:&#x2F;&#x2F;youtu.be&#x2F;mrIFYSB_1F4\" rel=\"nofollow\">https:&#x2F;&#x2F;youtu.be&#x2F;mrIFYSB_1F4</a>, or try it for yourself on our demo site here: <a href=\"https:&#x2F;&#x2F;demo.sourcebot.dev\" rel=\"nofollow\">https:&#x2F;&#x2F;demo.sourcebot.dev</a><p>While at prior roles, we’ve both felt the pain of searching across hundreds of multi-million line codebases. Using local tools like grep were ill-suited since you often only had a handful of codebases checked out at a time. Sourcegraph (<a href=\"https:&#x2F;&#x2F;sourcegraph.com&#x2F;\" rel=\"nofollow\">https:&#x2F;&#x2F;sourcegraph.com&#x2F;</a>) solves this issue by indexing a collection of codebases in the background and exposing a web-based search interface. It is the de-facto search solution for medium to large orgs, but is often cited as expensive ($49 per user &#x2F; month) and recently went closed source (<a href=\"https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=41296481\">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=41296481</a>). That’s why we built Sourcebot.<p>We designed Sourcebot to be:<p>- Easily deployed: we provide a single, self-contained Docker image (<a href=\"https:&#x2F;&#x2F;github.com&#x2F;sourcebot-dev&#x2F;sourcebot&#x2F;pkgs&#x2F;container&#x2F;sourcebot\">https:&#x2F;&#x2F;github.com&#x2F;sourcebot-dev&#x2F;sourcebot&#x2F;pkgs&#x2F;container&#x2F;so...</a>).<p>- Fast &amp; scalable: designed to minimize search times (current average is ~73ms) across many large repositories.<p>- Cross code-host support: we currently support syncing public &amp; private repositories in GitHub and GitLab.<p>- Quality UI: we like to think that a good looking dev-tool is more pleasant to use.<p>- Open source: Sourcebot is free to use by anyone.<p>Under the hood, we use Zoekt (<a href=\"https:&#x2F;&#x2F;github.com&#x2F;sourcegraph&#x2F;zoekt\">https:&#x2F;&#x2F;github.com&#x2F;sourcegraph&#x2F;zoekt</a>) as our code search engine, which was originally authored by Han-Wen Nienhuys and now maintained by Sourcegraph (<a href=\"https:&#x2F;&#x2F;sourcegraph.com&#x2F;blog&#x2F;sourcegraph-accepting-zoekt-maintainership\" rel=\"nofollow\">https:&#x2F;&#x2F;sourcegraph.com&#x2F;blog&#x2F;sourcegraph-accepting-zoekt-mai...</a>). Zoekt works by building a trigram index from the source code enabling extremely fast regular expression matching. Russ Cox has a great article on how trigram indexes work if you’re interested: <a href=\"https:&#x2F;&#x2F;swtch.com&#x2F;~rsc&#x2F;regexp&#x2F;regexp4.html\" rel=\"nofollow\">https:&#x2F;&#x2F;swtch.com&#x2F;~rsc&#x2F;regexp&#x2F;regexp4.html</a><p>In the shorter-term, there are several improvements we want to make, like:<p>- Improving how we communicate indexing progress (this is currently non-existent so it’s not obvious how long things will take)<p>- UX improvements like search history, query syntax highlighting &amp; suggestions, etc.<p>- Small QOL improvements like bookmarking code snippets.<p>- Support for more code hosts (e.g., BitBucket, SourceForge, ADO, etc.)<p>In the longer-term, we want to investigate how we could go beyond just traditional code search by leveraging machine learning to enable experiences like semantic code search (“where is system X located?”) and code explanations (”how does system X interact with system Y?”). You could think of this as a copilot being embedded into Sourcebot. Our hunch is that will be useful to devs, especially when packaged with the traditional code search, but let us know what you think.<p>Give it a try: <a href=\"https:&#x2F;&#x2F;github.com&#x2F;sourcebot-dev&#x2F;sourcebot\">https:&#x2F;&#x2F;github.com&#x2F;sourcebot-dev&#x2F;sourcebot</a>. Cheers!","time":1727801800,"title":"Show HN: Sourcebot, an open-source Sourcegraph alternative","type":"story","url":"https://github.com/sourcebot-dev/sourcebot"}