ShadowDusk.Cli 0.9.0

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

ShadowDusk.Cli (ShadowDuskCLI)

Cross-platform drop-in replacement for MonoGame's mgfxc shader compiler, as a dotnet tool: compiles .fx to MonoGame/KNI .mgfx and FNA D3D9 fx_2_0 .fxb on Linux, macOS, and Windows — no fxc.exe, no Wine, no Windows SDK. Same flags, same output format, same exit codes, and MGCB-parseable stderr diagnostics, so an existing MonoGame content pipeline can switch with zero code changes.

Install

dotnet tool install --global ShadowDusk.Cli

Use

ShadowDuskCLI <input.fx> <output.mgfx> /Profile:OpenGL
ShadowDuskCLI <input.fx> <output.mgfx> /Profile:DirectX_11
ShadowDuskCLI <input.fx> <output.fxb>  /Profile:FNA

Flags mirror mgfxc (/Profile, /Debug, /I, /DxbcBackend, --mgfx-version), plus --target-runtime to pick the backend + format together by name. Run ShadowDuskCLI --help for the full list.

ShaderToy / GLSL input

In addition to .fx, the CLI accepts a single-pass ShaderToy / GLSL image shader (.glsl, .frag, .fs) and converts it to a self-contained .fx before compiling — so a ShaderToy mainImage (or a plain void main() fragment shader) compiles straight to a loadable .mgfx/.fxb for any target:

ShadowDuskCLI shader.glsl shader.mgfx /Profile:OpenGL

Detection is automatic (by extension, with a content sniff for off-convention files); .fx is never sniffed and behaves exactly as before, and no flag is ever required for correct output. The non-required escape hatch --input-format auto|fx|glsl forces a route for an oddly-named or genuinely-ambiguous file. Unsupported GLSL constructs fail loudly with an MGCB-parseable file(line,col): error SDxxxx: message diagnostic pointing at the original .glsl. --print-uniforms lists the drivable effect parameters (e.g. iResolution, iTime, custom uniforms) you must set each frame at runtime. The converted shader needs a small per-frame harness (set the uniforms, draw a fullscreen triangle) — see the ShaderToyViewer sample.

The output container defaults to MGFX v10, which loads on every MonoGame 3.8.2+ and KNI runtime — you never need a flag for correct output. For newer runtimes, --mgfx-version 11 opts into a faithful MonoGame MGFX v11 container (MonoGame 3.8.5+, opt-in/experimental). To pick a whole target in one flag, --target-runtime <name> (monogame-gl, monogame-dx, monogame-gl-v11, kni-knifx, fna) selects the backend and container together — e.g. --target-runtime kni-knifx emits KNI's KNIFX v11 container.

As the MGCB shader compiler

Point MGCB's ExternalTool at ShadowDuskCLI (or alias it to mgfxc on PATH) and the MonoGame Content Pipeline uses ShadowDusk transparently — including on Linux/macOS build agents where mgfxc cannot run.

Self-contained single-file binaries (no .NET install needed) for win-x64, linux-x64, osx-x64, and osx-arm64 are attached to each GitHub Release.

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 was computed.  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
0.9.0 89 6/22/2026
0.8.0 107 6/18/2026
0.7.0 102 6/15/2026
0.6.0 100 6/14/2026
0.5.1 102 6/13/2026
0.5.0 97 6/13/2026
0.4.0 94 6/11/2026
0.3.0 96 6/11/2026
0.2.0 95 6/8/2026
0.1.1 105 6/7/2026
0.1.0 95 6/7/2026