Skip to main content

Sourcegraph

Universal code search and intelligence — find, navigate, and understand code across all your repos

Code / DevToolsFreemium

Sourcegraph is an enterprise code intelligence platform for searching, navigating, and understanding large codebases across multiple repositories. Its code search indexes millions of files across GitHub, GitLab, Bitbucket, and self-hosted repos — enabling regex and structural search across the entire organization's code. Cody (AI assistant) and Batch Changes (automated codebase refactoring) are built on top.

Key specs
16,000 GitHub stars source
as of 2026-03-27

What we know

PricingFreemiumfrom our original listing, not yet re-checked

Why it matters

  • Cross-repository code search at scale solves the critical problem of finding all usages of a function, API, or pattern across an organization's entire codebase.
  • Structural search (Comby) enables syntax-aware queries that regex can't handle — find all callers of a function regardless of argument formatting.
  • Batch Changes automates large-scale migrations — update a deprecated API across 500 repos and open PRs in all of them simultaneously.
  • Cody AI assistant gains cross-repository codebase awareness from Sourcegraph's index — uniquely powerful for multi-service architectures.

Key capabilities

  • Universal code search: Regex, literal, and structural search across all repos simultaneously.
  • Cross-repo navigation: Go-to-definition and find-references across repository boundaries.
  • Structural search: Comby-based syntax-aware search patterns.
  • Batch Changes: Automated codebase refactoring with PR creation across all repos.
  • Code Insights: Visualize trends in the codebase — track how quickly deprecated APIs are removed.
  • Cody AI: AI coding assistant with full organizational codebase context.
  • Notebooks: Document code investigations and share findings as interactive notebooks.
  • Multi-host: GitHub, GitLab, Bitbucket, Gerrit, and self-hosted Git.

Technical notes

  • License: Apache 2.0 (self-hosted, open source)
  • GitHub: github.com/sourcegraph/sourcegraph (16K+ stars)
  • Deployment: Cloud (sourcegraph.com) or self-hosted (Docker Compose, Kubernetes)
  • Search: Regex, literal, structural (Comby), diff, commit search
  • Pricing: Free (10 users self-hosted); Enterprise cloud/self-hosted custom pricing
  • Company: Sourcegraph; San Francisco; founded 2013; raised $225M

Ideal for

  • Large engineering organizations with many repositories who need cross-repo search, navigation, and large-scale refactoring.
  • Platform engineering teams enforcing organization-wide coding standards and managing large-scale API migrations.
  • Teams adopting AI coding (Cody) who want the AI to have context across all repositories, not just the current one.

Not ideal for

  • Small teams with 1-3 repos — GitHub's built-in search is sufficient.
  • Teams who only need AI coding assistance — Cody can be used standalone without full Sourcegraph.
  • Organizations on a tight budget — enterprise pricing is significant.

See also

  • Sourcegraph Cody — The AI coding assistant built on Sourcegraph's code intelligence.
  • Cursor — AI IDE with local codebase context; less powerful for cross-repo scenarios.
  • GitHub Copilot Workspace — GitHub's AI for issue-to-PR automation; GitHub-native alternative.

FAQ

What is Sourcegraph?

Sourcegraph is a code search and intelligence platform. It indexes your entire organization's code — across GitHub, GitLab, Bitbucket, and self-hosted repos — and provides fast, powerful search (regex, structural, diff search). Beyond search, it shows code navigation (go-to-definition, find references) across repo boundaries, and includes Cody (AI coding assistant) and Batch Changes (automated refactoring across all repos).

Is Sourcegraph free?

Sourcegraph has a free cloud tier (sourcegraph.com) for searching public repositories. Self-hosted Sourcegraph is free for up to 10 users. Enterprise plans (5+ users on cloud, or self-hosted) require a commercial license. Cody (the AI assistant) has a separate free tier for individual developers. GitHub: github.com/sourcegraph/sourcegraph (16K stars, Apache 2.0).

What is Batch Changes in Sourcegraph?

Batch Changes is Sourcegraph's feature for making automated code changes across all repositories simultaneously. You write a script that describes the change (e.g., 'update all usages of deprecated API v1 to v2'), Sourcegraph applies it across all repos, and opens PRs in all affected repositories. Critical for large-scale migrations, dependency updates, and enforcing coding standards organization-wide.

How does Sourcegraph's structural search work?

Sourcegraph's structural search uses Comby — a syntax-aware search tool that understands code structure rather than raw text. You can write patterns like `fmt.Println(...)` to find all calls to that function with any arguments, regardless of formatting or whitespace. This is more powerful than regex for code because it understands language syntax boundaries.

Alternatives

Is your tool an alternative to Sourcegraph? Sponsor this spot for 30 days, marked Sponsored.

Integrations

None listed.

Built on

None listed.

Good for these tasks

For the team behind Sourcegraph

Growth plan: from $399 a month

SEO, AI search (how ChatGPT, Perplexity and Google describe Sourcegraph), UX, CRO and support from one account manager, with a monthly report. Includes a Featured launch on db.fyi. Starts with a free audit.

Founding offer: $299 a month for your first 3 months, plus a free case study.

Get a free audit

Listed 2026-02-22 · updated 2026-04-01