scope
Set indexing scope by excluding vendor trees or including specific directories. Use a dry run to preview suggested exclusions before applying.
Instructions
Scope which files codegraph indexes for this project, then force-reindex. On a big
vendor monorepo this is the highest-leverage action - and it's YOURS to do for the user,
not theirs. Pass exclude to drop vendor trees (recommended: keeps ALL the user's code,
auto-includes anything they add later) or include to index ONLY listed dirs. Globs are
relative to the project root; * spans directories (e.g. "wp-content/plugins/woocommerce/*").
Merges with any existing config and writes /.codegraph/config.json. Apply an index()
scope_suggestion straight through here. Returns the new config + post-scope stats.
Call with NO include/exclude for an instant DRY RUN: a suggested exclude list derived from the directory layout (no indexing) - so you can scope a huge repo BEFORE paying for a full index, then apply it. Returns {"dry_run": True, "suggested_exclude": [...], "current": ...}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | No | . | |
| exclude | No | ||
| include | No |