Sourcegraph vs open source code search
If you are leaving Sourcegraph because it stopped being open source, it is worth checking that the replacement actually is. The projects in this category sit under five different licences with materially different terms, and the most polished of them is source-available rather than OSI open source. This page states each licence precisely, gives the last real release date for each project, and separates the part of Sourcegraph free software fully replaces from the part it does not.
Pick open source if your policy requires OSI-approved terms, if you have been burned once already by a licence change and do not intend to be again, or if you want to embed code search in something else: Zoekt (Apache-2.0) and OpenGrok (CDDL-1.0) are the strongest. Stay on Sourcegraph if what you actually depend on is Batch Changes, Code Insights or precise navigation, none of which has an open-source equivalent here.
Side by side
The licence check, project by project
| Project | Licence | OSI open source | Last release | Last push | Stars |
|---|---|---|---|---|---|
| Sourcegraph | Proprietary, repo private since Aug 2024 | ✗ No | Not publicly versioned | Snapshot archived 30 Sep 2024 | n/a |
| Sourcebot | FSL-1.1-ALv2, converts to Apache-2.0 after 2 years | ✗ No, source-available | v5.1.5, 31 Jul 2026 | 6 Aug 2026 | 3,658 |
| Zoekt | Apache-2.0 | ✓ Yes | No tagged releases | 5 Aug 2026 | 1,808 |
| OpenGrok | CDDL-1.0, file-level copyleft | ✓ Yes | 1.14.15, 15 Jun 2026 | 13 Jul 2026 | 4,899 |
| Hound | MIT | ✓ Yes | ✗ v0.7.1, 3 May 2023 | 17 Jul 2026 | 5,865 |
| livegrep | BSD-2-Clause | ✓ Yes | No tagged releases | 10 Feb 2026 | 2,227 |
Licence, release, push and star figures read directly from each project's repository on 6 August 2026. Star counts are a popularity signal, not a quality one, and Hound leading on stars while trailing on releases is the clearest illustration of that on this page.
Sources: Sourcebot · Zoekt · OpenGrok · Hound · livegrep · Functional Source License. Compiled August 2026.
Where open source wins
The failure that brought you here cannot repeat
An Apache-2.0, MIT, BSD or CDDL grant on code that has already been released is not revocable. A vendor can stop maintaining a project, close future development or start selling something else, and the code you already have stays yours to run, patch and fork under the same terms. That is the entire lesson of Sourcegraph's June 2023 relicensing and its August 2024 repository closure, and it is available for free.
The best engine in the category is already open
Zoekt, the trigram index that makes Sourcegraph's search fast, is Apache-2.0 and is still maintained by Sourcegraph, which forked it from google/zoekt in 2017 and pushed to it on 5 August 2026. Choosing open source here does not mean accepting a weaker search engine. It means running the same one without the product around it.
OpenGrok is more serious than its reputation
It is Java, its interface looks like 2011, and it is quietly the deepest cross-reference tool available: symbol definitions, callers, and full history across Git, Mercurial and Subversion, with release 1.14.15 shipped on 15 June 2026. For a stable codebase where the question is usually "where is this defined and who changed it" rather than "search everything we own", it beats several newer tools.
Cost stops being a variable
None of the four open-source options charges anything at any team size. The spend becomes the machine you index on, which for a few thousand repositories is a single well-specified server. Set that against a plan starting at $16K with no published per-user rate, and the calculation for a team under a hundred engineers is not close.
Where Sourcegraph still wins
Nothing on this list replaces Batch Changes or Code Insights, and nothing matches precise SCIP-based navigation. That is the honest boundary: free software fully covers the search half of Sourcegraph and does not attempt the change-management half. A platform team that uses Batch Changes to roll a dependency bump across four hundred repositories is not looking at an alternative, it is looking at a rewrite of an internal process.
The second thing you give up is somebody else's operations. Every open-source option here needs a machine, an index refresh schedule, and, for private code, an authenticating proxy in front of it, because none of these tools has a permissions model comparable to Sourcegraph's per-repository access control. Get that proxy wrong and you have published your source code, which is a considerably worse outcome than an invoice. Also read the licences rather than the badges: CDDL-1.0 is weak copyleft at file level and will need a legal opinion in some organisations, and Hound being MIT does not help if your compliance process requires a tagged release, since the last one is from May 2023.
Choosing between the four open-source options
The short version, by situation:
1. Strict policy, and you have a platform team. Zoekt, Apache-2.0, the same engine Sourcegraph runs, and you build the sync and the front door.
2. You want deep cross-references and history on a stable codebase. OpenGrok, CDDL-1.0, still releasing, and the closest thing to a finished product among the four.
3. You want something running before lunch. Hound, MIT, one Go binary and a config file, built from main because the tags stopped in 2023.
4. One very large repository, searched interactively. livegrep, BSD-2-Clause, the nicest search experience here, with the slowest development cadence and no releases at all.
Common questions
FAQ: open source code search
Which Sourcegraph alternatives are genuinely open source?
Four of them, under four different licences. Zoekt is Apache-2.0, OpenGrok is CDDL-1.0, Hound is MIT and livegrep is BSD-2-Clause. All four are OSI-approved, permit commercial use and impose no field-of-use restriction, so all four clear a policy that requires open source. Sourcebot does not: FSL-1.1-ALv2 is source-available and forbids competing uses, although each release converts to Apache-2.0 two years after it ships. Sourcegraph itself is neither, since its core repository has been private since August 2024 and the public snapshot was archived on 30 September 2024.
Is source-available the same as open source?
No, and the difference is exactly the one that stranded Sourcegraph users. Source-available means you can read and usually modify the code, but the licence restricts what you may do with it, typically forbidding you from offering it as a competing commercial service. Open source in the OSI sense forbids any such restriction on field of use. Practically, a source-available licence protects you against the vendor disappearing, because you can still run and patch what you have, but it does not protect you against the vendor changing terms on future versions. That is why the conversion clause in the Functional Source License matters: it turns each release into real Apache-2.0 code on a fixed schedule rather than at the vendor's discretion.
Does an open-source code search tool match Sourcegraph on features?
On search, yes, and sometimes on more. Zoekt is literally the engine Sourcegraph runs, and OpenGrok's cross-references and history integration are deeper than most people expect. On code intelligence, no. Precise SCIP-based navigation across repositories, Batch Changes for applying one change to hundreds of repositories, and Code Insights for tracking search results as metrics have no open-source equivalent on this list. The honest summary is that the search half of Sourcegraph is fully replaceable with free software and the change-management half is not.