# Inspect Duplicates

Use duplicates to find repeated top-level names and exact declaration copies.
It is useful when many files may contain copied local helpers, duplicated types, or repeated declarations.

Start with summary for broad scopes.
Use locations when you need files/lines.
Use code only for duplicate names you are ready to inspect.

Controls:
scope, detail, limit, offset, kinds, entities, exclude, pathExclude

Specific:
entities    only these duplicate names/selectors
exclude     skip these names/selectors
pathExclude skip files or path/glob-like patterns
kinds       selector kinds, e.g. f, t, c, etc.; kinds=[...]

Summary scan:
Run:
aib inspect --stdin

Input:
duplicates scope=src detail=sum limit=20

Skip noisy duplicate names:
Run:
aib inspect --stdin

Input:
duplicates scope=src detail=sum exclude=[Props,Options] limit=20

Skip files by path/glob-like pattern:
Run:
aib inspect --stdin

Input:
duplicates scope=src detail=loc pathExclude=[src/generated,"**/* copy.ts"] limit=20

Inspect specific duplicate code:
Run:
aib inspect --stdin

Input:
duplicates scope=src detail=code getBoolean WsOptions

For broad cleanup, start with summary.
Switch to code only for the duplicate names you are ready to inspect.

Filter by several names:
Run:
aib inspect --stdin

Input:
duplicates scope=src detail=code getBoolean WsOptions normalizeConfig

Skip names that are known noise:
Run:
aib inspect --stdin

Input:
duplicates scope=src detail=sum exclude=[Props,Options] limit=20

Skip files by path/glob-like pattern:
Run:
aib inspect --stdin

Input:
duplicates scope=@svc detail=loc pathExclude=[src/generated,"**/*.test.ts","**/* copy.ts"] limit=20

exclude filters duplicate names/selectors.
pathExclude skips files or path/glob-like patterns.
