News

GitHub Previews Improved Code Search: 'Way More than grep'

GitHub is inviting developers to take part in a technology preview of improved code search, which it describes as "way more than grep," the Linux command-line search utility.

The project has its own web site and a temporary interface separate from GitHub.com, though functionality may be baked into IDEs and code editors later, with GitHub asking developers what tools would make good candidates for integration.

One aspect of the project is improved search syntax, which differs from the regular GitHub.com search syntax with introduction of new operators for regular expression and symbol searching.

GitHub Code Search
[Click on image for larger view.] GitHub Code Search (source: GitHub).

In these early stages, the project's search index covers more than 5 million popular public code repos, including private ones for which a user has access. The initial list of programming languages in which symbol extraction is supported (more to be added) includes C#, Python, Go, Java, JavaScript, TypeScript, PHP, Protocol Buffers, Ruby and Rust.

Viewing Code
[Click on image for larger view.] Viewing Code (source: GitHub).

Functionality highlighted by the Microsoft-owned development platform include:

  • Easily find what you're looking for among the top results, with smart ranking and an index that is optimized for code.
  • Search for an exact string, with support for substring matches and special characters, or use regular expressions (enclosed in / separators).
  • Scope your searches with org: or repo: qualifiers, with auto-completion suggestions in the search box.
  • Refine your results using filters like language:, path:, extension: and Boolean operators (OR, NOT). Search for definitions of a symbol with symbol:.
  • Get your bearings quickly with additional features, like a directory tree view, symbol information for the active scope, jump-to-definition, select-to-search, and more!

Access to the technology preview is limited, and developers can apply to be put on the waitlist here.

Going forward, GitHub plans to experiment with scoring and ranking heuristics to find the best approach, explore the most potentially impactful APIs and integrations and add support for more languages to the language-specific features.

"For code search, our vision is to help every developer search, discover, navigate, and understand code quickly and intuitively," the company said. "GitHub code search puts the world's code at your fingertips: everything is just a search away. It helps you maintain a flow state by showing you the most relevant results first and helping you with auto-completion at every step. And once you get to a result page, the rich browsing experience is optimized for reading and understanding code, allowing you to make sense of unfamiliar logic quickly, even for code outside your IDE."

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Mastering Blazor Authentication and Authorization

    At the Visual Studio Live! @ Microsoft HQ developer conference set for August, Rockford Lhotka will explain the ins and outs of authentication across Blazor Server, WebAssembly, and .NET MAUI Hybrid apps, and show how to use identity and claims to customize application behavior through fine-grained authorization.

  • Linear Support Vector Regression from Scratch Using C# with Evolutionary Training

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the linear support vector regression (linear SVR) technique, where the goal is to predict a single numeric value. A linear SVR model uses an unusual error/loss function and cannot be trained using standard simple techniques, and so evolutionary optimization training is used.

  • Low-Code Report Says AI Will Enhance, Not Replace DIY Dev Tools

    Along with replacing software developers and possibly killing humanity, advanced AI is seen by many as a death knell for the do-it-yourself, low-code/no-code tooling industry, but a new report belies that notion.

  • Vibe Coding with Latest Visual Studio Preview

    Microsoft's latest Visual Studio preview facilitates "vibe coding," where developers mainly use GitHub Copilot AI to do all the programming in accordance with spoken or typed instructions.

  • Steve Sanderson Previews AI App Dev: Small Models, Agents and a Blazor Voice Assistant

    Blazor creator Steve Sanderson presented a keynote at the recent NDC London 2025 conference where he previewed the future of .NET application development with smaller AI models and autonomous agents, along with showcasing a new Blazor voice assistant project demonstrating cutting-edge functionality.

Subscribe on YouTube