HelpLine.Docs 0.1.0-preview.37

This is a prerelease version of HelpLine.Docs.
dotnet add package HelpLine.Docs --version 0.1.0-preview.37
                    
NuGet\Install-Package HelpLine.Docs -Version 0.1.0-preview.37
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="HelpLine.Docs" Version="0.1.0-preview.37" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="HelpLine.Docs" Version="0.1.0-preview.37" />
                    
Directory.Packages.props
<PackageReference Include="HelpLine.Docs" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add HelpLine.Docs --version 0.1.0-preview.37
                    
#r "nuget: HelpLine.Docs, 0.1.0-preview.37"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package HelpLine.Docs@0.1.0-preview.37
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=HelpLine.Docs&version=0.1.0-preview.37&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=HelpLine.Docs&version=0.1.0-preview.37&prerelease
                    
Install as a Cake Tool

HelpLine.Docs

Provide rich documentation directly in your CLI app.

1. Add Markdown files to your source project

Create a Docs\ folder in your project and add one or more Markdown files:

MyCli/
  Docs/
    getting-started.md
    advanced-usage.md

2. Build-time embedding

When your project references the HelpLine.Docs package, its transitive MSBuild targets automatically embed all *.md files under Docs\ as assembly resources. No .csproj changes are needed for the default setup.

To use a different source folder, set the MSBuild property:

<PropertyGroup>
  <HelpLineMarkdownTopicsRoot>MyCustomFolder</HelpLineMarkdownTopicsRoot>
</PropertyGroup>

3. Register the docs command

using HelpLine.Docs;
using System.CommandLine;

var catalog = DocsTopicCatalog.FromAssemblyResources(typeof(Program).Assembly);

var rootCommand = new RootCommand("sample");
rootCommand.Add(new DocsCommand(catalog));

This discovers embedded Markdown topics from the specified assembly and adds a docs subcommand. Every Markdown heading becomes a topic. Sub-topics are nested under their enclosing heading and shown indented in the interactive topic chooser:

> all topics
  boats
    engines
    rudders
  cars
    engines
    wheels

Topic content for a parent topic includes all of its descendant sections, so --topic boats displays the boats heading and content as well as everything below it (including engines and rudders).

When two topics share the same short name (e.g., an ## Engines topic under both # Cars and # Boats), each --topic value is qualified with its parent — cars-engines and boats-engines. The chooser still shows the unqualified engines under each parent.

4. Use at runtime

sample docs list
sample docs --topic boats

5. Advanced usage

For full control over how headings map to topics, pass a heading mapper:

var catalog = DocsTopicCatalog.FromAssemblyResources(typeof(Program).Assembly, context =>
{
    if (context.HeadingLevel == 2)
    {
        context.AppendToTopic(context.HeadingText);
    }
});

rootCommand.Add(new DocsCommand(catalog));

A mapped topic's content runs from its heading until the next mapped heading; unmapped headings are folded into the surrounding topic.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-preview.37 59 5/18/2026
0.1.0-preview.35 57 5/14/2026
0.1.0-preview.30 50 5/14/2026
0.1.0-preview.28 53 5/8/2026
0.1.0-preview.26 47 5/6/2026
0.1.0-preview.20 51 5/5/2026