Developer tools decision
Sourcegraph Cody
A competent engineer can build a useful, self-hosted code-search + LLM assistant for small-to-medium codebases, but Sourcegraph's enterprise scale, compliance posture, integrations, and support are costly to reproduce and justify paying the hosted product for large orgs.
Visit website↗Open-source builds that already do this
Every project below is open source and already does this job today. Fork one, self-host it, or take the parts you need — the build prompt further down assumes an empty file, and this is the shortcut past that. Licences differ; check the one on each card before you ship.
Code Sourcegraph Cody publishes itself
Not a way out of the subscription — these are the vendor’s own repositories. Worth a look for how they build, and for anything you would have to integrate with.
What a replacement has to do
- Provide natural-language code search answers grounded in an indexed codebase and a chat-style assistant that uses that context to read/write code.
What it still won’t have
- Enterprise-grade scale and performance for very large monorepos
- Compliance certifications and attested security controls (SOC2/ISO27001)
- Dedicated enterprise support, account management, and included AI-credit pooling
- Built-in MCP server and tight integrations with many code hosts and agent workflows
- Zero-data-retention and other enterprise deployment options out of the box
What remains hard
- Compliance and regulation
SOC2 Type II + ISO27001 Compliance.
- Infrastructure at scale
Built to scale. Handles the world's largest monorepos and multi-repo architectures.
- Brand trust
Trusted by 200+ enterprise engineering teams
First-year cost
No published price
Sourcegraph Cody does not publish a price we could read, so there is nothing to compare against. What building costs is below.
Money you would actually spend
Time you would spend
—
What you would spend
What we assumed
The verdict above measures whether you could build it. This one is only about money.
Runnable build prompt
Build a self-hostable minimal Code AI assistant using: Go or Python backend, Postgres, a file/blob store (S3), an inverted index (e.g., SQLite FTS or Elasticsearch), and OpenAI-compatible LLM API. In scope: 1) Repo ingestion worker to clone repos, extract code files, compute embeddings, and index text/symbols; 2) Retrieval API that returns top-K relevant code snippets with file/line citations for a NL query; 3) Context assembly and prompt templating that merges retrieved snippets + user query; 4) LLM integration to call an external API and render a chat UI; 5) Basic web UI for search and chat, plus SSO stub (OIDC) and RBAC hooks. Out of scope: enterprise-grade scaling across huge monorepos, SOC2/ISO attestation, advanced batch-change automation, and managed AI credit pooling. Require retries and error handling for repo cloning and LLM calls, schema and unit tests for ingestion and retrieval, and end-to-end tests for the chat flow.
How we checked
How the score was reached
- Pay verdict base20
- An open-source build was found+5
- 5 cited sources+3
- Hard moats found in the evidence-6
- Evidence score22
The base comes from the verdict. Everything under it is a check that either happened or did not, and each one is a fact frozen in this record rather than a judgement made at render time — so the same evidence always produces the same number.
How scoring works →Cited sources · 5
Every page the run actually retrieved.
- official productSourcegraph (product)
- official pricingSourcegraph pricing
- official docsSourcegraph docs
- open sourceTabbyML/tabby
- open sourceiOfficeAI/AionUi
Integrity checks
What held up, and what did not.






