Lunaris.WhatIfVisualizer
1.1.0
dotnet tool install --global Lunaris.WhatIfVisualizer --version 1.1.0
dotnet new tool-manifest
dotnet tool install --local Lunaris.WhatIfVisualizer --version 1.1.0
#tool dotnet:?package=Lunaris.WhatIfVisualizer&version=1.1.0
nuke :add-package Lunaris.WhatIfVisualizer --version 1.1.0
What-If Visualizer
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|markdownchooses 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-onlylimits console output to high and critical resources.--suppressions <path>applies JSON suppression rules before formatting.--fail-on-changesreturns exit code2when 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:
- docs/ci-github-actions.md — GitHub Actions: Markdown job summary and HTML artifact upload
- docs/ci-azure-devops.md — Azure DevOps: Markdown pipeline summary and HTML artifact publish
Samples
The repo ships committed samples under samples. Each sample folder contains:
input.txt- generated output files
- a local
README.mdwith the exact command used to generate them
Available samples:
Documentation
Focused docs live under docs:
- docs/overview.md
- docs/usage.md
- docs/suppressions.md
- docs/diagnostics.md
- docs/categories-risks.md
- docs/ci-github-actions.md
- docs/ci-azure-devops.md
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 | Versions 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. |
This package has no dependencies.