A fast and usable source code search and cross reference engine
open sourceCDDL-1.0self-hostablefree
OpenGrok is a self-hosted source code search and cross-reference engine: it indexes your source trees, understands many programming languages and file formats, and reads history from many version control systems, so people can full-text search code, jump to definitions and references, and browse annotated history in a web UI. It's written in Java and runs in a servlet container like Tomcat with Universal ctags, or as a Docker container, and has a REST API. Oracle hosts the project on GitHub, volunteers maintain it, and it's licensed CDDL-1.0.
Problems it solves
- search and cross-reference a huge C codebase in the browser
- self-hosted code search over many repositories inside our network
- find where a function is defined and every place it's called across our source tree
- browse the history and blame of files from old version control systems like Subversion or Perforce
- an internal code browser for legacy source code that isn't on GitHub
Features
- full-text source code search
- cross-referencing: definitions and references
- understands many programming languages and file formats
- history from many version control systems
- web UI for browsing source trees
- Docker image
- REST API (OpenAPI spec in the repository)
Limitations
- Needs Java 17+, a servlet container such as Tomcat 10+ and Universal ctags to run outside Docker1
Capabilities
| Has an API | plan not known |
|---|
Alternatives
The same job
These do what OpenGrok does.
- Hound Lightning fast code searching made easy
- Sourcegraph Code understanding for humans and agents
- livegrep Fast interactive regex search over large source code repositories
- Zoekt Fast trigram-based code search engine
