Multi Repository Code Analysis With Cursor CLI

Hi

What is the best mechanism to provide multiple repositories into Cursor CLI. Cursor CLI supports only one workspace as an argument . But I have backend and multiple fronend repos to analyse together.

My thoughts are

  1. Clone all repos to a parent folder and provide that folder as the workspace -Token usage will be huge
  2. Any posibility of using subagents (subegent per-repo) - If possible please tell me how to set it up

Thanks

Hi Ish,

Right now the CLI takes a single workspace directory, so your options are:

1. Parent directory approach (your option 1) Clone all repos under one parent folder and point the CLI at that parent. To keep token usage manageable, add a .cursorignore file at the root to exclude repos or directories that aren’t relevant to the current task. This works today and is the simplest path.

2. Multi-root workspaces in the IDE If you can use the desktop IDE (rather than CLI), you can create a .code-workspace file listing multiple repo folders. The Agents Window supports multi-root workspaces, so the agent can work across all of them.

3. Subagents Subagents currently share the parent agent’s workspace directory, so they can’t independently target different repos. They’d still operate within whatever single workspace you provide.

Multi-repo support for cloud agents and the CLI/SDK is currently in development. You can follow the progress in this thread, which is the main community discussion on the topic:

Cloud Agents + Multiple Repositories (non-monorepo setup)