Lunaris.WhatIfVisualizer 1.1.0

dotnet tool install --global Lunaris.WhatIfVisualizer --version 1.1.0
                    
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 Lunaris.WhatIfVisualizer --version 1.1.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Lunaris.WhatIfVisualizer&version=1.1.0
                    
nuke :add-package Lunaris.WhatIfVisualizer --version 1.1.0
                    

What-If Visualizer

alternate text is missing from this package README image alternate text is missing from this package README image

What-If Visualizer is a .NET CLI that turns Azure CLI What-If output into reports that are easier to review in terminals, pull requests, and CI runs.

The repository produces a .NET global tool package named Lunaris.WhatIfVisualizer. Once installed, the command name is whatif-visualizer.

It reads the output of az deployment group what-if, az deployment sub what-if, az deployment mg what-if, or az deployment tenant what-if from stdin, parses the resource and property changes, adds summary and risk metadata, and then renders one of three report formats:

  • plain text for logs and CI output
  • ANSI-colored console output for terminal review
  • a single self-contained HTML report for interactive inspection
  • Markdown for PRs and pipeline summaries

What It Does

  • Parses Azure What-If text output into a structured report model.
  • Groups resources and property changes by change type.
  • Highlights categories and risks to make impactful changes easier to spot.
  • Applies suppression rules to remove known-noise resources or properties from the final report.
  • Supports CI-friendly failure behavior with --fail-on-changes.

Quick Start

Run from the repository root.

Install as a global tool

From NuGet after a published release:

dotnet tool install --global Lunaris.WhatIfVisualizer

Build and install from a local package:

dotnet pack .\src\WhatIfVisualizer\WhatIfVisualizer.csproj -c Release -o .\artifacts\package /p:PackageVersion=0.1.0-local
dotnet tool install --global --add-source .\artifacts\package Lunaris.WhatIfVisualizer --version 0.1.0-local

Text output

az deployment group what-if --resource-group rg-demo --template-file main.bicep |
  whatif-visualizer --format text

ANSI output written to a file

Get-Content -Raw .\samples\simple\input.txt |
  whatif-visualizer --format ansi --output .\samples\simple\output.ansi

HTML output with a custom title

Get-Content -Raw .\samples\real-world\input.txt |
  whatif-visualizer --format html --title "Real-World Sample" --output .\report.html

HTML output with suppressions applied

Get-Content -Raw .\samples\suppressions\input.txt |
  whatif-visualizer --format html --title "Suppressions Sample" --suppressions .\samples\suppressions\suppressions.json --output .\report.html

Markdown output for a CI pipeline summary

Get-Content -Raw .\samples\simple\input.txt |
  whatif-visualizer --format markdown --title "Simple Sample"

Common Options

  • --format text|ansi|html|markdown chooses the output format.
  • --output <path> writes the report to a file instead of stdout.
  • --title <value> sets the report title (used by HTML and Markdown output).
  • --changes <list> filters the visible change types.
  • --risk-only limits console output to high and critical resources.
  • --suppressions <path> applies JSON suppression rules before formatting.
  • --fail-on-changes returns exit code 2 when actionable changes remain after suppression.

Run whatif-visualizer --help for the full flag list.

CI/CD Integration

See the dedicated guides for publishing What-If reports inside pipelines:

Samples

The repo ships committed samples under samples. Each sample folder contains:

  • input.txt
  • generated output files
  • a local README.md with the exact command used to generate them

Available samples:

Documentation

Focused docs live under docs:

Local Development

The current repo supports both source builds and tool packaging.

Prerequisites

  • .NET SDK 10
  • Azure CLI if you want to produce fresh What-If input from live deployments

Build

dotnet build .\WhatIfVisualizer.slnx

Test

dotnet test .\WhatIfVisualizer.slnx

Pack the tool

dotnet pack .\src\WhatIfVisualizer\WhatIfVisualizer.csproj -c Release -o .\artifacts\package /p:PackageVersion=0.1.0-local

Regenerate sample outputs

Use the commands in each sample folder README so the committed outputs stay aligned with the checked-in inputs and options.

Contributing

Contributions are welcome. Review CONTRIBUTING.md, keep sample outputs reproducible, and run the test suite before opening a change.

License

This project is licensed under the MIT License. See LICENSE.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  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 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.

This package has no dependencies.

Version Downloads Last Updated
1.1.0 198 3/29/2026
1.0.0 100 3/29/2026