Skip to content
154.7k

BlogGuides

Cross-repository code search: find callers across repos

Cross-repository code search: find callers across repos

Cross-repository code search is how you find every caller of a shared function when the frontend lives in one repository and the backend lives in another. Sourcegraph is the usual answer for this job: Code Search can query every repository you can access, and precise navigation can follow a symbol into another repository when the indexes are in place. Graphify takes a different path. It combines the graphs of the repositories that actually talk to each other, then lets you list callers, shared types and review impact across that set. We make Graphify. Sourcegraph claims are from its own docs, read on 26 November 2026.

If you are choosing a Sourcegraph alternative for agents in general, start with Sourcegraph alternatives for AI coding agents. If you are leaving Cody, use the Cody alternatives guide. This post is only about cross-repository code search and blast radius.

What the job actually is

People typing this query usually want one of three outcomes:

  1. Find every place a shared function, type or API is used, across more than one repository, with a file and a line.
  2. Estimate the blast radius of a change before they rename or break a contract.
  3. Apply the follow up edit in every repository that needs it.

Text search and a code graph both help with (1) and (2). They fail in different ways. Search will match comments and miss a call made through an alias. A graph will miss dynamic or external callers, and it only knows the repositories you actually combined. Neither is a proof that a change is safe.

Sourcegraph Code Search finds code across every repository you can access, on every connected code host. You start with the words you expect to see, then narrow with filters such as repo:, file: and lang:. select:repo returns each matching repository once. type:diff searches commit changes instead of current code. Search contexts let you name a set of repositories and reuse that scope. Official docs also describe code monitors, saved searches, search jobs and editor extensions for VS Code and JetBrains.

The worked example in those docs is a good picture of the product: find deprecated datetime.utcnow() calls across Apache projects, then get the repository list, then look at the history of removals. Sourcegraph is honest that a regex search is still a text match. Comments and strings can match. A call through an alias can be missed. You review the results before you act.

Code Navigation sits next to search. Navigation based on search works without uploading a language index. Precise navigation uses SCIP indexes so "find references" and "go to definition" follow a symbol by identity, including into a library in another repository, when both sides are indexed with matching package and version information. Sourcegraph's own cross-repository code navigation post, dated 21 January 2026, is clear that this is not the same as multi repo text search.

When the next step is to change the code everywhere, Batch Changes coordinates patches across repositories and tracks the review in one place. Graphify does not ship a Batch Changes product. If that is the job, Sourcegraph is the tool that documents it.

How Graphify approaches the same question

Graphify is not a regex search box over an organization. It is a code graph you can query.

In the app you index each repository, then open Graphs, Cross-Repository and combine the ones that import, call or share types with each other. A combined graph can hold up to 100 repositories from your workspace. The cross repo cookbook is the step by step. Combining is deterministic. No model is involved. Graphify adds a calls edge when a call's receiver type is declared in another repository and resolves to exactly one declaration there, and a same_type_as edge when two repositories declare a type with the same namespace and name.

You can then search for a node by name, read its cross repo connections, and use What a change could affect at a depth of 1, 2 or 3. That view is a structural over-estimate. It lists what depends on the node in the loaded graph, not what will break. When a pull request lands in one of those repositories, the review includes a Cross-repo impact section. A review reads at most 25 other repositories from the combined graph, at each one's latest indexed default branch.

The same idea exists locally. On public checkouts of pocketbase/pocketbase at 7f2773e and pocketbase/js-sdk at b190b36 (both 26 October 2026), we built two graphs and merged them:

bash
graphify merge-graphs   --into merged-graph.json   pocketbase/graph.json   js-sdk/graph.json

The backend graph had 9,213 nodes. The JS SDK graph had 480. The merge produced 9,693 nodes and 45,179 edges in about a second, the exact sum, with no same_type_as edges added for that pair. Querying RecordAuthResponse on the merged graph listed the same name in the JS SDK, in a Go helper, and in generated types, and asked which node you meant. That run is written up in trace one API across a frontend and backend repo. Results vary by codebase.

That limit is worth keeping in view. merge-graphs can add same_type_as edges when two repositories declare the same fully qualified type, and it can bind some cross repo member calls when the type and method line up. This pair did not give the CLI enough to do that. You still get one graph and one query, instead of two.

The multi repo code graph post covers the hosted path in more depth.

Sourcegraph and Graphify at a glance

JobSourcegraphGraphify
Search text, regex, paths and commit history across every accessible repositoryYes, that is what Code Search is for.No. You query the repositories you have indexed and combined.
Find a symbol's definition or references across repositoriesYes, with navigation based on search, or with precise SCIP navigation when both sides are indexed.Yes, as graph queries and impact lists on a combined graph, for the edges the graph actually has.
File and line for a shared nameSearch results and navigation both return locations.The CLI and the app return file and line for the nodes they know. A shared name can match more than one node, and the CLI asks you to pick.
Open follow up patches in many repositoriesBatch Changes is built for this.Not a Batch Changes product. You use the impact list as a test and edit plan.
Local, no accountYou can run a Sourcegraph instance, including self hosted setups described in its docs. That is an instance, not a laptop CLI.uv tool install graphifyy, then graphify update and graphify merge-graphs. No account.
Pull request blast radiusYou search, then review. Multi repo impact during review is not the core Code Search product.When repositories are combined, the pull request review includes a Cross-repo impact section.

When Sourcegraph may fit better

Sourcegraph may fit better when you need to search across a whole organization, including diffs and commit history, precise go to definition and find references across indexed dependencies, or Batch Changes to open patches in many repositories at once. It may also fit better when you already run a Sourcegraph instance and want agents and people to search that same index.

If the question is "which of our 200 repositories still call this deprecated helper?", Sourcegraph's search and select:repo are the direct tool. Graphify will not invent a regex index over repositories you never combined.

When Graphify may fit better

Graphify may fit better when the repositories that matter already talk to each other, and you want one map of callers, shared types and review impact, including a local merge you can run with no account. It may also fit better when coding agents should ask the same graph over MCP, rather than each agent running its own search. For a rename that only spans a known frontend and backend pair, start by combining those two and listing the callers, as in the PocketBase walkthrough above.

For AI code review and downstream impact, rather than search, see AI code review and change impact analysis.

Try it

Connect the repositories at app.graphify.com, combine the ones that share types or calls, and ask what a change in one repository reaches in the others.

Prefer to stay local? Run uv tool install graphifyy, build a graph in each repository, and merge them with graphify merge-graphs. Related reading: trace one API across a frontend and backend repo, multi repo code graph, and Sourcegraph alternatives for AI coding agents.

FAQ

If the job is to search text, regular expressions, diffs and commit history across every repository you can access, Sourcegraph Code Search is built for that. If the job is to combine the graphs of related repositories and list callers, shared types and review impact, Graphify is the better fit.

Can Graphify search every repository in an organization the way Sourcegraph does?

No. Graphify combines the repositories you index and add to a combined graph, up to 100 in one graph, and a pull request review reads at most 25 other repositories from that graph. It is not a regex search box over every repository on a code host.

How does Sourcegraph find references across repositories?

Sourcegraph offers navigation based on search, which works without a language index, and precise navigation, which uses SCIP indexes to resolve a symbol by identity rather than by a matching name. Precise definitions and references across repositories need indexes for both repositories, with matching package and version information, and access to the target repository.

Can I do cross-repository code search locally with Graphify?

Yes, for the repositories you build graphs for. Run graphify update in each repository, merge the graph.json files with graphify merge-graphs, and query the merged graph for the shared name. The CLI will list matching nodes in both repositories and ask you to pick one when the name is shared.

When might Sourcegraph fit better than Graphify?

Sourcegraph may fit better when you need to search across a whole organization, including diffs and commit history, precise go to definition and find references across indexed dependencies, or Batch Changes to open patches in many repositories at once. It may also fit better when you already run a Sourcegraph instance and want agents and people to search that same index.

Use Graphify in your agent

Add Graphify to ChatGPT, Claude, Cursor, Grok Bot and more in one click.

Try Graphify now.

Try for free