Yaml2Doc.Cli 1.1.0

dotnet add package Yaml2Doc.Cli --version 1.1.0
                    
NuGet\Install-Package Yaml2Doc.Cli -Version 1.1.0
                    
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="Yaml2Doc.Cli" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Yaml2Doc.Cli" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Yaml2Doc.Cli" />
                    
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 Yaml2Doc.Cli --version 1.1.0
                    
#r "nuget: Yaml2Doc.Cli, 1.1.0"
                    
#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 Yaml2Doc.Cli@1.1.0
                    
#: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=Yaml2Doc.Cli&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Yaml2Doc.Cli&version=1.1.0
                    
Install as a Cake Tool

Yaml2Doc.Cli

Yaml2Doc.Cli is the command-line frontend for Yaml2Doc. It wires together:

  • YAML loading and dialect selection from Yaml2Doc.Core.
  • Markdown rendering from Yaml2Doc.Markdown.
  • A small CLI host that handles:
    • Safe path resolution
    • Input/output file handling
    • Exit codes and error reporting

Use this package if you are interested in the CLI host behavior, or if you plan to install/run the Yaml2Doc CLI via .NET tooling.


Running the CLI (from source)

From the repository root:

dotnet run --project src/Yaml2Doc.Cli/Yaml2Doc.Cli.csproj -- <input.yml>

This will:

  • Read <input.yml> (which must be inside or below the current working directory).
  • Parse it using the Standard YAML dialect by default.
  • Render a basic Markdown document to standard output.

Example:

dotnet run --project src/Yaml2Doc.Cli/Yaml2Doc.Cli.csproj -- samples/pipelines/standard-golden.yml

You can redirect the output to a file:

dotnet run --project src/Yaml2Doc.Cli/Yaml2Doc.Cli.csproj -- samples/pipelines/standard-golden.yml > standard-golden.out.md

Dialects and CLI flags

Starting with v1.1.0, the CLI supports pluggable YAML dialects:

  • standard - Generic YAML (default, v1-compatible behavior).
  • gha - GitHub Actions workflows (.github/workflows/*.yml).
  • ado - Azure DevOps pipelines (azure-pipelines.yml, multi-stage YAML, etc.).

Selecting a dialect via CLI

You can select a dialect explicitly:

Yaml2Doc --dialect <id> <input.yml>

Where <id> is one of:

  • standard
  • gha
  • ado

Example:

Yaml2Doc --dialect gha samples/pipelines/github-golden.yml

If you’re running via dotnet run, remember to pass arguments after --:

# Standard dialect (implicit, v1-compatible)
dotnet run --project src/Yaml2Doc.Cli/Yaml2Doc.Cli.csproj -- samples/pipelines/standard-golden.yml

# Explicit GitHub Actions dialect
dotnet run --project src/Yaml2Doc.Cli/Yaml2Doc.Cli.csproj -- --dialect gha samples/pipelines/github-golden.yml

# Explicit Azure Pipelines dialect
dotnet run --project src/Yaml2Doc.Cli/Yaml2Doc.Cli.csproj -- --dialect ado samples/pipelines/azure-golden.yml

If you omit the --dialect flag, the CLI behaves exactly like v1.0.0: it uses the Standard dialect and produces the same Markdown for a given standard YAML file.


Writing directly to a file

The CLI also supports an explicit --output parameter:

dotnet run --project src/Yaml2Doc.Cli/Yaml2Doc.Cli.csproj -- <input.yml> --output <output.md>

Rules:

  • <output.md> must not already exist (to avoid accidental overwrites).
  • The output path must stay within the current working directory (no escaping via symlinks/junctions).

On errors (missing input, invalid path, parse failures, etc.) the CLI:

  • Prints a descriptive message to standard error.
  • Exits with a non-zero exit code.

API documentation

For full type and member details (including the CLI entry point and helpers), see:

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.

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
1.1.0 224 12/4/2025
1.1.0-preview.26-ga1ebf43 157 12/4/2025
1.1.0-preview.25-gc4d1d21 149 12/4/2025
1.0.0 202 12/3/2025
1.0.0-preview.24-gd822a58 168 12/3/2025
1.0.0-preview.23-g2fad194 148 12/3/2025
1.0.0-preview.22-gd7f78e2 153 12/3/2025
1.0.0-preview.21-g71d2f29 153 12/3/2025
1.0.0-preview.20-ga2d3c5e 167 12/3/2025