Convert Figma logo to code with AI

oracle logoopengrok

OpenGrok is a fast and usable source code search and cross reference engine, written in Java

4,337
745
4,337
524

Top Related Projects

5,640

Lightning fast code searching made easy

1,692

Fast trigram based code search

Performant type-checking for python.

Quick Overview

OpenGrok is an open-source, fast, and powerful source code search and cross-reference engine. It helps developers quickly search, cross-reference, and navigate large codebases. OpenGrok is designed to be scalable and can handle projects of any size, from small to very large.

Pros

  • Fast and efficient source code indexing and searching
  • Supports a wide range of programming languages and version control systems
  • Provides a user-friendly web interface for easy navigation and exploration
  • Highly customizable and extensible

Cons

  • Can be resource-intensive for very large codebases
  • Initial setup and configuration may be complex for some users
  • Requires regular index updates to maintain accuracy
  • Limited built-in authentication and access control features

Getting Started

To set up OpenGrok, follow these steps:

  1. Install Java 11 or later
  2. Download the latest OpenGrok release from GitHub
  3. Extract the archive and navigate to the OpenGrok directory
  4. Run the following command to index your source code:
java -jar opengrok.jar -c /path/to/ctags -s /path/to/source -d /path/to/data -W /path/to/configuration.xml
  1. Start the OpenGrok web application:
java -jar opengrok.jar --nogc
  1. Access the OpenGrok web interface at http://localhost:8080/source

For more detailed instructions and configuration options, refer to the official OpenGrok documentation.

Competitor Comparisons

5,640

Lightning fast code searching made easy

Pros of Hound

  • Faster indexing and search performance, especially for large codebases
  • Real-time indexing of code changes, providing up-to-date search results
  • Simpler setup and configuration process

Cons of Hound

  • Limited language support compared to OpenGrok
  • Less comprehensive documentation and community support
  • Fewer advanced search features and customization options

Code Comparison

OpenGrok configuration example:

<project>
  <name>MyProject</name>
  <source-root>/path/to/source</source-root>
  <data-root>/path/to/data</data-root>
  <disable-repository>mercurial</disable-repository>
</project>

Hound configuration example:

{
  "max-concurrent-indexers": 2,
  "dbpath": "data",
  "repos": {
    "MyRepo": {
      "url": "https://github.com/example/repo.git"
    }
  }
}

Both projects aim to provide efficient code search capabilities, but they differ in their approach and feature set. OpenGrok offers more comprehensive language support and advanced features, making it suitable for large, complex projects. Hound, on the other hand, focuses on speed and simplicity, making it a good choice for teams that prioritize quick setup and real-time indexing. The choice between the two depends on specific project requirements and team preferences.

1,692

Fast trigram based code search

Pros of Zoekt

  • Faster indexing and search performance, especially for large codebases
  • Designed with distributed search in mind, allowing for better scalability
  • Supports fuzzy search and regular expressions out of the box

Cons of Zoekt

  • Less comprehensive documentation compared to OpenGrok
  • Fewer built-in analyzers for various programming languages
  • Lacks some advanced features like cross-referencing and history viewer

Code Comparison

Zoekt (Go):

func (s *Searcher) Search(ctx context.Context, q query.Q, opts *SearchOptions) (*SearchResult, error) {
    var res SearchResult
    err := s.searcher.Search(ctx, q, opts, &res)
    return &res, err
}

OpenGrok (Java):

public SearchResults search(HttpServletRequest req, Query query, String project) throws ParseException, IOException {
    SearchEngine engine = new SearchEngine();
    return engine.search(query, project);
}

Both projects aim to provide efficient code search capabilities, but they differ in implementation languages and specific features. Zoekt focuses on speed and distributed search, while OpenGrok offers a more comprehensive set of features for code analysis and navigation. The choice between the two depends on specific project requirements and infrastructure constraints.

Performant type-checking for python.

Pros of Pyre-check

  • Focused on static type checking for Python, providing more specialized functionality
  • Offers incremental type checking, improving performance for large codebases
  • Integrates well with other Facebook tools and workflows

Cons of Pyre-check

  • Limited to Python language support, whereas OpenGrok is language-agnostic
  • Smaller community and ecosystem compared to OpenGrok's broader user base
  • Less comprehensive documentation and tutorials available

Code Comparison

Pyre-check (Python type checking):

def greet(name: str) -> str:
    return f"Hello, {name}!"

result: str = greet("World")

OpenGrok (Language-agnostic code search):

public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello, World!");
    }
}

Summary

Pyre-check is a specialized tool for Python static type checking, offering incremental analysis and integration with Facebook's ecosystem. OpenGrok, on the other hand, is a more general-purpose code search and cross-referencing engine supporting multiple languages. While Pyre-check excels in Python type checking, OpenGrok provides broader language support and a larger community. The choice between the two depends on specific project requirements and the primary programming language used.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Copyright (c) 2006, 2024 Oracle and/or its affiliates. All rights reserved.

OpenGrok - a wicked fast source browser

Github actions build Coverage status SonarQube status License

1. Introduction

OpenGrok is a fast and usable source code search and cross reference engine, written in Java. It helps you search, cross-reference and navigate your source tree. It can understand various program file formats and version control histories of many source code management systems.

Official page of the project is on: https://oracle.github.io/opengrok/

2. Installation

See https://github.com/oracle/opengrok/wiki/How-to-setup-OpenGrok

2. 1. Updating

OpenGrok uses semantic versioning and the version components further indicate more details about updating to newer version. The version scheme is major.minor.micro and change in any component is interpreted as:

  • major - major backwards incompatible update, will require full reindex as well as configuration changes
  • minor - full clean reindex of your repositories is needed (e. g. index format has changed)
  • micro - redeploy web application

Generally it is possible to go backward only within the micro version.

3. Information for developers

See https://github.com/oracle/opengrok/wiki/Developer-intro and https://github.com/oracle/opengrok/wiki/Developers

4. Authors

The project has been originally conceived in Sun Microsystems by Chandan B.N.

For full list of contributors see https://github.com/oracle/opengrok/graphs/contributors

5. Contact us

Use the Github Discussions.

6. Run as container

You can run OpenGrok as a Docker container as described here.

Contributing

This project welcomes contributions from the community. Before submitting a pull request, please review our contribution guide

Security

Please consult the security guide for our responsible security vulnerability disclosure process

License

Copyright (c) 2006, 2024 Oracle and/or its affiliates.