ApiLens 1.0.3

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global ApiLens --version 1.0.3
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local ApiLens --version 1.0.3
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=ApiLens&version=1.0.3
                    
nuke :add-package ApiLens --version 1.0.3
                    

ApiLens CLI

A .NET global tool for indexing and querying .NET XML API documentation using Lucene.NET.

Installation

dotnet tool install --global apilens

Quick Start

# Index documentation
apilens index ./docs

# Search for a type
apilens query String

# Find methods throwing exceptions
apilens exceptions ArgumentNullException

# Find code examples
apilens examples async

Features

  • Index XML Documentation: Parse and index .NET XML documentation files
  • NuGet Package Support: Automatically discover and index documentation from NuGet cache
  • Full-Text Search: Query API documentation using Lucene.NET
  • Specialized Queries: Find code examples, exceptions, and analyze method complexity
  • Multiple Output Formats: Table (human), JSON (machine), Markdown (docs)
  • MCP Ready: Designed for integration with Model Context Protocol

Commands

Index Command

Index XML documentation files or directories:

apilens index <path> [options]

NuGet Command

Index documentation from NuGet packages:

apilens nuget [options]
  --list              List packages with documentation
  --filter <pattern>  Filter packages by pattern
  --latest-only       Index only latest versions

Query Command

Search the indexed documentation:

apilens query <search-term> [options]
  --type <type>       Search type: name, content, namespace, id, assembly
  --max <count>       Maximum results (default: 10)
  --format <format>   Output format: table, json, markdown

Exceptions Command

Find methods that throw specific exceptions:

apilens exceptions <exception-type> [options]
  --details           Show detailed information
  --max <count>       Maximum results (default: 10)
  --format <format>   Output format: table, json, markdown

Examples Command

Find methods with code examples:

apilens examples [pattern] [options]
  --max <count>       Maximum results (default: 10)
  --format <format>   Output format: table, json, markdown

Complexity Command

Analyze method complexity:

apilens complexity [options]
  --min-params <n>    Minimum parameter count
  --max-params <n>    Maximum parameter count
  --min-complexity <n> Minimum complexity
  --stats             Show statistics
  --sort <by>         Sort by: complexity, params
  --format <format>   Output format: table, json, markdown

Stats Command

Display index statistics:

apilens stats [options]
  --format <format>   Output format: table, json, markdown

ApiLens supports Lucene query syntax for content searches:

  • Wildcards: string*, utilit?
  • Fuzzy: tokenze~
  • Boolean: string AND manipulation, thread OR async
  • Phrases: "extension methods"

MCP Integration

ApiLens is designed for Model Context Protocol integration. Use JSON output format for structured data:

apilens query String --format json
apilens examples async --format json --max 10
apilens exceptions IOException --format json

Documentation

For more information, visit: https://github.com/endjin/ApiLens

License

Licensed under the Apache License, Version 2.0

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
1.0.8 869 12/28/2025
1.0.7 1,151 11/14/2025
1.0.6 1,095 8/16/2025
1.0.5 1,088 8/15/2025
1.0.4 1,123 8/9/2025
1.0.3 1,231 8/5/2025