Use usages to find who references a file, directory, or entity inside a scope.
It reports real references, not unused imports or text matches.
For broad impact checks, target-local usages are hidden automatically when the target is inside a wider scope.
Use includeTarget only when references inside the target file or directory matter.

Good for:
- checking impact before changing behavior
- finding consumers of an entity or module area
- confirming whether extracted or renamed code still has callers
- getting caller locations or caller code without broad file scans

Use locations for broad impact checks.
Use code when usage count is small or caller context matters now.

Controls:
target, scope, entity, entities, parent, detail, limit, all, save, includeTarget

Specific:
includeTarget  include references inside the target file/directory; +includeTarget

Prefs:
inspect.usages.maxLocations
inspect.usages.maxCodeBlocks

Run:
aib inspect --stdin

Input:
{
  "op": "usages",
  "target": "src/service.ts",
  "entities": [
    "createService",
    { "parent": "Service", "entities": ["render", "reset"] }
  ],
  "scope": ["src/app", "src/tests"],
  "detail": "locations",
  "save": "service-usages"
}

inspect usages src/service.ts createService --scope src --detail locations [--limit N] [--all] [--save name]

Expand saved usages by focusing the reusable usages index:
inspect usages --from-file aib:usages:service-usages --focus createService --detail code

Use the saved usages handle with --from-file/from to focus or expand the reusable index.

Directory target:
Run:
aib inspect --stdin

Input:
{
  "op": "usages",
  "target": "src/shared",
  "scope": ["src/app", "src/renderer"],
  "detail": "summary",
  "save": "shared-usages"
}
