id = "nuget" name = "NuGet" homepage = "https://www.nuget.org" description = "NuGet is the package manager for .NET." # nuget.org's own phrasing, trimmed: "the central package repository for # NuGet, the package manager for .NET". icon = "SimpleIcons:nuget" executables = ["nuget"] [dotfiles] # https://learn.microsoft.com/en-us/nuget/consume-packages/configuring-nuget-behavior # — the user-level config file is "Windows: %appdata%\NuGet\NuGet.Config # Mac/Linux: ~/.config/NuGet/NuGet.Config or ~/.nuget/NuGet/NuGet.Config # (varies by tooling)", and the same page says which of the two Unix spellings # belongs to this entry: "These other tools look for the user config file under # the ~/.config/NuGet folder: Mono, NuGet.exe, Visual Studio for Mac". The # `nuget` command is NuGet.exe, so ~/.config/NuGet is its half; the # ~/.nuget/NuGet spelling is the .NET CLI's and lives in the `dotnet` entry. # # ~/.config on macOS and Linux beside %APPDATA% on Windows is exactly the # [configHome] base directory, so one line covers both. paths = ["[configHome]/NuGet/NuGet.Config"] exclude = [] # NuGet.Config is package sources and settings; the credentials inside it are # carved out below rather than being the whole file. secret = [] # Read once per command invocation, by a process that then exits. side_effect = false # https://learn.microsoft.com/en-us/nuget/reference/nuget-config-file, # packageSourceCredentials: each source gets an `` and # either `` (encrypted, Windows-only and machine-bound) # or ``. The `config` section holds # `http_proxy.password` on the same shape. # # NuGet.Config is XML, which this catalog's key_path syntax does not parse, so # these are prefix rules — the tooling writes one `` element per # line. They catch what `nuget sources add -username -password` writes; a # hand-reflowed file, and the `` section (whose keys are source URLs # and so cannot be named by a prefix), are past what a line rule can reach. [[dotfiles.secret_paths]] file = "[configHome]/NuGet/NuGet.Config" match = { prefix = [ " [options] -x|-ExcludeVersion -NonInteractive -OutputDirectory -PreRelease -Source -Version -Framework -DependencyVersion""" [[commands.subcommand.field]] id = "package" label = "Package ID or packages.config" type = "string" position = 0 sources = ["docs"] [[commands.subcommand.field]] id = "version" label = "Version" description = "Defaults to the latest version." type = "string" option = ["-Version"] sources = ["docs"] [[commands.subcommand.field]] id = "output_directory" label = "Output directory" description = "Defaults to the current folder." type = "path" option = ["-OutputDirectory"] path = { kind = "directory", role = "output", must_exist = false } sources = ["docs"] [[commands.subcommand.field]] id = "source" label = "Package source" type = "string" option = ["-Source"] sources = ["docs"] [[commands.subcommand.field]] id = "framework" label = "Target framework" type = "string" option = ["-Framework"] sources = ["docs"] [[commands.subcommand.field]] id = "exclude_version" label = "Folder without version" type = "boolean" option = ["-ExcludeVersion", "-x"] sources = ["docs"] [[commands.subcommand.field]] id = "prerelease" label = "Allow prerelease" type = "boolean" option = ["-PreRelease"] sources = ["docs"] [[commands.subcommand.field]] id = "dependency_version" label = "Dependency version" type = "enum" option = ["-DependencyVersion"] choices = [{ value = "Lowest", label = "Lowest" }, { value = "HighestPatch", label = "HighestPatch" }, { value = "HighestMinor", label = "HighestMinor" }, { value = "Highest", label = "Highest" }, { value = "Ignore", label = "Ignore" }] sources = ["docs"] [[commands.subcommand.field]] id = "non_interactive" label = "No prompts" type = "boolean" option = ["-NonInteractive"] sources = ["docs"] [[commands.subcommand.task]] id = "install" label = "Install package" fields = ["package", "version", "output_directory"] required = ["package"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["package", "version", "output_directory", "source", "framework"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["exclude_version", "prerelease", "dependency_version", "non_interactive"]