“[It's] essential to be able to easily search [the] whole source … huge productivity boost: easy to find uses, defs, examples, etc.”
“Things...that clearly would have helped every software company I've ever worked at: … instant code search over the entire codebase”
“Software engineering is more about reading code than writing it, and part of this process is finding the code that you should read.”
“tbgs [Facebook's code search tool] is the StackOverflow for Facebook engineers”
“A substantial amount of my day is spent inside of Google's internal code search tool.”
“Sourcegraph [code search] … has made me insanely more productive and efficient at writing code here. I’m able to understand and deeply dive through all of our microservices and get my work done really fast.”— Lyft engineering manager
“[Sourcegraph] improves my productivity and ability to write clean code by 2-3x.”— Uber senior engineer
98% of Google developers say their Sourcegraph-like internal code search tool is "critical", according to an internal code search research study from Google and a Google developer survey. Contact us for more data and an code search ROI calculator.
Google's internal code search research study (Table 1) answers how Google developers use code search (5-10 times daily). Sourcegraph code search users report similar use cases and frequency.
|API consumer needs help||“I want to know how a function should be called”|
|Discover correct library for task||“Best way to convert output stream into a string of limited length”|
|Example to build off of||“Just want to copy-and-paste some code I'm changing”|
|How to do something||“How to write a hash function”|
|Check implementation details||“What does a particular script do?”|
|Browsing||“Re-familiarizing myself with some code referenced in a code review”|
|Check best practices||“Where are friend classes usually declared?”|
|Name completion||“I'm looking for an enum member that begins with a particular prefix”|
|Trace through call graph||“Where is this class instantiated?”|
|Sharing||“I'm trying to create a link to a known piece of code, to give to someone else”|
|Locations in source||“Where are all the environment configurations declared?”|
|Why is something failing?||“Wondering why my change didn't fix a problem in production and am reading the code to diagnose”|
|Understanding dependencies||“Looking for dependencies of a build file”|
|Side effects of a proposed change||“Am I about to blow up production with my change?”|
|Trace code history||“Who last touched this code?”|
|Responsibility||“Who is allowed to approve changes to this file?”|
Convinced of the value of code search? Now see why Sourcegraph is the code search tool used by elite software teams.
Just type your query into Sourcegraph, and it'll find matches. It supports regular expressions, punctuation, exact matches, and much more. Use the visual query builder to narrow down your search and get familiar withsearch syntax for next time.
Find what you're looking for in a few hundred milliseconds, even across 10,000s of repositories or in a massive 40 GB monorepo. We're maniacal about making Sourcegraph fast. You can also quickly refine your search using suggested filters, to narrow down results by repository, language, directory, orcustom scopes.
Find the definition or callers of functions and anything else in code, even across package, dependency, and repository boundaries. Even if your IDE can do this, Sourcegraph lets you explore code intelligently in your web browser in any repository on any branch, instantly and without losing your local context. Works for 24 programming languages.
Look through diffs and commit messages to see recent changes related to a specific function or error message. DevOps teams and SREs find this especially useful when responding to incidents, to find out what code changes might be responsible and who to loop in.
Other code search tools limit you to searching a single branch and often have stale results from hours ago. With Sourcegraph's hybrid search (combining indexed and on-the-fly), you can search any branch and any commit. The code is always up-to-date, and you never need to wait for indexing.
Curious what other code search tools exist? Check out our code search tool comparison guide.
Sourcegraph is built for companies of all sizes, from startups that need a solid foundation for growth, all the way to the largest enterprises with complex security, scaling, and deployment needs.
10,000s of developers and repositories on Sourcegraph? You're in good company. Not at that scale? You'll still benefit from the robustness.
We provide outstanding support whenever you need it, including deployment assistance and help integrating custom dev tools with Sourcegraph.
Self-manage your organization's Sourcegraph instance, or let us manage it for you (on our secure infrastructure or your cloud provider sub-account).