Sourcegraph is a free, self-hosted code search and intelligence server that helps developers find, review, understand, and debug code. Use it with any Git code host for teams from 1 to 10,000+. Upgraded features start at $5/user/month.
Quickstart: Run this command, wait for the server to be ready, then visit http://localhost:7080.
docker run --publish 7080:7080 --rm --volume ~/.sourcegraph/config:/etc/sourcegraph --volume ~/.sourcegraph/data:/var/opt/sourcegraph -v /var/run/docker.sock:/var/run/docker.sock sourcegraph/server:2.7.6
Search in files and diffs using simple terms, regular expressions, and other filters.
Syncs repositories with your code host and supports searching any commit/branch, with no indexing delay.
Use regular expressions and exact queries to perform full-text searches. Our robust query syntax helps you easily narrow your search.
Search across 1-10,000+ repositories (at large scale, the Data Center deployment becomes necessary).
Your search results are always up-to-date. Search any branch or commit with no indexing delay.
Search over symbols, commit diffs, and commit messages.
Code intelligence makes browsing code easier, with IDE-like hovers, go-to-definition, and find-references on your code, powered by language servers based on the open-source Language Server Protocol.
It even works in code review diffs on GitHub and Phabricator with our browser extensions.
Code intelligence is powered by language servers based on the open-standard Language Server Protocol (published by Microsoft, with participation from Facebook, Google, Sourcegraph, GitHub, RedHat, Twitter, Salesforce, Eclipse, and others). Visit langserver.org to learn more about the Language Server Protocol, find the latest support for your favorite language, and get involved.
Create a dashboard of saved searches to monitor important code changes: edits to security-sensitive files, new usages of a risky API, references to a deprecated library, new JavaScript files, etc. Tech leads and engineering managers will find this feature especially valuable.
As you grow to hundreds or thousands of users and repositories, graduate from the single-server deployment to a highly scalable cluster with Sourcegraph Data Center.