PROVIDER - Cross-repository code search and intelligence
Sourcegraph
Sourcegraph searches across repositories in seconds at 100000 repository scale with 3 search styles, code intelligence for 30 or more languages, 6 or more code host integrations and Batch Changes spanning many repositories; the gaps are heavy self-hosting and free-tier limits.
4.2pts
Detailed Notes
Pros 5 items
Cons 4 items
Service Overview
Sourcegraph is a search and code intelligence platform for large codebases, turning many scattered repositories into one queryable whole.
In the development tools category it is the code knowledge layer: it answers questions like which repositories reference a piece of logic, filling the blind spot of single-repository IDEs.
Key Strengths
- Cross-repo search: seconds at scale
- Multiple query styles: regex, structural, symbol
- Code intelligence: 30 or more languages
- Broad host support: 6 or more integrations
- Batch changes: one job, many repos
Product Ecosystem
Platform capabilities
Cross-repository search, code intelligence and navigation, search context and result aggregation, Batch Changes, code insight dashboards and permission integration.
Integrations
Supports GitHub, GitLab, Bitbucket, Gerrit, Perforce and local file system repositories, and connects to VS Code, JetBrains and a CLI.
Typical scenarios
Reference audits before large refactors, cross-repo dependency mapping, vulnerability impact analysis and onboarding onto unfamiliar codebases.
Limitations
- Resource cost: self-hosted indexing is expensive
- Free tier limits: private repos and users capped
- Maintenance complexity: large instance upgrades are non-trivial
- Feature tiers: AI and deep analysis are paid
Use Cases
- Very large codebase search (★★★★★): the core scenario
- Cross-repo refactor assessment (★★★★★): impact at a glance
- Small single-repo teams (★★☆☆☆): IDE search suffices
- Fully offline intranets (★★★☆☆): feasible but costly
Pricing
| Item | Price | Notes |
|---|---|---|
| Free tier | $0 | Unlimited public code search |
| Enterprise | Annual per user | Private repositories and team features |
| Self-hosted | Licence plus infrastructure | Indexing and storage costs apply |
FAQ
How is it different from IDE search?
Sourcegraph searches across repositories and projects, while IDEs usually cover the current workspace.
Can it be self-hosted?
Yes, it deploys inside your own infrastructure for compliance needs.
What are Batch Changes?
Declarative configuration raises pull requests across many repositories and tracks review progress.
Can it search private repositories?
Yes, through code host integrations with permission syncing.
Code Examples
# Cross-repository search from the CLI
src search 'repo:^github\.com/org/ lang:go context.WithTimeout'
# Structural search example
src search 'repo:has.file(go.mod) patternType:structural func $F($X *http.Request)'
# Batch Changes spec (excerpt)
name: bump-go-version
on:
- repositoriesMatchingQuery: repo:^github\.com/org/ file:go.mod
steps:
- run: |
sed -i 's/^go 1\.21$/go 1.22/' go.mod
container: alpine:3.20
Community & Resources
- Website: https://sourcegraph.com/
- Documentation: https://sourcegraph.com/docs
- Source repository: https://github.com/sourcegraph/sourcegraph
Articles
- 01 GitLab CI/CD Best Practices: From Beginner to Production-Grade Pipelines 07-18
- 02 Prometheus Monitoring System Setup: From Metric Collection to Alert Notifications 07-18
- 03 Ansible Automation Ops Guide: From Configuration Management to Application Deployment 07-18
- 04 Docker Beginner Tutorial: From Installation to Containerized Web Deployment 07-18
- 05 API Integration Guide: REST vs GraphQL Comparison and Selection 07-18
- 06 GitHub Actions CI/CD Tutorial: Automated Build, Test, and Deployment 07-18
- 07 Docker Compose Multi-Container Deployment: Building Complete Application Orchestration 07-18
- 08 Kubernetes Deployment Guide for Beginners: Building a K8s Cluster from Scratch 07-18
- 09 Best VS Code Extensions 2026: Boost Your Development Productivity 07-18
- 10 Frontend Toolchain 2026: Vite / Next.js / Tailwind CSS Ecosystem 07-18