Understand and search across your entire codebase

Understand, fix, and automate across your codebase with Sourcegraph's code intelligence platform

Product or installation questions? Talk to an expert.

Amazon logoGE logoQualtrics logoDropbox logoNutanix logoPaypal logoUber logoPlaid logoReddit logoCloudflare logoMercado Libre logoLyft logoCanva logoShipt logo

Over 1.2M engineers use Sourcegraph to build software you rely on

Learn how our customers use Sourcegraph

Move fast — even in big codebases

Improve code security

Find, fix, and track vulnerable code quickly across your entire codebase.

Learn more about code security

Onboard developers

Decrease time to first commit with codebase onboarding and knowledge sharing.

Learn more about onboarding

Resolve incidents

Identify the root cause in code and fix the issue everywhere, faster.

Learn more about incident response

Promote code reuse

Find existing code for reuse and contribute to a more coherent codebase.

Learn more about code reuse

Boost code health

Improve code health with large-scale changes, and track key initiatives.

Learn more about code health

Want to use Sourcegraph at your company?

Get started for free with up to 10 teammates or request a demo to learn about our enterprise plan and to see Sourcegraph in your own environment.Request a demo

How teams use Sourcegraph

Sourcegraph's code intelligence platform is built with features that help you understand, fix, and automate across your entire codebase.

code search

Find what you need: any code host, language, or repository

Use Code Search to find what you need, across thousands of repositories and multiple code hosts, in milliseconds.

  • Search for snippets, commits, dependencies, or errors across your entire codebase
  • Create code monitors to be alerted when known vulnerabilities or undesirable code is introduced
  • Access all of your team's code in one place; never get stuck searching one repository or code host at a time
Learn more about Code Search
code intelligence

Navigate your codebase and your dependencies

Follow symbol definitions and references across packages, dependencies, and repositories seamlessly.

  • Traverse your entire codebase with cross-repository 'Go to definition' and 'Find references'
  • Navigate your code in your web browser to see any commit, on any branch, of any repository instantly
  • Follow dependencies across repositories with confidence using precompiled data for speed and precision
Learn more about Code Intelligence
batch changes

Automate large-scale code changes

Batch Changes allows you to automate code changes across your entire codebase. Move fast and fix things safely.

  • Update legacy code, remove outdated patterns, and fix critical security issues across multiple repositories
  • Track changes across your codebase without maintaining spreadsheets of places that need to be updated
  • Automate fixing breaking changes introduced by library or package updates
Learn more about Batch Changes
code insights

Track what really matters to you and your team

With Code Insights, know how different initiatives in your codebase are progressing in real time so you can make data-driven decisions.

  • Track migrations, code smells, ownership, and versions with fully customizable dashboards
  • Ensure that security vulnerabilities and deprecated packages get completely removed from your codebase
  • Create visualizations that update automatically, provide historical trends, and pull directly from the source of truth: the code itself
Learn more about Code Insights

Works with your code, infrastructure, and tools

All your repositories + 2M open source (and counting)

  • GitLab.com
  • GitLab Enterprise
  • GitHub.com
  • GitHub Enterprise
  • Bitbucket Server
  • Bitbucket Data Center
  • Bitbucket Cloud
  • Phabricator
  • Gitolite
  • Gerrit (coming soon)
  • Perforce
  • CVS
  • Any git-based code host
  • Have a repository not covered here?

All your languages

  • Java
  • Python
  • Go
  • JavaScript
  • TypeScript
  • C#
  • C
  • C++
  • Swift
  • Objective-C
  • Kotlin
  • Ruby
  • Scala
  • Rust
  • Perl
  • Dart
  • Erlang
  • COBOL
  • Clojure
  • Lisp
  • Shell
  • Terraform
  • Lua
  • GraphQL
  • Thrift
  • Protobuf
  • YAML
  • JSON
  • Jsonnet
  • R
  • PHP
  • Elixir
  • Haskell
  • PowerShell
  • OCaml
  • CUDA
  • Pascal
  • Verilog
  • VHDL
  • Groovy
  • Tcl
  • Need a different language?

All your tools

Deployment options

  • Self-hosted by you: Kubernetes cluster Amazon EKS or EC2 Google GKE Microsoft Azure AKS Docker Compose
  • Managed and hosted by us: Docker Compose in GCP
  • Learn about deploying Sourcegraph

Self-hosted deployment

Install Sourcegraph locally

docker run --publish 7080:7080 --publish 127.0.0.1:3370:3370 --rm --volume ~/.sourcegraph/config:/etc/sourcegraph --volume ~/.sourcegraph/data:/var/opt/sourcegraph sourcegraph/server:3.39.1Deploy to a server or cluster

Why choose self-hosted?

  • Free for up to 10 users
  • Your code never leaves your server
  • Connect to private code hosts (and local installs)
  • Access advanced functionality, like Code Insights and Batch Changes
Learn about self-hosted vs Cloud features
Need help setting up Sourcegraph?
Talk to an engineer