CLI tool and Claude plugin to search and explore components, services, directives, and other constructs in Angular projects
npm install ng-explorerA CLI tool to efficiently search and explore Angular components, services, directives, and other constructs in Angular projects.
``bash`
npm install -g ng-explorer
For Claude Code users, install the plugin to enable the /ng-explorer skill:
`bashAdd the marketplace
/plugin marketplace add willmartian/claude-plugins
Once installed, you can use
/ng-explorer directly in your Claude Code sessions to search Angular constructs.Prerequisites
ng-explorer uses Compodoc under the hood. You need to generate the documentation first:`bash
From repository root
npx compodoc -p tsconfig.json -e json -d . --disablePrivate --disableProtected
`This creates a
documentation.json file in the repository root.Usage
$3
Search for Angular constructs by name, or omit the query to list all:
`bash
Fuzzy search for anything matching "foo"
ng-explorer fooList all components
ng-explorer --type componentSearch only components matching "foo"
ng-explorer foo --type componentSearch directives
ng-explorer tooltip --type directiveSearch in specific subdirectory
ng-explorer form --path "libs/common/src/components/**"Exact name match (no fuzzy search)
ng-explorer FooComponent --exactExact match with type filter
ng-explorer BarService --exact --type injectable
`$3
Show full API details using the
--verbose flag:`bash
View component API (exact match + verbose)
ng-explorer FooComponent --exact --verbose
`The verbose view shows:
- For Components: selector, standalone status, inputs, outputs, properties, methods, constructor dependencies
- For Services: properties, methods, constructor dependencies
- For Directives: selector, inputs, outputs, methods
- For Pipes: pipe name, pure status
$3
If your documentation.json is in a different location:
`bash
ng-explorer --doc-path /path/to/documentation.json foo
ng-explorer -d ./docs/documentation.json FooService --exact --verbose
`Command Reference
$3
Search for Angular constructs by name or list all constructs.
Arguments:
-
[query] - Search query string (optional - omit to list all)Options:
-
-d, --doc-path - Path to documentation.json file (default: ./documentation.json)
- -t, --type - Filter by type: component, injectable, directive, pipe, module, class, all (default: all)
- -p, --path - Filter by file path pattern (supports wildcards like apps/web/ or libs/common/)
- -l, --limit - Limit number of results (default: 50)
- -v, --verbose - Show full API details for each result
- -e, --exact - Use exact name matching instead of fuzzy searchExamples:
`bash
Fuzzy search
ng-explorer foo
ng-explorer bar --type injectableExact match
ng-explorer FooComponent --exactShow verbose API details
ng-explorer FooComponent --exact --verbose
ng-explorer foo --verboseCombine filters
ng-explorer foo --path "apps/web/**" --type componentCustom documentation path
ng-explorer -d ./docs/documentation.json foo
`Troubleshooting
$3
The documentation file may be corrupted. Try regenerating it:
`bash
rm documentation.json
npx compodoc -p tsconfig.json -e json -d . --disablePrivate --disableProtected
``GPL-3.0