Skip to content

[Feature Request] Support configuring extra search/indexing paths in a single project #499

@huangxingx

Description

@huangxingx

Description

Currently, codegraph init and the underlying MCP server only support tracking and indexing a single project root directory. In multi-repo or microservice architectures, we often have multiple peer directories (e.g., project-A, project-B, project-C) where project-A depends on code from B and C.

When working inside project-A, the AI agent cannot access the context of B and C unless we initialize CodeGraph in their common parent directory and open the entire parent folder in our IDE/Agent. However, this forces the agent to index all other unrelated peer directories and disrupts the workflow of focusing on a specific project.

Proposed Solution

It would be highly beneficial if CodeGraph could support configuring extra indexing paths. This could be achieved via:

  1. An option in the CLI, such as codegraph init --include /path/to/project-B
  2. Or a project-level configuration file (e.g., .codegraph/config.json) where users can specify an array of extra paths to include:
{
  "includePaths": [
    "../project-B/src",
    "../project-C/src"
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions