Sourcegraph: Difference between revisions

Content deleted Content added
m Removed reference to SaaS licensing to fix grammar.~~~~
wording
 
(33 intermediate revisions by 16 users not shown)
Line 1:
{{Short description|Code intelligence platform}}{{Multiple issues|
{{Notability|Companies|date=January 2023}}{{Update|reason=The logo changed and Code Search is no longer open source|date=June 2025}}
{{Multiple issues|
{{Notability|1=Companies|date=January 2023}}
{{Advert|date=January 2023}}
}}
{{Infobox softwarecompany
| name = Sourcegraph
| logo = Sourcegraph-logo-light.svg
| logo_upright = <!-- default: 1 -->
| logo_size = 250px
| logo_alt =
| developer = Sourcegraph, Inc.
| releasedlogo_caption = 2013
| type = [[Privately held company|Private]]
| latest release version = 4.3.0
| industry = [[Information technology]]
| latest release date = 16 December 2022
| predecessor = <!-- or: predecessors = -->
| repo = https://github.com/sourcegraph/sourcegraph
| founded = <!-- if known: {{Start date and age|YYYY|MM|DD}} in [[city]], country -->2013
| programming language = [[Go (programming language)|Go]], [[TypeScript]]
| founder = <!-- or: founders = -->Quinn Slack and Beyang Liu
| operating system = [[Microsoft Windows]], [[Linux]], [[MacOS]]
| defunct = <!-- {{End date|YYYY|MM|DD}} -->
| genre = [[Software intelligence]]
| fate =
| license = Sourcegraph OSS: [[Apache License|Apache 2.0]], Sourcegraph Enterprise: [[Proprietary software|Proprietary]]
| successor = <!-- or: successors = -->
| hq_location_city =
| hq_location_country =
| area_served = <!-- or: areas_served = -->
| key_people =
| products = Cody, Code Search
| owner = <!-- or: owners = -->
| num_employees =
| num_employees_year = <!-- Year of num_employees data (if known) -->
| parent =
| website = {{URL|https://about.sourcegraph.com}}
}}
'''Sourcegraph Inc.''' is a company developing code search and code intelligence tools that semantically index and analyze large codebases so that they can be searched across commercial, [[Open source|open-source]], local, and cloud-based [[Information repository|repositories]].<ref name="lwn">{{Cite web |last=Hoyt |first=Ben |date=2020-08-17 |title=Searching code with Sourcegraph |url=https://lwn.net/Articles/828748/ |access-date=2022-10-03 |website=LWN.net}}</ref>
 
'''Sourcegraph'''The iscompany ahas codetwo searchproducts and code intelligence tool that semanticallyavailable: indexesCody and analyzesCode largeSearch. codebasesCode soSearch thatwas theyinitially canreleased bein searched2013 acrossunder commercial,the [[Openname source|open-source]]Sourcegraph, local,but andwas cloud-basedrebranded [[Informationto repository|repositories]].<refCode name="lwn">{{CiteSearch webwhen |last=Hoytthe |first=Bencompany |date=2020-08-17unveiled |title=SearchingCody codein with Sourcegraph |url=https://lwn2023.net/Articles/828748/ |access-date=2022-10-03Both |website=LWN.net}}</ref> Sourcegraphproducts supportssupport all major programming languages.<ref>{{Cite web |url=https://about.sourcegraph.com/blog/sourcegraph-3.0 |title=Announcing Sourcegraph 3.0 |last=Slack |first=Quinn |date=2019-02-08 |website=Sourcegraph official website |access-date=2022-11-18}}</ref>
 
== History ==
Sourcegraph Inc. was developedfounded in by [[Stanford University|Stanford]] graduates Quinn Slack and Beyang Liu to drive the development of a code search and code intelligence tool, formerly called Sourcegraph. It was first released in 2013.<ref name="vb1">{{Cite web |last=Sawers |first=Paul |date=2020-03-03 |title=Sourcegraph raises $23 million to bring universal code search to all developers |url=https://venturebeat.com/business/sourcegraph-raises-23-million-to-bring-universal-code-search-to-all-developers/ |access-date=2022-11-18 |website=VentureBeat}}</ref><ref name="at">{{Cite web |last=Salter |first=Jim |date=2020-10-01 |title=Sourcegraph: Devs are managing 100x more code now than they did in 2010 |url=https://arstechnica.com/gadgets/2020/10/sourcegraph-devs-are-managing-100x-more-code-now-than-they-did-in-2010/ |access-date=2022-11-18 |website=Ars Technica}}</ref> Partlybut was rebranded to Code Search in 2023. It was partly inspired by Liu's experience using [[Google Code Search]] while he was a Google intern,<ref name="cl">{{Cite podcast |url=https://changelog.com/podcast/217 |title=Sourcegraph the 'Google for Code' |website=Changelog |host=Adam Stacoviak |date=2016-08-16 |access-date=2022-11-21 }}</ref> SourcegraphIt was developeddesigned to "tackle the big code problem" by enabling developers to manage large [[codebase]]s that span multiple repositories, programming languages, file formats, and projects.<ref name="vb2">{{Cite web |last=Sawers |first=Paul |date=2020-12-03 |title=Sourcegraph raises $50 million to tackle 'big code' problems with universal search |url=https://venturebeat.com/business/sourcegraph-raises-50-million-to-tackle-big-code-problems-with-universal-search/ |access-date=2022-11-21 |website=VentureBeat}}</ref>
 
Code Search was initially self-hosted by each customer on their own infrastructure.<ref name="vb4">{{Cite web |last=Sawers |first=Paul |date=2021-08-19 |title=Sourcegraph plans to index the entire open source web |url=https://venturebeat.com/business/sourcegraph-plans-to-index-the-entire-open-source-web/ |access-date=2022-10-03 |website=VentureBeat |language=en-US}}</ref> Early customers included [[Uber]], [[Dropbox]], and [[Lyft]].<ref name="vb4" /><ref>{{Cite web |url=https://about.sourcegraph.com/blog/enterprise-cloud |title=Sourcegraph Cloud: secure, scalable, dedicated instances for enterprises |last=Slack |first=Quinn |date=2022-09-27 |access-date=2022-11-21 |website=Sourcegraph Blog}}</ref> In 2016, Code Search was criticized<ref>{{Cite web |url=https://www.techrepublic.com/article/fair-source-licensing-is-the-worst-thing-to-happen-to-open-source-definitely-maybe/ |title=Fair Source licensing is the worst thing to happen to open source-definitely maybe |last=Asay |first=Matt |date=2016-04-01 |access-date=2022-11-21 |website=TechRepublic|archive-url=https://web.archive.org/web/20211107170119/https://www.techrepublic.com/article/fair-source-licensing-is-the-worst-thing-to-happen-to-open-source-definitely-maybe/ |archive-date=2021-11-07 }}</ref> for being provided with a Fair Source License with the developers explaining<ref>{{cite report |first=Nadia |last=Eghbal |date=2016 |title=Roads and bridges. The Unseen labor behind our digital infrastructure |url=http://brochures.sisalp.fr/roads-and-bridges-the-unseen-labor-behind-our-digital-infrastructure.pdf |pages=94–95 |access-date=2022-12-14}}</ref><ref>{{Cite web |title=Fair Source License |url=https://fair.io/?a |access-date=2022-11-21 |website=Fair Source License official website}}</ref><ref name="cl" /> that "all of Sourcegraph's source code is publicly available and hackable"<ref>{{Cite web |title=The Sourcegraph developer release: A better way to discover and understand code |url=https://about.sourcegraph.com/blog/the-sourcegraph-developer-release-a-better-way-to-discover-and-understand-code |date=2016-05-30 |access-date=2022-11-21 |website=Sourcegraph Blog |language=en}}</ref> and was intended to "help open sourcers strike a balance between getting paid and preserving their values".<ref>{{Cite magazine |url=https://www.wired.com/2016/03/former-open-sourcers-ask-companies-pay-fair-share/ |title=One Startup's Heretical Plan to Turn Open Source Code Into Cash |last=Finley |first=Klint |date=2016-03-29 |access-date=2022-11-21 |magazine=Wired}}</ref> In 2018, Code Search was licensed under the [[Apache License|Apache License 2.0]],<ref name="dc">{{Cite web |last=Schmidt |first=Julia |date=2018-10-02 |title=Sourcegraph pulls back the curtain, becomes open source project |url=https://devclass.com/2018/10/02/sourcegraph-becomes-open-source-project/ |access-date=2022-11-21 |website=DevClass}}</ref><ref>{{Cite podcast |url=https://futureofcoding.org/episodes/032.html |title=Basic Developer Human Rights: Quinn Slack |website=Future of Coding |host=Steve Krouse |date=2019-10-24 |access-date=2022-11-21}}</ref> and Sourcegraph OSS has since been released under the Apache License 2.0. The commercial version, Code Search Enterprise, has been released under its own license.<ref>{{Cite web |title=Licensing |url=https://handbook.sourcegraph.com/departments/engineering/product/process/gtm/licensing/#sts=Talking%20about%20license,%20plans,%20users |access-date=2022-11-21 |website=Sourcegraph Handbook}}</ref> In 2023, Code Search was criticized<ref>{{Cite web |title=Seriously, don't sign a CLA |url=https://drewdevault.com/2023/07/04/Dont-sign-a-CLA-2.html |access-date=2023-07-05 |website=drewdevault.com}}</ref> for dropping the Apache license for most of its code, leaving it public but only available under its Enterprise license.<ref>{{Cite web |title=relicense all paths other than MIT licensed code, client/cody*, jetbr… · sourcegraph/sourcegraph@3cd931e |url=https://github.com/sourcegraph/sourcegraph/commit/3cd931ef54407c966fc3a5940a06f0b95a7aadd0 |access-date=2023-07-05 |website=GitHub |language=en}}</ref>
Sourcegraph can be used to search and analyze all of an organization's code.<ref name="at"/> During search indexing, the platform builds a global reference graph, which maps an entire codebase and enables functionality such as "go to definition".<ref>{{Cite web |url=https://thenewstack.io/google-that-code-how-sourcegraph-simplifies-development/ |title=Google That Code: How Sourcegraph Simplifies Development |last=Ramji |first=Sam |date=2022-12-22 |access-date=2023-02-20 |website=The New Stack}}</ref>
 
In 2019, Code Search was integrated into the [[GitLab]] codebase, giving GitLab users access to a [[Web browser|browser]]-based developer platform.<ref>{{Cite web |title=Native code intelligence is coming to GitLab |url=https://about.gitlab.com/blog/2019/11/12/sourcegraph-code-intelligence-integration-for-gitlab/ |access-date=2022-10-03 |website=GitLab |language=en}}</ref> In 2021, a browser-based portal became available, allowing users to browse open-source projects and personal private code for free.<ref name="vb4" />
Sourcegraph software was initially self-hosted by each customer on their own infrastructure.<ref name="vb4">{{Cite web |last=Sawers |first=Paul |date=2021-08-19 |title=Sourcegraph plans to index the entire open source web |url=https://venturebeat.com/business/sourcegraph-plans-to-index-the-entire-open-source-web/ |access-date=2022-10-03 |website=VentureBeat |language=en-US}}</ref> Early customers included [[Uber]], [[Dropbox]], and [[Lyft]].<ref name="vb4"/><ref>{{Cite web |url=https://about.sourcegraph.com/blog/enterprise-cloud |title=Sourcegraph Cloud: secure, scalable, dedicated instances for enterprises |last=Slack |first=Quinn |date=2022-09-27 |access-date=2022-11-21 |website=Sourcegraph Blog}}</ref>
In 2022, Sourcegraph Cloud, a commercial single-tenant cloud solution for organizations with more than 100 developers, was launched.<ref>{{cite web |last=Slack |first=Quinn |date=2022-08-27 |title=Sourcegraph Cloud: secure, scalable, dedicated instances for enterprises |url=https://about.sourcegraph.com/blog/enterprise-cloud |access-date=2022-12-05 |website=Sourcegraph}}</ref><ref name="vb4" />
 
Sourcegraph has raised a total of almost $225 million in financing to date. Its most recent $125 million Series D investment in 2021 valued the company at $2.625 billion, a 300% growth from its previous valuation in 2020.<ref name="tc2">{{Cite web |last=Miller |first=Ron |date=2021-07-13 |title=Sourcegraph raises $125M Series D on $2.6B valuation for universal code search tool |url=https://techcrunch.com/2021/07/13/sourcegraph-raises-125m-series-d-on-2-6b-valuation-for-universal-code-search-tool/ |access-date=2022-10-03 |website=TechCrunch |language=en-US}}</ref>
In 2016, Sourcegraph was criticized<ref>{{Cite web |url=https://www.techrepublic.com/article/fair-source-licensing-is-the-worst-thing-to-happen-to-open-source-definitely-maybe/ |title=Fair Source licensing is the worst thing to happen to open source-definitely maybe |last=Asay |first=Matt |date=2016-04-01 |access-date=2022-11-21 |website=TechRepublic}}</ref> for being provided with a Fair Source License with the developers explaining<ref>{{cite report |first=Nadia |last=Eghbal |date=2016 |title=Roads and bridges. The Unseen labor behind our digital infrastructure |url=http://brochures.sisalp.fr/roads-and-bridges-the-unseen-labor-behind-our-digital-infrastructure.pdf |pages=94–95 |access-date=2022-12-14}}</ref><ref>{{Cite web |title=Fair Source License |url=https://fair.io/?a |access-date=2022-11-21 |website=Fair Source License official website}}</ref><ref name="cl" /> that "all of Sourcegraph’s source code is publicly available and hackable"<ref>{{Cite web |title=The Sourcegraph developer release: A better way to discover and understand code |url=https://about.sourcegraph.com/blog/the-sourcegraph-developer-release-a-better-way-to-discover-and-understand-code |date=2016-05-30 |access-date=2022-11-21 |website=Sourcegraph Blog |language=en}}</ref> and was aimed to "help open sourcers strike a balance between getting paid and preserving their values".<ref>{{Cite magazine |url=https://www.wired.com/2016/03/former-open-sourcers-ask-companies-pay-fair-share/ |title=One Startup's Heretical Plan to Turn Open Source Code Into Cash |last=Finley |first=Klint |date=2016-03-29 |access-date=2022-11-21 |magazine=Wired}}</ref> In 2018, Sourcegraph was licensed under the [[Apache License|Apache License 2.0]].<ref name="dc" /><ref>{{Cite podcast |url=https://futureofcoding.org/episodes/032.html |title=Basic Developer Human Rights: Quinn Slack |website=Future of Coding |host=Steve Krouse |date=2019-10-24 |access-date=2022-11-21}}</ref> and Sourcegraph OSS has since been released under the Apache License 2.0 while the commercial version, Sourcegraph Enterprise, has been released under its own license.<ref>{{Cite web |title=Licensing |url=https://handbook.sourcegraph.com/departments/engineering/product/process/gtm/licensing/#sts=Talking%20about%20license,%20plans,%20users |access-date=2022-11-21 |website=Sourcegraph Handbook}}</ref>
{| class="wikitable"
! Date
! Funding Type
! Money Raised (USD)
! No. of Investors
! Lead Investor
|-
| July 2021
| Series D round
| 125,000,000<ref name="tc2" />
| 4
| [[Andreessen Horowitz]]
|-
| December 2020
| Series C round
| 50,000,000<ref name="vb22">{{Cite web |last=Sawers |first=Paul |date=2020-12-03 |title=Sourcegraph raises $50 million to tackle 'big code' problems with universal search |url=https://venturebeat.com/business/sourcegraph-raises-50-million-to-tackle-big-code-problems-with-universal-search/ |access-date=2022-11-21 |website=VentureBeat}}</ref>
| 1
| [[Sequoia Capital]]
|-
| July 2020
| Series B round
| 5,000,000<ref>{{Cite web |date=2020-07-15 |title=Sourcegraph Raises Additional $5M in Series B Funding |url=https://www.finsmes.com/2020/07/sourcegraph-raises-additional-5m-in-series-b-funding.html |access-date=2022-10-03 |website=FINSMES}}</ref>
| 1
| Felicis Ventures
|-
| March 2020
| Series B round
| 23,000,000<ref name="vb12">{{Cite web |last=Sawers |first=Paul |date=2020-03-03 |title=Sourcegraph raises $23 million to bring universal code search to all developers |url=https://venturebeat.com/business/sourcegraph-raises-23-million-to-bring-universal-code-search-to-all-developers/ |access-date=2022-11-18 |website=VentureBeat}}</ref>
| 3
| [[Craft Ventures]]
|-
| October 2017
| Series A round
| 20,000,000<ref>{{Cite web |date=2017-10-06 |title=Sourcegraph Raises $20M in Series A Funding |url=https://www.finsmes.com/2017/10/sourcegraph-raises-20m-in-series-a-funding.html |access-date=2022-12-05 |website=FINSMES}}</ref>
| 3
| Goldcrest Capital, [[Redpoint Ventures|Redpoint]]
|}
 
In 2023 Sourcegraph Inc. unveiled their new product Cody, and rebranded Sourcegraph to Code Search.
In 2019, Sourcegraph was integrated into the [[GitLab]] codebase, giving GitLab users access to a [[Web browser|browser]]-based developer platform.<ref>{{Cite web |title=Native code intelligence is coming to GitLab |url=https://about.gitlab.com/blog/2019/11/12/sourcegraph-code-intelligence-integration-for-gitlab/ |access-date=2022-10-03 |website=GitLab |language=en}}</ref>
 
== Products ==
In 2021, a browser-based portal became available enabling users to search open-source projects and personal private code for free.<ref name="vb4"/>
The company has two major products: Cody and Code Search.
In 2022, Sourcegraph Cloud, a commercial single-tenant cloud solution for organizations with over 100 developers, was launched.<ref>{{cite web |last=Slack |first=Quinn |date=2022-08-27 |title=Sourcegraph Cloud: secure, scalable, dedicated instances for enterprises |url=https://about.sourcegraph.com/blog/enterprise-cloud |access-date=2022-12-05 |website=Sourcegraph}}</ref><ref name="vb4"/>
 
=== ApplicationsSourcegraph Cody ===
Cody is a free and open-source AI coding assistant that can help users write, fix, and maintain your code. It works by understanding an entire codebase and using that knowledge to provide context-aware assistance. including code generation, debugging, commenting, documentation, explaining, and answering questions regarding the code. Cody is available for Microsoft Visual Studio Code and most JetBrains IDEs.
In research, Sourcegraph has been applied to develop [[data mining]] methods for [[Downstream (software development)|downstream]] [[Coupling (computer programming)|dependencies]]<ref>{{Citation |last1=Thiede |first1=Christoph |last2=Limberger |first2=Daniel |last3=Scheibel |first3=Willy |last4=Döllner |first4=Jürgen | contribution=Augmenting Library Development by Mining Usage Data from Downstream Dependencies | year=2022 |title=17th International Conference on Evaluation of Novel Approaches to Software Engineering |publisher=ENASE | contribution-url=https://www.scitepress.org/PublicationsDetail.aspx?ID=cXF3UOIDuTY=&t=1}}</ref> and to aid in the refactoring and translation of a program into its equivalent in a different programming language.<ref>{{Cite thesis |type=MSc |last= Haavisto |first= Juuso |date=2020 |title=Leveraging APL and SPIR-V languages to write network functions to be deployed on Vulkan compatible GPUs |publisher=Université de Lorraine |url=https://hal.inria.fr/hal-03155647/document |access-date=2022-12-15}}</ref>
 
=== Sourcegraph Code Search ===
Sourcegraph is used in the [[CERN]] Accelerator Control software community to index code, quickly search through it, and create statistics.<ref>{{cite journal |last1= Voirin |first1=R. |last2=Vanden Eynden |first2=M. |last3= Oulevey |first3=T. |date=2022 |title=The State of Containerization in CERN Accelerator Controls |url=https://cds.cern.ch/record/2809570 |journal=JACoW |volume=ICALEPCS |issue=2021 |pages=829–834 |doi=10.18429/JACoW-ICALEPCS2021-THBL03 |access-date=2022-12-15}}</ref>
{{Infobox software
| name = Code Search
| logo = Sourcegraph-logo-light.svg
| logo_size = 250px
| developer = Sourcegraph, Inc.
| released = 2013
| latest release version = 5.2.0
| latest release date = 3 October 2023
| repo = https://github.com/sourcegraph/sourcegraph
| programming language = [[Go (programming language)|Go]], [[TypeScript]]
| operating system = [[Microsoft Windows]], [[Linux]], [[MacOS]]
| genre = [[Software intelligence]]
| license = [[Proprietary software|Proprietary]]
| website = {{URL|https://about.sourcegraph.com}}
}}
 
Sourcegraph's "universal code search" tool is used to search, explore, and understand code.<ref name="vb1" /><ref>{{Cite web |last=Liu |first=Beyang |date=2020-01-15 |title=Sourcegraph: Universal code search and intelligence |url=https://www.infoworld.com/article/3514213/sourcegraph-universal-code-search-and-intelligence.html |website=InfoWorld |access-date=2022-12-05}}</ref> supports over 30 programming languages and integrates with GitHub and GitLab for code hosting, Codecov for code coverage, and Jira Software for project management.<ref name="auto5">{{Cite web |date=2020-04-03 |title=Q&A: Sourcegraph's Universal Code Search Tool |url=https://spectrum.ieee.org/sourcegraph-universal-code-search-tool |access-date=2022-10-03 |website=IEEE Spectrum |language=en}}</ref> Code Search can be implemented across multiple repositories and code hosting platforms. Searches can be [[Literal (computer programming)|literal]], [[regular expression]], or structural. The structural search syntax is language-aware and handles nested expressions and multi-line statements better than regular expressions.<ref name="lwn" /> Sourcegraph's Code Search uses a variant of Google's [[PageRank]] algorithm to rank results by relevance.<ref>{{Cite web |last=Yegge |first=Steve |date=2022-11-08 |title=Rethinking search results ranking on Sourcegraph.com |url=https://about.sourcegraph.com/blog/new-search-ranking |website=Sourcegraph |access-date=2022-12-06}}</ref> Code Search can be used to search and analyze all of an organization's code.<ref name="at" /> During search indexing, the platform builds a global reference graph, that maps an entire codebase and enables functionality such as "go to definition".<ref>{{Cite web |last=Ramji |first=Sam |date=2022-12-22 |title=Google That Code: How Sourcegraph Simplifies Development |url=https://thenewstack.io/google-that-code-how-sourcegraph-simplifies-development/ |access-date=2023-02-20 |website=The New Stack}}</ref> Features include:
In [[Computer security|cybersecurity]], Sourcegraph has been used for better insights into source code during penetration tests.<ref>{{cite book |last=Rehberger |first=Johann |year=2020 |title=Cybersecurity Attacks – Red Team Strategies: A practical guide to building a penetration testing program having homefield advantage |publisher=Packt Publishing Ltd |pages=216–224 |isbn=9781838825508}}</ref>
 
* Search: Code can be searched and navigated through the Sourcegraph web interface or through browser and [[Integrated development environment|IDE]] extensions and [[text editor]] plugins.<ref name="lwn" />
As of July 2021, some of Sourcegraph's customers include [[Adidas]], [[Lyft]], [[Uber]], [[Yelp]],<ref name="auto5">{{Cite web |date=2020-04-03 |title=Q&A: Sourcegraph's Universal Code Search Tool |url=https://spectrum.ieee.org/sourcegraph-universal-code-search-tool |access-date=2022-10-03 |website=IEEE Spectrum |language=en}}</ref> [[Plaid (company)|Plaid]], [[General Electric|GE]], [[Atlassian]],<ref name="tc">{{Cite web |last=Miller |first=Ron |date=2021-07-13 |title=Sourcegraph raises $125M Series D on $2.6B valuation for universal code search tool |url=https://techcrunch.com/2021/07/13/sourcegraph-raises-125m-series-d-on-2-6b-valuation-for-universal-code-search-tool/ |access-date=2022-10-03 |website=TechCrunch |language=en-US}}</ref> [[Amazon (company)|Amazon]], [[PayPal]], [[Qualtrics]], and [[Cloudflare]].<ref name="vb2" />
* Navigation: jumps to the definition of a variable or function, or find all references to it in a codebase.<ref name="lwn" />
* Batch Changes: Enables developers and companies to automate and track large-scale code refactoring, security fixes, and migrations across repositories and code hosts.<ref>{{Cite web |date=2021-03-24 |title=Sourcegraph Batch Changes Offers Automation for Large-Scale Code Changes |url=https://www.dbta.com/Editorial/News-Flashes/Sourcegraph-Batch-Changes-Offers-Automation-for-Large-Scale-Code-Changes-145930.aspx |access-date=2023-02-08 |website=Database Trends and Applications |language=en-US}}</ref>
* Code Insights: Extracts data from a codebase to provide detailed analytics and visualizations to track the health and progress of a code project.<ref>{{Cite web |last=Sawers |first=Paul |date=2022-03-10 |title=With Code Insights, Sourcegraph gives developers a better understanding of their codebase |url=https://venturebeat.com/dev/with-code-insights-sourcegraph-gives-developers-a-better-understanding-of-their-codebase/ |access-date=2022-10-03 |website=VentureBeat |language=en-US}}</ref>
Code search has received adoption by such various sectors as
* Research: Code search has been used to develop [[data mining]] methods for [[Downstream (software development)|downstream]] [[Coupling (computer programming)|dependencies]]<ref>{{Citation |last1=Thiede |first1=Christoph |title=17th International Conference on Evaluation of Novel Approaches to Software Engineering |year=2022 |contribution=Augmenting Library Development by Mining Usage Data from Downstream Dependencies |contribution-url=https://www.scitepress.org/PublicationsDetail.aspx?ID=cXF3UOIDuTY=&t=1 |publisher=ENASE |last2=Limberger |first2=Daniel |last3=Scheibel |first3=Willy |last4=Döllner |first4=Jürgen}}</ref> and to assist in refactoring and translating a program into its equivalent in another programming language.<ref>{{Cite thesis |type=MSc |last=Haavisto |first=Juuso |date=2020 |title=Leveraging APL and SPIR-V languages to write network functions to be deployed on Vulkan compatible GPUs |publisher=Université de Lorraine |url=https://hal.inria.fr/hal-03155647/document |access-date=2022-12-15}}</ref>
* Physics: Code search is used in the [[CERN]] Accelerator Control software community to index, quickly search, and generate statistics on code.<ref>{{cite journal |last1=Voirin |first1=R. |last2=Vanden Eynden |first2=M. |last3=Oulevey |first3=T. |date=2022 |title=The State of Containerization in CERN Accelerator Controls |url=https://cds.cern.ch/record/2809570 |journal=JACoW |volume=ICALEPCS |issue=2021 |pages=829–834 |doi=10.18429/JACoW-ICALEPCS2021-THBL03 |access-date=2022-12-15}}</ref>
* [[Cybersecurity]]: Code search has been used to gain better insight into source code during penetration testing.<ref>{{cite book |last=Rehberger |first=Johann |title=Cybersecurity Attacks – Red Team Strategies: A practical guide to building a penetration testing program having homefield advantage |publisher=Packt Publishing Ltd |year=2020 |isbn=9781838825508 |pages=216–224}}</ref>
 
As of July 2021, Code search customers include [[Adidas]], [[Lyft]], [[Uber]], [[Yelp]],<ref name="auto5" /> [[Plaid (company)|Plaid]], [[General Electric|GE]], [[Atlassian]],<ref name="tc">{{Cite web |last=Miller |first=Ron |date=2021-07-13 |title=Sourcegraph raises $125M Series D on $2.6B valuation for universal code search tool |url=https://techcrunch.com/2021/07/13/sourcegraph-raises-125m-series-d-on-2-6b-valuation-for-universal-code-search-tool/ |access-date=2022-10-03 |website=TechCrunch |language=en-US}}</ref> [[Amazon (company)|Amazon]], [[PayPal]], [[Qualtrics]], and [[Cloudflare]].<ref name="vb2" />
== Core features ==
The core Sourcegraph product has two versions:<ref>{{Cite web |title=Sourcegraph Enterprise vs. Sourcegraph Open Source (Sourcegraph OSS) |url=https://handbook.sourcegraph.com/departments/ce-support/ce/onboarding/enterprise-vs-oss/ |access-date=2022-11-21 |website=Sourcegraph Handbook}}</ref>
* Sourcegraph Open Source (Sourcegraph OSS), which is free to use and only includes Sourcegraph's universal code search functionality.
* Sourcegraph Enterprise (previously Sourcegraph Data Center<ref name="dc">{{Cite web |url=https://devclass.com/2018/10/02/sourcegraph-becomes-open-source-project/ |title=Sourcegraph pulls back the curtain, becomes open source project |last=Schmidt |first=Julia |date=2018-10-02 |website=DevClass |access-date=2022-11-21}}</ref>), which includes the Sourcegraph code intelligence platform and has a free tier for a limited number of users.
 
Code can be searched and navigated from the Sourcegraph web [[User interface|UI]] or using browser and [[Integrated development environment|IDE]] extensions and [[text editor]] plugins.<ref name="lwn"/> Sourcegraph supports over 30 programming languages and integrates with GitHub and GitLab for code hosting, Codecov for code coverage, and Jira Software for project management.<ref name="auto5"/>
 
=== Code Search ===
Sourcegraph's "universal code search" tool is used to search, explore, and understand code.<ref name="vb1"/><ref>{{Cite web |last=Liu |first=Beyang |date=2020-01-15 |title=Sourcegraph: Universal code search and intelligence |url=https://www.infoworld.com/article/3514213/sourcegraph-universal-code-search-and-intelligence.html |website=InfoWorld |access-date=2022-12-05}}</ref> Search can be implemented across multiple repositories and code hosting platforms. Search can be [[Literal (computer programming)|literal]], [[regular expression]], or structural. Structural search syntax is language-aware and handles nested expressions and multi-line statements better than regular expressions.<ref name="lwn"/> Sourcegraph's Code Search uses a variation of Google's [[PageRank]] algorithm to rank results by relevance.<ref>{{Cite web |last=Yegge |first=Steve |date=2022-11-08 |title=Rethinking search results ranking on Sourcegraph.com |url=https://about.sourcegraph.com/blog/new-search-ranking |website=Sourcegraph |access-date=2022-12-06}}</ref>
 
=== Code Navigation ===
Sourcegraph's Code Navigation feature can be used to jump to the definition of a variable or function, or find all references to it in a codebase.<ref name="lwn"/>
 
=== Batch Changes ===
Sourcegraph's Batch Changes feature allows developers and companies to automate and track large-scale code refactors, security fixes, and migrations across repositories and code hosts.<ref>{{Cite web |date=2021-03-24 |title=Sourcegraph Batch Changes Offers Automation for Large-Scale Code Changes |url=https://www.dbta.com/Editorial/News-Flashes/Sourcegraph-Batch-Changes-Offers-Automation-for-Large-Scale-Code-Changes-145930.aspx |access-date=2023-02-08 |website=Database Trends and Applications |language=en-US}}</ref>
 
=== Code Insights ===
Sourcegraph's Code Insights feature extracts data from a codebase to provide detailed analytics and visualizations to track the state and progress of a code project.<ref>{{Cite web |last=Sawers |first=Paul |date=2022-03-10 |title=With Code Insights, Sourcegraph gives developers a better understanding of their codebase |url=https://venturebeat.com/dev/with-code-insights-sourcegraph-gives-developers-a-better-understanding-of-their-codebase/ |access-date=2022-10-03 |website=VentureBeat |language=en-US}}</ref>
 
== Ownership ==
The software is developed by a company of the same name and has raised a total of almost $225 million in financing to date.
 
== See also ==
{{Div col|colwidth=30em|content=
* [[Software as a service|SaaS]]
* [[SaaS]]
* [[Code reviewing software|Code review software]]
* [[Code reviewing software]]
* [[Intelligent code completion]]
* [[Generative AI]]
* [[Model Context Protocol]]
}}
 
== References ==
{{Reflist}}
 
 
 
[[Category:Database management systems]]
[[Category:Code search engines]]
[[Category:Applications of artificial intelligence]]
[[Category:Formerly open-source or free software]]