ワンクリックで
ワンクリックで
| name | dotnet-install |
| description | Build, install, list, and remove .NET tools using dotnet-install. |
| argument-hint | [owner/repo | path | --package name | ls | rm name | search | info | env] |
| allowed-tools | Bash, Read, Glob, Grep |
You are helping the user work with dotnet-install,
a tool that installs .NET executables to PATH
— like cargo install and go install.
dotnet-install relates to dotnet tool install -g
the way yarn relates to npm: it uses the same package
registry (NuGet) but provides a different installation
model. Where dotnet tool install -g places shim
scripts in ~/.dotnet/tools/ backed by deeply nested
binaries in .store/, dotnet-install places real
binaries directly in ~/.dotnet/bin/ — a flat,
transparent layout like Go's ~/go/bin/ or Cargo's
~/.cargo/bin/. Users can acquire dotnet-install
itself via dotnet tool install -g as a bootstrap,
after which dotnet-install setup graduates the tool
to ~/.dotnet/bin/ and sheds the dotnet tool scaffolding.
| Directory | Owner | Contents |
|---|---|---|
~/.dotnet/tools/ | dotnet tool install -g | Shim scripts → .store/ |
~/.dotnet/bin/ | dotnet-install | Real binaries, flat layout |
dotnet-install itself lives at ~/.dotnet/bin/dotnet-install.
Override with DOTNET_TOOL_BIN env var, -o, or
--local-bin (~/.local/bin/).
dotnet-install <args>
# or via dotnet prefix matching:
dotnet install <args>
When working in this repo (development):
dotnet run --project src/dotnet-install -- <args>
The tool lives at src/dotnet-install/ in this repo:
Program.cs — CLI entry pointCommandLineBuilder.cs — System.CommandLine command/option
definitions and handler wiringInstaller.cs — Core install logic: project eval,
dotnet publish, single/multi-file placement,
NuGet package install, file-based app supportGitSource.cs — Git clone/fetch from GitHub repos,
project discovery, .dotnet-install.json manifestShellHint.cs — PATH detection, shell-specific
setup instructions, DOTNET_TOOL_BIN env varSetupCommand.cs — Shell PATH config, self-install
from NuGet (bootstrap graduation), shed dotnet toolEnvCommand.cs — Print environment info (cargo env style)ProjectSelector.cs — Interactive arrow-key selector
for repos with multiple executable projectsHostDispatch.cs — Busybox-style dispatch for managed
tools (Unix symlink-based, Windows .cmd shim-based)ListCommand.cs — Lists installed toolsRemoveCommand.cs — Removes installed toolsUpdateCommand.cs — Updates installed toolsSearchCommand.cs — Search NuGet for packagesInfoCommand.cs — Show tool details and provenanceOutdatedCommand.cs — Check for newer versionsRunCommand.cs — Run without installing (npx-like)CompletionCommand.cs — Shell completion setupSkillCommand.cs — Prints embedded skill definitionskill.md — Embedded skill for AI assistants (end-user)HelpWriter.cs — Markout-based help formattingBuilds and installs from a local project directory or the current directory.
Supports both .csproj projects and file-based apps (.cs with #:property directives).
dotnet install # current directory
dotnet install src/my-tool # subdirectory
dotnet install ~/git/my-tool # explicit path
dotnet install app.cs # file-based app
Clones (or fetches) a GitHub repo, discovers the project, builds, and installs.
dotnet install --github richlander/dotnet-inspect
dotnet install --github richlander/dotnet-inspect@v1.0
dotnet install --github richlander/dotnet-inspect --ssh
dotnet install --github richlander/dotnet-inspect --project src/Tool/Tool.csproj
If the user types owner/repo without --github,
the tool prompts for confirmation before cloning
(anti-typosquatting).
Downloads and installs a pre-built tool from NuGet.
dotnet install --package dotnetsay
dotnet install --package dotnet-counters@9.0.0
Positional args can mix sources. When multiple args are given, confirmation prompts are skipped.
dotnet install dotnetsay dotnet-counters # two NuGet packages
dotnet install richlander/dotnetsay app.cs # GitHub + local file-based app
dotnet install ls # list installed tools
dotnet install rm <tool> # remove one or more tools
dotnet install update <tool> # update installed tools
dotnet install search <query> # search NuGet
dotnet install info <tool> # show tool details
dotnet install outdated # check for newer versions
dotnet install run <pkg> [args] # run without installing (npx-like)
dotnet install setup # configure PATH + DOTNET_TOOL_BIN
dotnet install env # print environment info
dotnet install completion # shell completion setup
--package, --github) skip all prompts--allow-roll-forward suppresses)dotnet publish and suggests
--package as the SDK-free alternative# Build
dotnet build src/dotnet-install/dotnet-install.csproj
# Run (via dotnet run)
dotnet run --project src/dotnet-install/dotnet-install.csproj -- <args>
# Tests
dotnet run --project test/dotnet-install.Tests
CommandLineBuilder.csHelpWriter.cs)net10.0 with
PublishAot=true — all code must be AOT-compatibleManifestContext in
GitSource.cs)"error: <message>" to stderr_<appname>/ with a
symlink (Unix) or .cmd shim (Windows)~/.nuget/git-tools/<owner>/<repo>/--project > manifest >
auto-detect Exe > file-based apps (≤12 → selector)DESIGN.md for full architecture rationale