Skip to content

About

C# CLI tool to inspect public API documentation from any NuGet package -- decompile types with XML docs, compare API between versions, resolve dependencies

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

nuget-docs

Inspect public API documentation from any NuGet package — decompile types with XML docs, compare API between versions, resolve dependencies. Built for AI agents and CLI workflows.

AI Agent Skill (Recommended)

Install as a skill so your AI coding agent automatically knows when and how to inspect NuGet packages:

npx skills add tryAGI/nuget-docs -g

Works with Claude Code, Cursor, Windsurf, and other AI coding agents. This teaches your agent to run nuget-docs commands when you ask questions like "what methods does IChatClient have?" or "show me the ChatOptions class".

CLI Installation

dotnet tool install -g nuget-docs

Quick Start

# See all public types in a package
nuget-docs list Microsoft.Extensions.AI.Abstractions

# Decompile a type with full XML docs (short names work)
nuget-docs show Microsoft.Extensions.AI.Abstractions IChatClient

# Search for types/members
nuget-docs search Microsoft.Extensions.AI.Abstractions "Chat*"

# Compare API between versions
nuget-docs diff Microsoft.Extensions.AI.Abstractions --from 10.3.0 --to latest

Commands

list — List all public types

nuget-docs list Microsoft.Extensions.AI.Abstractions
nuget-docs list Newtonsoft.Json --namespace Newtonsoft.Json.Linq
nuget-docs list Humanizer --all          # include internal types
nuget-docs list AWSSDK.EC2 --limit 50    # cap the listing (default: 200, 0 = all)
nuget-docs list Newtonsoft.Json --deprecated    # only [Obsolete] types
nuget-docs list Microsoft.Extensions.AI.Abstractions --experimental  # only [Experimental] types
nuget-docs list Newtonsoft.Json --format table  # aligned columns
nuget-docs list Newtonsoft.Json --format csv    # CSV output

Capped at 200 types by default so a huge package can't flood an agent's context — uncapped, list AWSSDK.EC2 is 5,572 lines. When truncated it prints ... and N more (use --limit 0 to show all, or --namespace to narrow).

show — Decompile a type with XML docs

nuget-docs show Microsoft.Extensions.AI.Abstractions IChatClient
nuget-docs show Newtonsoft.Json JsonConvert --member SerializeObject
nuget-docs show Newtonsoft.Json JsonConvert --signatures  # member signatures, no bodies
nuget-docs show AWSSDK.EC2 AmazonEC2Client --max-lines 0  # full source (default cap: 1000 lines)
nuget-docs show Newtonsoft.Json --assembly  # assembly-level attributes

Short names work — IChatClient resolves to Microsoft.Extensions.AI.IChatClient. Use --member to show a specific member (all overloads). Use --assembly to inspect assembly attributes.

Capped at 1,000 lines by default — show AWSSDK.EC2 AmazonEC2Client is 24,550 lines (~1.6 MB) uncapped. --signatures (-s) gives a bodiless overview instead (JsonConvert: 78 lines vs 972).

search — Search types and members

nuget-docs search Microsoft.Extensions.AI.Abstractions "Chat*"
nuget-docs search Newtonsoft.Json "*Token*" --namespace Newtonsoft.Json.Linq
nuget-docs search Newtonsoft.Json "*Token*" --format table  # aligned columns
nuget-docs search Newtonsoft.Json "*Convert*" --format csv  # CSV output
nuget-docs search AWSSDK.EC2 "*SecurityGroup*" --limit 50   # cap results (default: 200, 0 = all)
nuget-docs search Newtonsoft.Json "*Binder*" --deprecated   # only [Obsolete] matches

Uses glob patterns (* and ? wildcards). Results show [Kind.MemberKind] labels. Capped at 200 results by default; the header reads Results: 833 (showing 200) when truncated.

diff — Compare API between versions

# Full unified diff with hunk headers
nuget-docs diff Microsoft.Extensions.AI.Abstractions --from 10.3.0 --to 10.4.0

# Use "latest" to auto-resolve the latest version
nuget-docs diff Microsoft.Extensions.AI.Abstractions --from 10.3.0 --to latest

# Compare latest stable vs latest prerelease
nuget-docs diff Microsoft.Extensions.AI.Abstractions --from latest-stable --to latest-prerelease

# Quick summary — added/removed types only
nuget-docs diff Microsoft.Extensions.AI.Abstractions --from 10.4.0 --to 10.4.1 --type-only

# Breaking changes only
nuget-docs diff Microsoft.Extensions.AI.Abstractions --from 10.3.0 --to 10.4.0 --breaking

# Member-level changes (methods/properties)
nuget-docs diff Microsoft.Extensions.AI.Abstractions --from 10.4.0 --to 10.4.1 --member-diff

# Skip additive changes — show only removals/modifications
nuget-docs diff Microsoft.Extensions.AI.Abstractions --from 10.4.0 --to 10.4.1 --no-additive

# Ignore XML doc comment changes
nuget-docs diff Microsoft.Extensions.AI.Abstractions --from 10.4.0 --to 10.4.1 --ignore-docs

Exit codes: 0 = no breaking changes, 1 = error, 2 = breaking changes detected (useful for CI).

info — Package metadata

nuget-docs info Newtonsoft.Json

Shows package ID, version, authors, description, license, frameworks, and dependencies.

deps — Dependency tree

nuget-docs deps Microsoft.Extensions.AI
nuget-docs deps Microsoft.Extensions.AI --depth 3  # transitive
nuget-docs deps Microsoft.Extensions.AI --limit 50 # cap nodes (default: 200, 0 = all)
nuget-docs deps Microsoft.Extensions.AI --format table  # aligned columns
nuget-docs deps Microsoft.Extensions.AI --format csv    # CSV output

Tree-style output with ├──/└── connectors. Shared dependencies marked (already listed). Use --format table or --format csv for flat tabular output.

versions — List available versions

nuget-docs versions Humanizer
nuget-docs versions Humanizer --stable       # stable only
nuget-docs versions Humanizer --prerelease   # prerelease only
nuget-docs versions Humanizer --latest       # latest stable + prerelease
nuget-docs versions Newtonsoft.Json --since 13.0.1           # versions after 13.0.1
nuget-docs versions Newtonsoft.Json --since 13.0.1 --stable  # stable only, after 13.0.1
nuget-docs versions Newtonsoft.Json --count --since 13.0.1   # just the count (for CI)
nuget-docs versions WindowsAzure.Storage --deprecated       # show deprecation info
nuget-docs versions Humanizer --limit 50     # show more (default: 20, 0 = all)
nuget-docs versions Humanizer --format table            # aligned columns
nuget-docs versions Humanizer --format csv              # CSV output

Common options

Option Short Description
--version <ver> -v Pin to a specific package version (latest, latest-stable, latest-prerelease)
--framework <tfm> -f Target framework (auto-detected by default)
--all -a Include internal/private members
--namespace <prefix> -n Filter by namespace prefix
--limit <n> -l Maximum rows for list/search/deps (default: 200, 0 = all) and versions (default: 20, 0 = all)
--max-lines <n> Maximum source lines for show (default: 1000, 0 = all)
--signatures -s show only: member signatures without bodies
--deprecated list/search: only [Obsolete] API. On versions: registry deprecation info
--experimental list/search: only [Experimental] API (MEAI001, SKEXP0001, …)
--format <fmt> Output format for list/search/versions/deps/diff: grouped (default), table, csv
--deprecated Show deprecation/vulnerability info (for versions)
--json -j JSON output (shorthand for --output json)
--output json -o json JSON output for programmatic use

Features

  • Inspects any public NuGet package — auto-downloads if not cached
  • Full C# decompilation with /// XML documentation comments
  • Short type name resolution (IChatClient → Microsoft.Extensions.AI.IChatClient)
  • Nested type support (ChatRole.Converter → ChatRole+Converter)
  • API diff with unified diff, member-level changes, and breaking change detection
  • Version keywords: latest, latest-stable, latest-prerelease work on any --version, --from, --to
  • Dependency tree with transitive resolution and deduplication
  • Meta-package detection: suggests the real package (e.g., Humanizer → Humanizer.Core); info and deps work on meta-packages
  • Deprecation and vulnerability detection from NuGet registry
  • Version listing with stable/latest filters
  • Framework-aware: picks best matching TFM (net10.0 > net9.0 > ... > netstandard2.0)
  • Context-budgeted output — list/search/deps cap at 200 rows, show at 1,000 lines, each with a ... and N more footer; JSON carries total/truncated
  • Signature-only view (show --signatures) for surveying large types without decompiling bodies
  • Deprecation and stability discovery — [Obsolete] and [Experimental] types and members are marked and filterable, and diff reports transitions in both directions (including graduation to stable) without decompiling
  • AI-optimized plain text output
  • JSON output on all commands
  • Tab completion via dotnet-suggest
  • Zero configuration — works out of the box

Shell Completion

Install the dotnet-suggest global tool and enable tab completion for your shell:

dotnet tool install -g dotnet-suggest

bash (add to ~/.bashrc):

source <(dotnet-suggest script bash)

zsh (add to ~/.zshrc):

source <(dotnet-suggest script zsh)

fish (add to ~/.config/fish/config.fish):

dotnet-suggest script fish | source

License

MIT

About

C# CLI tool to inspect public API documentation from any NuGet package -- decompile types with XML docs, compare API between versions, resolve dependencies

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages