Code search and code intelligence/Sourcegraph alternatives/2026

The best Sourcegraph alternatives, compared honestly

Sourcegraph is still the most capable code search product ever built: cross-repository regex at monorepo scale, precise SCIP-based navigation, Batch Changes, Code Insights. Teams are not leaving because it got worse. They are leaving because it withdrew, on dates you can check: relicensed off Apache-2.0 in June 2023, core repository made private in August 2024, Cody Free and Pro discontinued on 23 July 2025, and a 2026 pricing page that lists exactly one plan, Enterprise, starting at $16K. This page compares the seven tools that are still available to everyone else, and says plainly which parts of Sourcegraph none of them replace.

Quick answer

The best Sourcegraph alternative depends on what you are replacing:

  • The whole product → Sourcebot: free self-hosted with no per-user fee, Pro at $20 per user per month.
  • Strict open source → Zoekt: Apache-2.0, and still maintained by Sourcegraph itself.
  • Deep cross-references → OpenGrok: CDDL-1.0, released 1.14.15 in June 2026, unfashionable and everywhere.
  • Nothing to run → GitHub code search: included with every plan, if all your code is on GitHub.

7 tools reviewed · licence, activity dates, what each one actually replaces · last updated August 2026

Why teams look elsewhere

What pushes teams off Sourcegraph

Nothing here is a complaint about search quality; the product still does its job better than most of what replaces it. Every reason below is a step Sourcegraph took away from non-enterprise users, and each one has a date attached.

🔒

The source closed in two moves

Most of the code was relicensed off Apache-2.0 in June 2023 onto Sourcegraph's own enterprise licence. In August 2024 the core repository went private altogether, leaving sourcegraph-public-snapshot behind as a frozen copy that was archived on 30 September 2024. The stated reasoning was that open source adds "extra work and risk" for full server-side applications.

🚫

Cody Free and Pro were discontinued

New signups were blocked on 25 June 2025, and Cody Free, Cody Pro and Cody in Enterprise Starter were discontinued on 23 July 2025. Users were pointed at Amp, a separate agentic product, with $10 in credits for Free users and $40 for Pro and Enterprise Starter. A tool people used daily became a credit balance in a different product.

💵

One plan, starting at $16K

The 2026 pricing page lists a single tier: Enterprise, starting at $16K, with AI credits that scale with team size. There is no free tier, no individual plan and no self-serve checkout. No per-user rate is published, so the only way to find out what you would pay is to book a call, which is itself the answer for most teams under a hundred engineers.

🔄

The self-hosted escape hatch narrowed

Running Sourcegraph yourself used to be the answer for regulated teams and for anyone who wanted to read the code they depended on. With the core repository private and no community edition to build from, self-hosting is now a licensed enterprise deployment rather than something you can stand up on a Friday to see whether it helps.

🧩

The engine underneath stayed open

The detail almost nobody mentions: Zoekt, the trigram index that makes fast regex over millions of files possible, is still Apache-2.0 and is still maintained by Sourcegraph, which forked it from google/zoekt in 2017 and pushed to it in August 2026. The product closed. The hard part did not, which is why the alternatives below are better than the price gap suggests.

The shortlist

7 Sourcegraph alternatives worth evaluating

Sourcegraph bundles two separable jobs: search (find this string, this symbol, this pattern, across every repository and branch) and intelligence (precise navigation, batch changes across repositories, tracked code metrics). Almost every migration is about the first job, so this ranking optimises for replacing search well and says explicitly where the second job goes unreplaced. Each pick lists one honest strength and one real weakness.

Sourcebot#1
Best overall: the closest thing to a drop-in replacement

The only project that replaces the whole experience rather than a component: a web UI over every repository and branch, regex and symbol search, git history and blame, a file explorer, and a Docker Compose deploy. Self-hosted Basic is free with no per-user fee; Pro is $20 per user per month and adds code navigation, AI features and SSO. It is also the most active project here, with v5.1.5 shipped on 31 July 2026. Weakness: the licence is FSL-1.1-ALv2, source-available rather than open source, with a competing-use restriction that only lapses when each release converts to Apache-2.0 two years after it shipped.

Zoekt#2
Best for strict open source and for building on

The trigram search engine that made Sourcegraph fast, still Apache-2.0, still maintained by Sourcegraph as the canonical fork of google/zoekt since 2017, and pushed to on 5 August 2026. If your licence policy needs OSI-approved terms with no restrictions, this is the strongest foundation available, and it scales to very large corpora. Weakness: it is a backend with a minimal web UI and no tagged releases. You are adopting a component and building the product around it, not installing one.

OpenGrok#3
Best for deep cross-references and history

Oracle's Java code search engine, quietly the most complete cross-reference tool on this list: symbol definitions, callers, full history integration across Git, Mercurial, Subversion and more. Genuinely maintained, with 1.14.15 released on 15 June 2026. It is what a great many banks and telcos have been running for a decade. Weakness: CDDL-1.0 is weak copyleft at file level, which some legal teams will want to read twice, and the deployment is a servlet container plus a scheduled indexer with a UI that looks its age.

Hound#4
Best for a small team that wants it running today

A single Go binary, MIT licensed, that indexes a list of repositories and gives you fast regex search over them with essentially no operational surface. It is the most-starred project in this comparison at 5,865 stars and the fastest thing here to get from zero to useful. Weakness: it is maintained but not released. Commits are current, the last one landing on 17 July 2026, but the last tagged release is v0.7.1 from 3 May 2023, so anyone who needs a versioned artifact builds from main.

livegrep#5
Best for interactive search over one huge repository

BSD-2-Clause, purpose-built for regex search that returns results as you type over very large single repositories, which is why it backs several public kernel and monorepo search sites. If your problem is one enormous tree rather than many hosts, it is the most pleasant tool here to actually use. Weakness: the slowest cadence in this group, with no tagged releases and the last push on 10 February 2026, and it deliberately does not try to do code navigation.

GitHub code search#6
Best for teams already entirely on GitHub

Included with every GitHub plan, indexing every repository you can already access, with regex, symbol search and scoped qualifiers, and no infrastructure to run at all. For a company whose code is 100% on GitHub, this replaces most of what people used Sourcegraph for at zero marginal cost. Weakness: it searches GitHub and only GitHub. Repositories on GitLab, Bitbucket, Gerrit or an internal host are invisible, which is exactly the multi-host case Sourcegraph was usually bought to solve.

ripgrep and ast-grep#7
Best for the searches you actually run all day

Both MIT, both free, both faster than any server round trip on a checkout you already have. ripgrep is the fastest general regex search available; ast-grep adds syntax-aware structural matching, which answers "every call to this function with three arguments" properly instead of approximately. Weakness: bounded by your disk. No cross-repository search, no shareable permalinks, and no way to read code you have not cloned, so this complements a server rather than replacing one.

Deliberately left off: Amp is Sourcegraph's own replacement product and an agentic coding tool rather than a code search platform, so it cannot honestly be listed as an escape from Sourcegraph. AI coding assistants such as Cursor and Continue answer a different question; the search half is the part people need to replace. grep.app is excellent for searching public code but has no self-hosted or private-repository path.

Side by side

Sourcegraph alternatives compared

Prices as of August 2026 from each vendor's own pricing page; licence and activity data read from each project's repository on 6 August 2026. The column that decides most of these migrations is licence, because the whole reason this page exists is a licence change, and "open source" and "source-available" are not the same promise. Sourcegraph's own row is included as the baseline.

ToolTypeLicenceLast release / pushFree tierBest for
Sourcegraph Hosted and licensed enterprise platform proprietary, source private since Aug 2024 Closed source, no public repo none since Jul 2025 Enterprises buying the $16K plan for Batch Changes and precise navigation
Sourcebot Self-hosted platform, hosted demo FSL-1.1-ALv2, converts to Apache-2.0 after 2 years v5.1.5, 31 Jul 2026 Basic free, unlimited users Replacing the whole Sourcegraph experience
Zoekt Search backend and indexer Apache-2.0 No releases, pushed 5 Aug 2026 free, self-hosted only Strict open-source policies and building your own
OpenGrok Self-hosted cross-reference engine CDDL-1.0, file-level copyleft 1.14.15, 15 Jun 2026 free, self-hosted only Deep symbol cross-references and VCS history
Hound Self-hosted single binary MIT v0.7.1 (2023), commits 17 Jul 2026 free, self-hosted only Small teams that want search running in an hour
livegrep Self-hosted interactive regex search BSD-2-Clause No releases, pushed 10 Feb 2026 free, self-hosted only One very large repository, searched interactively
GitHub code search Hosted, part of GitHub proprietary Continuously delivered included with every plan Code that lives entirely on GitHub
ripgrep and ast-grep Local command line MIT Both actively released free, no server Fast local search and structural refactoring

Sourcebot Pro is $20 per user per month billed monthly, with Enterprise priced on request; every other self-hosted option here has no licence cost at any team size, so the spend is entirely the machine you index on. Sourcegraph publishes no per-user rate at all, only the $16K starting point. Pricing and licences change often; check each vendor for current terms. Compiled August 2026.

Official pages: Sourcegraph · Sourcebot · Zoekt · OpenGrok · Hound · livegrep · GitHub code search · ast-grep

A fair call

When Sourcegraph is still the right choice

Migrating the search half is close to free, because the index is derived from repositories you already have and there is no data to export. Migrating the intelligence half is not, and pretending otherwise is how teams end up six months into a project they thought was a weekend of YAML. The dividing line is whether your engineers use Sourcegraph to find code or to change it.

Sourcegraph is still right if…

  • Your team uses Batch Changes to apply and track one change across hundreds of repositories. Nothing on this list replaces it, and rebuilding it well is a real project.
  • You depend on precise, SCIP-based cross-repository navigation. The alternatives navigate using search heuristics, which is good enough for reading and not good enough for auditing.
  • Code Insights dashboards are in front of leadership. Turning search results into tracked metrics over time is a feature nobody else here has.
  • You are already an enterprise buyer where $16K is inside the noise floor of the tooling budget, and the migration would cost more engineer-weeks than it saves dollars.
  • Your codebase spans a genuinely exotic mix of hosts and languages that Sourcegraph has already been tuned against; matching that tuning yourself is the hidden cost.

Look elsewhere if…

  • You lost Cody Free or Pro in July 2025 and there is no plan left that fits you: Sourcebot self-hosted, free, no per-user fee.
  • Your licence policy requires OSI-approved open source: Zoekt (Apache-2.0) or OpenGrok (CDDL-1.0).
  • You mainly want symbol cross-references and history over a stable codebase: OpenGrok has done exactly that for fifteen years.
  • You need something running this week with one binary and a config file: Hound, built from main.
  • All your code is on GitHub and you were paying for search you already own: GitHub code search.
  • Honestly, most of your searches are inside one checkout: ripgrep and ast-grep, and no server at all.

Common questions

Common questions about Sourcegraph alternatives

What is the best Sourcegraph alternative in 2026?

For most teams it is Sourcebot. It is the only project that replaces the whole Sourcegraph experience rather than a piece of it: a web UI over every repository and branch, regex and symbol search, git history and blame, and a Docker Compose deploy. The self-hosted Basic tier is free with no per-user fee, and Pro at $20 per user per month adds code navigation, AI features and SSO. It is licensed FSL-1.1-ALv2, which is source-available rather than open source, though each release converts to Apache-2.0 two years after it ships. If your licence policy requires OSI-approved terms today, use Zoekt or OpenGrok instead.

Why do teams leave Sourcegraph?

Usually because Sourcegraph left them. The sequence is dated and checkable: most of the code was relicensed off Apache-2.0 in June 2023, the core repository was made private in August 2024 and the public snapshot was archived on 30 September 2024, new Cody signups were blocked on 25 June 2025, and Cody Free, Cody Pro and Enterprise Starter were discontinued on 23 July 2025. In 2026 the pricing page lists exactly one plan, Enterprise, starting at $16K. There is no free tier, no individual plan and no self-serve path, so teams below an enterprise budget have nothing left to buy.

How much does Sourcegraph cost in 2026?

Sourcegraph publishes one figure: Enterprise starting at $16K, with AI credits that scale with team size. The plan covers code search and navigation, Deep Search, Batch Changes, Code Insights, code monitoring, the MCP server, the API and CLI, enterprise security controls and 24x5 support. No per-user rate is published anywhere on the pricing page, and there is no smaller tier to compare it against, so the only way to learn your actual price is to talk to sales. Third-party articles quoting a per-user Cody Enterprise figure are quoting a plan that no longer appears on Sourcegraph's own site.

Is there a truly open-source Sourcegraph alternative?

Yes, and the licence distinctions matter. Zoekt is Apache-2.0, OpenGrok is CDDL-1.0, Hound is MIT and livegrep is BSD-2-Clause; all four are OSI-approved open source with no commercial-use restriction. Sourcebot is not: FSL-1.1-ALv2 is source-available and forbids competing uses, though each release converts to Apache-2.0 on its second anniversary. The irony is that Zoekt, the trigram search engine underneath several of these tools, is still Apache-2.0 and is still maintained by Sourcegraph itself, which forked it from google/zoekt in 2017 and pushed to it in August 2026.

What does Sourcegraph do that the alternatives do not?

Three things, honestly. Precise code navigation is the biggest: Sourcegraph's SCIP indexes give cross-repository jump-to-definition and find-references with compiler-grade accuracy, where most alternatives fall back to search heuristics that are good but not exact. Batch Changes applies and tracks a single change across hundreds of repositories, and nothing on this list replaces it. Code Insights turns search results into tracked metrics over time. If your team depends on any of these rather than on search itself, budget real engineering time or accept that you are giving up a capability.

Can I migrate off Sourcegraph without losing anything?

Migration is unusually cheap, because code search stores no data you own. The index is derived from repositories you already have, so a replacement is a config file listing your hosts and repositories, plus disk. There is nothing to export. What does not carry over is everything built on top: saved searches, code monitors, Batch Changes, Code Insights dashboards, and every Sourcegraph permalink pasted into issues, pull requests and design docs over the years, all of which will 404. That link rot is the real cost, and it is the reason to run both systems in parallel for a quarter rather than cutting over on a date.

Do I need a code search server at all?

Often not. If your code lives on GitHub, GitHub code search is included with every plan, indexes what you already have access to, supports regex and symbol queries, and costs no infrastructure. If you mostly search one checkout, ripgrep is faster than any server round trip and ast-grep adds structural matching that beats regex for real refactoring questions. A dedicated server earns its keep when code is spread across several hosts, when you need shared permalinks that outlive a laptop, or when you want to search branches and repositories nobody has cloned.