Code search that knows the difference between a name and a type.

Grep matches text. Moderne Code Search matches on resolved types, symbols, and dependencies across every repository in your organization, because it indexes the Lossless Semantic Tree, not the source files.

Built for coding agents and engineers working across large, multi-repository codebases. Code Search knows what your code resolves to and scopes results based on business units, teams, and portfolios.

One search across your whole codebase.

Use the Moderne Platform to search your whole codebase or any single organization in it. Every result draws on what the compiler knows about each symbol in your code. You can also add your own business context to that data.

Running a search
Moderne Platform Code Search: a search field (HttpClient.newBuilder lang:java file:src/main) over language tabs — Java, Kotlin, Python, JS/TS, Go, C#, Config — with example queries grouped under Text, Code and Dependencies, beside the Platform's Code search, Moddy, DevCenter, Marketplace, Builder and Deploy navigation.

Powered by Trigrep.

Trigrep combines trigram indexing with the grep workflow agents already use, and builds it on the Lossless Semantic Tree. Instead of scanning every file on every query, Trigrep uses a persistent index, built once and updated incrementally, so response time stays nearly constant as your codebase grows. That means replacing an agent’s grep-and-read loop with one symbol-aware search.

Execution time per search call in the same agent session, grep and glob vs. Trigrep.

Use cases

Search that understands symbols, types, and dependencies.

Trigrep builds its index from the Lossless Semantic Tree, so the agent can query structure, types, and dependencies directly instead of guessing from text. Filter by dependency to find every call into a library or version range, and see the exact artifact each match came from.

Filter reference
Code search results: a dependency query (dependency:com.fasterxml.jackson.core:jackson-databind lang:java) searching 49,356 of 56,619 repositories, with the matching import highlighted in a GitHub source file.

Agents use SQL to answer codebase questions in one call.

Agents can search your codebase using SQL to filter, join, and count matches with one single call. Instead of paging through matches, an agent asks how many repositories still use Spring 5 and gets the answer.

SQL search

Agents pull only the repositories your search matched.

When you save a search, it becomes a changeset scoped to just the repositories that matched. So if 47 of 10,000 repositories contain the code you need to change, your agent pulls down those 47, not all 10,000. The same search results act as a checklist for confirming every occurrence was changed.

Saving a search
Moderne Platform code search results for synchronized: a repository tree grouped by organization (Tencent, microsoft, apache) with result counts per repository, beside the matching lines highlighted in a Java source file from microsoft/team-explorer-everywhere.

Give your agents indexed, type-aware search instead of read after read.

Explore the open research

Moderne is building LSTs and their corresponding Trigrep indexes for millions of packages in public Maven, NPM, PyPI, and NuGet, so you can search and compare dependencies before pointing Code Search at your own code.

Search the Code Genome

See Code Search on your codebase

Code Search is available to all Moderne customers as a preview, from the Platform, the Moderne CLI, or your agent through MCP.

Contact sales

Frequently asked questions

Code Search is a high-speed, type-aware code search engine built for coding agents and engineers working across large, multi-repository codebases. Powered by Trigrep, it builds trigram indexes from your code and returns results in sub-second time, scoped to a business unit, team, or application portfolio as defined in Moderne.

grep and ripgrep scan raw files on every query, which slows down across large codebases and often forces follow-up reads to confirm a match has the right type. Code Search queries a prebuilt trigram index instead of scanning, and because that index is built from the Lossless Semantic Tree, results carry symbol and type data. A search returns semantically precise results in under a second, with no follow-up reads needed.

Code Search supports Sourcegraph query syntax (the default) and the original Zoekt syntax, plus Comby-style structural patterns. Because these are the same query languages widely documented online, AI models already trained on those tools can use Code Search without learning a new language. Searches support literal text, regular expressions, boolean operators, and structural matching.

Both. Code Search matches text quickly, and because its index is built from the Lossless Semantic Tree it adds structural awareness on top, so you can filter by symbol, return type, inheritance, and the dependency a type came from. Searches follow the type hierarchy, so a search for calls to a method also finds calls made through its subtypes. For questions about how values move through the code, such as data flow and taint analysis, Code Search hands off to recipes.

Agents call Code Search the same way they reach for grep today, through the Moderne CLI and MCP. A plain output mode returns one match per line (file, line number, and a short snippet) optimized for agents like Claude Code and Cursor. Because the first search is precise, agents orient faster and spend fewer tokens before the first line of automation runs.

Yes. A search can act as a prefilter for a recipe run, so a transformation processes only the repositories that contain a relevant pattern. If a search matches 47 of 10,000 repositories, the recipe run handles 47 instead of all 10,000. The same results also serve as a checklist to confirm the change reached every occurrence.

Code Search performs text, regex, and structural search across the languages Moderne indexes. For the current language coverage of semantic filters, see the Trigrep filter reference.

Code Search is available through the Moderne CLI and through Moderne’s MCP server, and it operates within the context of a Moderne organization. Indexes are built during the LST build process and stored alongside, so search is ready whenever an engineer or agent needs it.