On this page
- How we evaluated
- Why teams look for a Sourcegraph alternative in 2026
- Job 1: exact search across many repositories
- Zoekt
- OpenGrok
- Hound
- GitHub code search
- GitLab exact code search
- Job 2: context for AI coding agents
- Augment Context Engine
- Sourcegraph's own MCP server
- Greptile
- repowise
- Job 3: understanding code you didn't write
- Batch Changes has no direct replacement
- How to choose a Sourcegraph alternative
- FAQ
The best Sourcegraph alternative depends on the job you used it for. For exact and regex search you run yourself, use Zoekt (the engine inside Sourcegraph) or OpenGrok. For search you do not run, use GitHub or GitLab code search. For giving AI agents codebase context, use Augment's Context Engine or repowise over MCP. For understanding a codebase (architecture, owners, risk), use repowise.
| Tool | Best for | Open source | Self-host | Price (October 2026) |
|---|---|---|---|---|
| Sourcegraph (baseline) | Exact, symbol and AI search across many hosts, Batch Changes | No (private since Aug 2024) | Enterprise | From $16K/year |
| Zoekt | Fast exact and regex search | Yes, Apache 2.0 | Yes | Free |
| OpenGrok | Search plus cross-reference and history browsing | Yes, CDDL 1.0 | Yes | Free |
| Hound | Lightweight regex search for a few dozen repos | Yes, MIT | Yes | Free |
| GitHub code search | Teams on GitHub who want zero setup | No | No (github.com) | Included with GitHub |
| GitLab exact code search | Teams on GitLab, Zoekt-backed | No (paid tiers) | Admin installs Zoekt | Premium and Ultimate |
| Augment Context Engine | Semantic context for coding agents, via MCP | No | Hosted, plus a local mode | Plans from $20/month |
| Greptile | AI pull request review that knows the codebase | No | Enterprise only | Free starter, Pro $30/seat/month |
| repowise | Semantic search, architecture, owners, hotspots and MCP for agents | Yes, AGPL-3.0 | Yes | Free tier; Pro $15/month |
Scroll the table sideways to see every column.
I build repowise, so read its rows with that in mind. Every other tool is described the way its own site and repository describe it, with prices as listed in October 2026.
We build repowise, so weigh our entry accordingly. The measurements we publish about it, with their methods, are on the benchmarks page.
How we evaluated
- The job: exact search, agent context, or code understanding. No tool wins all three.
- Openness: license, and whether you can run it on your own hardware.
- Reach: git hosts supported and how many repositories it handles.
- Price model: list price on the vendor's page, since several AI products changed pricing this year.
Why teams look for a Sourcegraph alternative in 2026
Price, licensing and who reads the code have all changed. Each pushes a different group of users away.
Price. Sourcegraph's pricing page lists one plan, Enterprise, from $16K a year on an annual contract, with AI credits that scale with team size. The free self-hosted tier and the individual Cody plans are gone: Cody Free and Pro stopped taking signups in mid-2025. For a team of eight, the starting price ends the evaluation.
License. Sourcegraph moved much of its code to an enterprise license in June 2023 and made its main repository private on 22 August 2024. The open part today is Zoekt, the search engine underneath, which Sourcegraph still maintains under Apache 2.0.
Who reads the code. Coding agents (Claude Code, Cursor, Codex) now read code alongside engineers. An agent needs to know which files matter for a change and what breaks if it touches them, which a list of matches does not answer. Sourcegraph has its own generally available MCP server for this, included on Enterprise.
Job 1: exact search across many repositories
Zoekt, OpenGrok and Hound cover exact and regex search without a license fee; GitHub and GitLab cover it with nothing to run. You want regex, boolean operators, repo and path filters, and results in under a second.
Zoekt
Zoekt is a trigram index (it breaks code into overlapping three-character pieces so substring and regex queries are fast) with a web server and JSON and gRPC APIs. It ranks matches higher when they land on a symbol, which improves with Universal ctags installed. It is an engine with little product around it: no code navigation and no permission sync with your git host. With one platform engineer to own it, Zoekt plus a job that pulls your repos covers most of what people used Sourcegraph search for.
Pick it if you want the same engine Sourcegraph uses and can run a service.
OpenGrok
OpenGrok is a Java search and cross-reference engine. Click a symbol and see where it is defined and used, with history from several version control systems. It is heavier to run than Zoekt and its UI is dated, but it remains a solid choice for a large C, C++ or Java tree.
Pick it if you want browsable, cross-referenced views of a large legacy codebase.
Hound
Hound is a small MIT-licensed regex search server with a clean web UI and a light memory footprint. It suits a team with a few dozen repos that wants "grep, but in a browser, for everyone".
Pick it if you have a handful of repos and want the lowest setup cost.
GitHub code search
If your code is on github.com you already have it. It supports regex, boolean operators, qualifiers and symbol: search. Know its limits: you must be signed in, only the default branch is searched, files over 350 KiB are skipped, and a search returns at most 100 results (GitHub docs).
Pick it if your code is on github.com and you want nothing to run.
GitLab exact code search
GitLab ships Zoekt-backed exact code search with exact-match and regex modes. On self-managed GitLab an administrator installs Zoekt and enables it, on the Premium and Ultimate tiers (GitLab docs).
Pick it if your team is on GitLab Premium or Ultimate.
Job 2: context for AI coding agents
Agent context tools pick the right files for a question and hand them to the agent you already use over MCP. MCP is the standard way an agent calls outside tools. Check how each tool selects files and whether it works with your editor.
Augment Context Engine
Augment's Context Engine indexes your code for semantic retrieval and, since February 2026, is available as an MCP server for MCP-compatible agents including Claude Code and Cursor. It has a local mode through its CLI and a remote mode for cross-repo context. Plans start at $20 a month. It is hosted, so check its data handling against your rules.
Pick it if you want a hosted semantic context layer and are comfortable with a hosted index.
Sourcegraph's own MCP server
If you already pay for Sourcegraph Enterprise, its MCP server gives agents search, file reading, commit and diff search and Deep Search, and connects to Claude Code with OAuth. You do not need an alternative for this job.
Greptile
Greptile indexes your repository into a graph of functions, classes and dependencies and uses it for AI pull request review. Pro is $30 per seat per month and Enterprise adds self-hosting (pricing). It answers "is this change correct", not "find me this code".
Pick it if the context you want is for reviewing pull requests.
repowise
repowise indexes a repository into a dependency graph, git history signals (hotspots, co-change, ownership), generated documentation and semantic search, and serves them to agents over ten MCP tools. The open-source version runs on your machine and repowise init writes the MCP config for your agent. The hosted version gives each repo its own MCP address that also works in Claude.ai, Cursor and VS Code. It parses 28 languages to a full AST, with 15 at the Full tier.
Its retrieval was measured on ContextBench, which tests file retrieval for real GitHub issues; the method and results are in we benchmarked ourselves and came last. That benchmark does not measure search across many repositories.
Pick it if you want agents to get ranked, explained context with owners and risk attached, and want to self-host.
Job 3: understanding code you didn't write
Search tells you where a function lives; it does not tell you what the module is for, who knows it, or what breaks if you change it. Generated wikis such as DeepWiki help a new reader but mostly describe the current files. The signals that predict trouble come from history: files that change often and are complex (hotspots), files that always change together though nothing imports one from the other (hidden coupling), and code only one person has touched in a year.
This is the job repowise is built for. Every indexed repo gets an architecture view, module docs, owners, hotspots, dead code and semantic search, free on public repos with no account.

For exact regex search across thousands of repositories, pair it with Zoekt.
Batch Changes has no direct replacement
Batch Changes finds a pattern across hundreds of repos, opens the pull requests to fix it and tracks them to merge, and nothing on this list does that out of the box. The closest substitute is scripted: Zoekt or GitHub search to find the sites, a codemod tool to make the edit, and your git host's API to open the PRs. If Batch Changes was the reason you bought Sourcegraph, the price may be worth it.
How to choose a Sourcegraph alternative
- Exact search, can run a service: Zoekt. Want cross-reference browsing too: OpenGrok.
- Exact search, nothing to run: GitHub or GitLab code search.
- Mostly Cody: pick a context tool that works with the agent you already use. Augment Context Engine and repowise both speak MCP; repowise also self-hosts.
- Onboarding and risk ("what is this, who owns it, what breaks"): repowise.
- Batch Changes at scale: stay on Sourcegraph.
For more on repowise, see repowise vs Sourcegraph, the shorter Sourcegraph alternative page, the best code search tools for engineering teams and code search compared with GitHub and build-your-own.
FAQ
- Is Sourcegraph still open source?
- No. Sourcegraph moved much of its code to an enterprise license in June 2023 and made its main repository private on 22 August 2024. Zoekt, the search engine it uses, is still open source under Apache 2.0.
- What is the best open source Sourcegraph alternative?
- For exact and regex search, Zoekt, since Sourcegraph and GitLab use the same engine. For search with cross-reference browsing, OpenGrok. For understanding a codebase and giving agents context, repowise (AGPL-3.0). None replaces Batch Changes.
- How much does Sourcegraph cost in 2026?
- Its pricing page lists a single Enterprise plan from $16K a year on an annual contract, with AI credits that scale with team size. Cody's free and Pro plans for individuals were discontinued in 2025.
- What can I use instead of Sourcegraph Cody?
- Use the agent you already have (Claude Code, Cursor, Copilot, Codex) and give it codebase context over MCP, through a tool such as Augment's Context Engine or repowise. On Sourcegraph Enterprise, its own MCP server does this too.
- What are the best tools for semantic search across repositories?
- Semantic search ranks by meaning, so "where do we retry failed payments" finds code that never uses the word "retry". Sourcegraph (natural-language search and Deep Search), Augment's Context Engine and repowise offer it. Zoekt, OpenGrok, Hound and GitHub code search are exact-match tools.
- Can GitHub code search replace Sourcegraph?
- For small and medium teams on github.com, often yes for everyday search. You must be signed in, only default branches are searched, files over 350 KiB are skipped and each search returns at most 100 results. It has no Batch Changes equivalent and does not search other git hosts.



