| name | dotnet-inspect |
| description | Query .NET APIs across NuGet packages, platform libraries, and local files. Search for types, list API surfaces, compare versions, find extension methods and implementors. Use whenever you need to answer questions about .NET library contents. |
dotnet-inspect
Query .NET library APIs — the same commands work across NuGet packages, platform libraries (System., Microsoft.AspNetCore.), and local .dll/.nupkg files.
When to Use This Skill
- "What types are in this package?" —
find searches by glob pattern
- "What's the API surface?" —
api lists types, members, signatures, type shape
- "What changed between versions?" —
diff classifies breaking/additive changes
- "What extends this type?" —
extensions finds extension methods/properties
- "What implements this interface?" —
implements finds concrete types
- "What does this type depend on?" —
depends walks the type hierarchy upward
- "What version/metadata does this have?" —
package and library inspect metadata
- "Show me something cool" —
demo runs curated showcase queries
Search Scope
Search commands (find, extensions, implements, depends) work across all of .NET:
dnx dotnet-inspect -y -- find "Chat*"
dnx dotnet-inspect -y -- find "Chat*" --platform
dnx dotnet-inspect -y -- find "Chat*" --extensions
dnx dotnet-inspect -y -- find "Chat*" --aspnetcore
dnx dotnet-inspect -y -- find "Chat*" --platform --extensions
dnx dotnet-inspect -y -- find "Chat*" --package Foo
dnx dotnet-inspect -y -- find "Chat*" --platform --package Foo
Scope flags are combinable — use multiple flags to widen the search. --package works on all commands. api, library, diff also accept --platform <name> for a specific platform library.
Examples by Task
List API surface
dnx dotnet-inspect -y -- api System.Text.Json
dnx dotnet-inspect -y -- api System.Text.Json JsonSerializer
dnx dotnet-inspect -y -- api 'HashSet<T>' --platform System.Collections --shape
dnx dotnet-inspect -y -- api JsonSerializer --package System.Text.Json -m Serialize
Search for types
dnx dotnet-inspect -y -- find "*Handler*" --package System.CommandLine
dnx dotnet-inspect -y -- find "Option*,Argument*,Command*" --package System.CommandLine --terse
dnx dotnet-inspect -y -- find "*Logger*"
Compare versions (migrations)
dnx dotnet-inspect -y -- diff --package System.CommandLine@2.0.0-beta4.22272.1..2.0.2
dnx dotnet-inspect -y -- diff --package System.Text.Json@9.0.0..10.0.0 --breaking
dnx dotnet-inspect -y -- diff JsonSerializer --package System.Text.Json@9.0.0..10.0.0
Find extensions, implementors, and dependencies
dnx dotnet-inspect -y -- extensions HttpClient
dnx dotnet-inspect -y -- extensions IServiceCollection
dnx dotnet-inspect -y -- implements Stream
dnx dotnet-inspect -y -- implements IDisposable --platform
dnx dotnet-inspect -y -- depends 'INumber<TSelf>'
Explore with demo
dnx dotnet-inspect -y -- demo list
dnx dotnet-inspect -y -- demo 1
dnx dotnet-inspect -y -- demo --feeling-lucky
Inspect packages and libraries
dnx dotnet-inspect -y -- package System.Text.Json
dnx dotnet-inspect -y -- package System.Text.Json --versions
dnx dotnet-inspect -y -- package search "Azure.AI"
dnx dotnet-inspect -y -- library System.Text.Json
dnx dotnet-inspect -y -- library ./bin/MyLib.dll
Search with prefix scoping
dnx dotnet-inspect -y -- find "Chat*" --package-prefix Azure.AI
dnx dotnet-inspect -y -- extensions IChatClient --package-prefix Microsoft.Extensions.AI
Command Reference
| Command | Purpose |
|---|
api | Public API surface — types, members, signatures, --shape for hierarchy |
find | Search for types by glob pattern across any scope |
diff | Compare API surfaces between versions — breaking/additive classification |
extensions | Find extension methods/properties for a type |
implements | Find types implementing an interface or extending a base class |
depends | Walk the type dependency hierarchy upward (interfaces, base classes) |
package | Package metadata, files, versions, dependencies, search for NuGet discovery |
library | Library metadata, symbols, references, dependencies |
demo | Run curated showcase queries — list, invoke, or feeling-lucky |
Key Syntax
- Generic types need quotes:
'Option<T>', 'IEnumerable<T>'
- Positional args for
api: api <source> <type> <member> (not flags)
- Diff ranges use
..: --package System.Text.Json@9.0.0..10.0.0
- Signatures include
params and default values from metadata
Installation
Use dnx (like npx). Always use -y and -- to prevent interactive prompts:
dnx dotnet-inspect -y -- <command>
Full Documentation
For comprehensive syntax, edge cases, and the flag compatibility matrix:
dnx dotnet-inspect -y -- llmstxt