ndnx is dnx for
native tools packaged and distributed as NuGet packages. Same one-shot CLI, same
PACKAGE[@VERSION] identity, same restore flags, same global packages folder.
If you can dnx stop, you can ndnx stop. dotnet dnx and dotnet tool exec
are the same command; ndnx speaks that protocol, including RID-specific Native
AOT tools (stop, go, winget) and ordinary framework-dependent tools
(dotnetsay).
A first run downloads into the NuGet cache. A later ndnx tool@version starts
the cached binary — no SDK, no restore.
macOS / Linux:
curl -fsSL https://github.com/devlooped/ndnx/releases/latest/download/install.sh | shWindows (PowerShell):
irm https://github.com/devlooped/ndnx/releases/latest/download/install.ps1 | iexNative AOT binaries also ship as GitHub Release assets for winget, Scoop, and Homebrew.
Self-update the installed binary (optional version, including downgrades):
ndnx --update
ndnx --update 0.1.0ndnx
Same shape as dnx / dotnet dnx / dotnet tool exec:
dnx stop -- --help
ndnx stop -- --help
dnx [email protected] -- --help
ndnx [email protected] -- --help
dnx [email protected] -- Hello
ndnx [email protected] -- HelloPin a feed the same way (here the CI feed used for the timings below):
dnx --source https://kzu.blob.core.windows.net/nuget/index.json [email protected] -- --help
ndnx --source https://kzu.blob.core.windows.net/nuget/index.json [email protected] -- --helpstop is a Native AOT RID tool. dotnetsay is a classic framework-dependent
tool. Both are just NuGet packages; ndnx picks the host RID and starts
Runner=executable binaries directly, or dotnet exec for Runner=dotnet.
An exact version already in the cache (NUGET_PACKAGES, then
nuget.config's globalPackagesFolder, then ~/.nuget/packages) is not
downloaded again. A first tool@version run builds the nupkg URL from the
service index (cached for the process) and lists versions only if that GET
is 404. Packages written by dnx or dotnet restore are reused; packages
written by ndnx are visible to them.
A floating version — unspecified, @*, @*-*, or a NuGet range — stays
current. ndnx starts the latest match, watches the feed, downloads a newer
matching version before stopping the child, then sends SIGINT / Ctrl+C
(and WM_CLOSE if the tool is a GUI) and restarts. Short tools still exit
as soon as the child exits. Pin an exact version ([email protected]) to disable
that loop.
The poll interval defaults to 5 seconds and can be set in .netconfig:
[ndnx]
interval = 5
ndnx walks from the working directory up, then ~/.netconfig. --verbosity quiet hides the Updating … line.
Shared flags: --source, --add-source, --configfile, --version,
--prerelease, --yes/-y, --allow-roll-forward, --verbosity/-v,
--disable-parallel, --ignore-failed-sources, --no-http-cache,
--interactive.
Cold is empty-cache download → start; cached is start only (tool@version so
neither runner resolves latest). linux-x64 (WSL2) is SDK 10.0.110; win-x64 is
SDK 10.0.303.
| Tool | Runner | Cold linux-x64 | Cold win-x64 | Cached linux-x64 | Cached win-x64 |
|---|---|---|---|---|---|
[email protected] (native AOT) |
dnx |
2.2 s | 2.1 s | 580 ms | 520 ms |
ndnx |
1.2 s | 1.5 s | 10 ms | 34 ms | |
[email protected] (framework-dependent) |
dnx |
1.6 s | 1.8 s | 570 ms | 545 ms |
ndnx |
849 ms | 1.1 s | 12 ms | 50 ms |
Isolated NUGET_PACKAGES, source https://kzu.blob.core.windows.net/nuget/index.json.
Cold is the median of 3 empty-cache runs. Cached is the median of 10 runs after
one seed. stop invoked as -- --help; dotnetsay as -- ndnx. dnx is the
SDK script (dotnet dnx).