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
SubscriptionCustom pricing
Initial build80 hours
Monthly upkeep40 hours + $750
Evidence2/3 runs agree

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 regulationSOC2 Type II + ISO27001 Compliance.
  • Infrastructure at scaleBuilt to scale. Handles the world's largest monorepos and multi-repo architectures.
  • Brand trustTrusted by 200+ enterprise engineering teams
Read the build prompt

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

Keep paying

Subscription price × seats × 12

Build it

AI build APIs + hosting

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

Not run yet
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 checked5 sources · 2/3 runs agreed · evidence score 22

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.

Integrity checks

What held up, and what did not.

! 2 of 3 runs agreed; the verdict is the majority✓ Citations limited to fetched pages! 3 moats quoted from the page