{"id":16974748,"url":"https://github.com/3f/getnutool","last_synced_at":"2025-09-07T01:05:11.755Z","repository":{"id":144758070,"uuid":"47711676","full_name":"3F/GetNuTool","owner":"3F","description":"Embeddable Package Manager (+core in .bat); 🕊 Lightweight tool to Create or Distribute using basic shell scripts (no powershell no dotnet-cli)","archived":false,"fork":false,"pushed_at":"2025-09-05T00:17:07.000Z","size":457,"stargazers_count":31,"open_issues_count":0,"forks_count":6,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-09-05T02:26:48.439Z","etag":null,"topics":["batch","batch-script","chocolatey","distribution","embeddable","getnutool","hmsbuild","msbuild","nuget","nuget-client","nuget-packages","nupkg","nuspec","package-manager","packages","portable","tools","visual-studio","visualstudio"],"latest_commit_sha":null,"homepage":"","language":"Batchfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/3F.png","metadata":{"files":{"readme":"Readme.md","changelog":"changelog.txt","contributing":null,"funding":".github/FUNDING.yml","license":"License.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"custom":["3F.github.io/fund"]}},"created_at":"2015-12-09T18:48:41.000Z","updated_at":"2025-09-05T00:17:10.000Z","dependencies_parsed_at":"2024-02-07T14:24:42.472Z","dependency_job_id":"46bb0dcc-7f67-41b0-84e7-0531bee0450a","html_url":"https://github.com/3F/GetNuTool","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/3F/GetNuTool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3F%2FGetNuTool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3F%2FGetNuTool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3F%2FGetNuTool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3F%2FGetNuTool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/3F","download_url":"https://codeload.github.com/3F/GetNuTool/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3F%2FGetNuTool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273983110,"owners_count":25202095,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-06T02:00:13.247Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["batch","batch-script","chocolatey","distribution","embeddable","getnutool","hmsbuild","msbuild","nuget","nuget-client","nuget-packages","nupkg","nuspec","package-manager","packages","portable","tools","visual-studio","visualstudio"],"created_at":"2024-10-14T01:07:53.851Z","updated_at":"2025-09-07T01:05:11.744Z","avatar_url":"https://github.com/3F.png","language":"Batchfile","funding_links":["3F.github.io/fund"],"categories":[],"sub_categories":[],"readme":"# [GetNuTool](https://github.com/3F/GetNuTool)\n\nEmbeddable Package Manager (+core in .bat);\n🕊 Lightweight tool to Create or Distribute using basic shell scripts (does not require *powershell* or *dotnet-cli*);\n*NuGet* / *Chocolatey* client;\n\n```r\nCopyright (c) 2015-2025  Denis Kuzmin \u003cx-3F@outlook.com\u003e github/3F\n```\n\n[ 「 ❤ 」 ](https://3F.github.io/fund) [![License](https://img.shields.io/badge/License-MIT-74A5C2.svg)](https://github.com/3F/GetNuTool/blob/master/License.txt)\n[![Build status](https://ci.appveyor.com/api/projects/status/gw8tij2230gwkqs6/branch/master?svg=true)](https://ci.appveyor.com/project/3Fs/getnutool-github/branch/master)\n[![release](https://img.shields.io/github/release/3F/GetNuTool.svg)](https://github.com/3F/GetNuTool/releases/latest)\n\n[`gnt`](https://3F.github.io/GetNuTool/releases/latest/gnt/)`-help` | [`gnt`](https://3F.github.io/GetNuTool/releases/latest/gnt/)`~\u0026 svc.gnt` | [`gnt`](https://3F.github.io/GetNuTool/releases/latest/gnt/)`*/p:use=documentation`\n\n```bash\ngnt Fnv1a128                                  # Get Fnv1a128 package\ngnt +DllExport                                # Install DllExport package\ngnt *DllExport                                # Install and Run DllExport.bat\ngnt ~hMSBuild                                 # Touch hMSBuild\ngnt /t:pack /p:ngin=\"bin\\DllExport\"           # Create new DllExport package\ngnt \"Conari;regXwild\"                         # Get Conari \u0026 regXwild packages\nmsbuild gnt.core /p:ngpackages=LuNari/1.6.0   # Use msbuild to get LuNari 1.6.0 \ngnt Huid/1.0.0:src.zip /t:grab                # Grab Huid 1.0 as zip without unpacking\ngnt /p:ngconfig=\"dir\\packages.config\"         # Use specified packages.config\nset ngpackages=Conari \u0026 gnt                   # shell scripts\ngnt /p:ngpackages=putty.portable/0.69         # chocolatey\n    /p:ngserver=\"https://chocolatey.org/api/v2/package/\"\n```\n\n**[Download](https://github.com/3F/GetNuTool/releases/latest)** all editions: *Core, Minified, Executable, C# version for .NET, ...*\n\nDirect Links to the latest stable:\n\n* (Windows) Latest stable compiled batch-script [ [gnt.bat](https://3F.github.io/GetNuTool/releases/latest/gnt/) ] `https://3F.github.io/GetNuTool/releases/latest/gnt/`\n\n\n### Projects based entirely on GetNuTool\n\n* [netfx4sdk](https://github.com/3F/netfx4sdk) - Developer Pack (SDK). NETFX 4: Visual Studio 2022+ / MSBuild 17+ / or other modern tools;\n* [hMSBuild](https://github.com/3F/hMSBuild) - Compiled text-based embeddable pure batch-scripts for searching modern MSBuild instances;\n* [.NET DllExport Manager](https://github.com/3F/DllExport/wiki/DllExport-Manager) - Part of the DllExport tool that provides its completely independent management and distribution beyond the NuGet ecosystem. Relies on [MvsSln](https://github.com/3F/MvsSln) as well;\n\n\n## Why GetNuTool\n\n```bash\n\u003e gnt                                      # via single shell script\n\u003e msbuild gnt.core                         # via MSBuild engine\n[NuGet gnt.raw(\"/t:pack /p:ngin=7z.Libs\")] # via SobaScript\nnew GetNuTool()                            # .NET(netfx 4.0+, .NET 5+, .NET Core, Mono) C#\n```\n\nLightweight Portable and completely Embeddable (+core in .bat) package tool to create or distribute everything from anything.\n\nBack in those days it was originally developed as an alternative to solution level limitations, i.e. [github.com/NuGet/Home/issues/1521](https://github.com/NuGet/Home/issues/1521). In attempt to provide a tool to easily maintain projects, libraries, and other related build processes; For all projects at once at the solution level and of course for each separately if necessary.\n\nFor example, it was designed to be more friendly to such NuGet packages:\n* [vsSolutionBuildEvent](https://www.nuget.org/packages/vsSolutionBuildEvent) (before, aka [vsSBE.CI.MSBuild](https://www.nuget.org/packages/vsSBE.CI.MSBuild/))\n* [7z.Libs](https://www.nuget.org/packages/7z.Libs/)\n* [DllExport](https://github.com/3F/DllExport)\n* [ILAsm](https://www.nuget.org/packages/ILAsm/)\n\nHowever! GetNuTool has more powerful ways even for standard NuGet packages providing a wider range of use cases.\n\n* [Conari](https://github.com/3F/Conari), [Fnv1a128](https://github.com/3F/Fnv1a128), [MvsSln](https://github.com/3F/MvsSln), [regXwild](https://github.com/3F/regXwild), ...\n\n### Key Features\n\n* Install *.nupkg* packages from remote NuGet (or like: chocolatey, ...) servers.\n* Grab or Install any *zipped* packages from direct sources (local, remote http, https, ftp, ...).\n* Controlled unpacking of all received packages. Modes: `get` or `grab` or `install` or `touch`\n* Hash values control using [`sha1`](https://en.wikipedia.org/wiki/SHA-1) for receiving every package if used unsecured channels (~windows xp) etc.\n* Creating new NuGet packages *.nupkg* from *.nuspec*.\n* Two supported formats: xml *packages.config* (+extra: output, sha1) and inline records.\n* Inline records and packages.config are fully compatible between, and config has backward compatibility with original packages.config\n* Configurable custom folders for every receiving.\n* Request to the server only if the package is not installed.\n* Supports proxy with custom credential.\n* Default settings are overridden through an environment variables: default .config files, NuGet server, etc.\n* The ability to create *one click* ~8 KB .bat wrappers for any packages. Try for example [vsSolutionBuildEvent.bat](https://github.com/3F/GetNuTool/blob/master/doc/demo/vsSolutionBuildEvent.bat)\n* Easy integration into any scripts such as pure batch-script [netfx4sdk](https://github.com/3F/netfx4sdk), [DllExport](https://github.com/3F/DllExport/wiki/DllExport-Manager), [hMSBuild](https://github.com/3F/hMSBuild)\n* C# projects support via GetNuTool.cs\n* *.pkg.install.bat* and *.pkg.install.sh* support for *install*, *run*, *touch* modes and additionally via `+` (plus), `*` (asterisk), `~` (tilde) i.e. `gnt +...`, `gnt *...`, `gnt ~...` respectively.\n\nNote:\n\n* Dependencies are not considered.\n* Doesn't manage projects or solutions files. You need [MvsSln](https://github.com/3F/MvsSln) or anything else together with.\n* NuGet events *(Init.ps1, Install.ps1, Uninstall.ps1) from /tools* will not be launched automatically.\n    * To use events (from Visual Studio, MSBuild, NuGet, etc.), you can with [vsSolutionBuildEvent](https://github.com/3F/vsSolutionBuildEvent), or [vsCommandEvent](https://github.com/3F/vsCommandEvent), or configure it like [DllExport](https://github.com/3F/DllExport) project, or command it manually.\n\n## tModes and Commands\n\n### `get`\n\nFor receiving packages or zipped files from local or remote source, then installing / extracting.\n\nThe `get` is used by default but you can also specify `/t:get`\n\nProperty    | Description                                                  | Default values\n------------|--------------------------------------------------------------|-----------------\nngconfig    | Define *.config* files.                                      | 1.9+ `packages.config;.tools\\packages.config`\n🔒 ngserver | Define server.                                               | 1.0+ `https://www.nuget.org/api/v2/package/`\nngpackages  | List of packages. Disables *ngconfig* if specified.          | \nngpath      | Common path for all packages.                                | 1.0+ `packages`\nwpath       | *1.4+*  To change working directory.                         | 1.4+ *(The absolute path of the directory where the GetNuTool is located)*\n🔒 proxycfg | *1.6.2+* To configure connection via proxy.                  | \nssl3        | *1.9+* Do **not** drop legacy ssl3, tls1.0, tls1.1 if `true`.| \nbreak       | *1.9+* Disable the break on first package error if `no`      | \n\n\\*🔒 env protected property in 1.10+. Changing the value using an environment variables with the same name is prohibited. All intersections in used environment must be removed before actual execution (for example `set \"ngserver=\"`), otherwise it will result in *denied* error.\n\n#### Package List Format\n\nAttribute | Description                                  | Example\n----------|----------------------------------------------|------------------------------\nid        | Identifier of package.                       | `Conari`\nversion   | *(Optional)* Package version.                | `1.5.0` or `1.5-beta2` or `1.5-RC` etc.\noutput    | *(Optional)* Where to store package data.    | `../tests/case1`\nsha1      | *(Optional)* Expected sha1 for this package. | `eead8f5c1fdff2abd4da7d799fbbe694d392c792`\n\n**Note:** \n\n* As of version 1.2+, attributes are now case sensitive. Please use lowercase for `id`, `version`, `output`, `sha1`.\n* It will link to the **latest** available version if `version` attribute is not defined.\n* `output` attribute is relative to `ngpath`. You can also use absolute path.\n* `sha1` activates the alternative security check before each accessing (modes: *get*, *install*, *run*, *touch*, *grab*). It useful when connection is not secure like on windows xp with obsolete ciphers. But please note: some servers (like official NuGet) may repackage .nupkg for some purposes, such as adding *.signature.p7s* etc. This of course changes sha1 hash value that you need to check.\n* `id` allows only `a-z` `A-Z` `0-9` `.` `-` `_` symbols without whitespaces.\n\n##### *ngpackages*\n\n```ps\nid[/version][?sha1][:path];id2[/version][?sha1][:path];...\n```\n\ndelimiters:\n\n* `;` 1.6+ `Name1;Name2;Name3`\n* `|` 1.0-1.9 `Name1|Name2|Name3`\n\n```ps\n/p:ngpackages=Name1\n/p:ngpackages=\"Name1;Name2\"\n```\n\n##### *packages.config*\n    \n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cpackages\u003e\n  \u003cpackage id=\"Name1\" version=\"1.5.0\" /\u003e\n  \u003cpackage id=\"Name2\" output=\"path\" /\u003e\n  \u003cpackage id=\"Name3\" version=\"2.2-RC\" sha1=\"eead8f5c1fdff2abd4da7d799fbbe694d392c792\" /\u003e\n\u003c/packages\u003e\n```\n\n```ps\n/p:ngconfig=\".nuget/packages.config\"\n/p:ngconfig=\"debug.config;release.config;...\"\n```\n\n#### Proxy Format\n\n```ps\n[usr[:pwd]@]host[:port]\n```\n\n```ps\n/p:proxycfg=\"example.com:4321\"\n```\n\n### `grab`\n\n1.9+\n\nGrabs data without unpacking. The available parameters are similar to the `get` above.\n\nFor example:\n\n```bat\ngnt Huid/1.0.0:src.nupkg /t:grab\n```\n\n```bat\ngnt :../netfx4sdk.cmd /t:grab /p:ngserver=https://server/netfx4sdk.cmd\n```\n\n```bat\nmsbuild gnt.core /t:grab /p:ngpackages=Fnv1a128:src.nupkg\n```\n\n```bat\ngnt Huid/1.0.0?24ecda9a4fb8920067df31788d3dea708996ab08:src.nupkg /t:grab\n```\n\n### `pack`\n\nCreates the new *.nupkg* packages using [*.nuspec*](https://learn.microsoft.com/en-us/nuget/reference/nuspec) specification.\nCan also be found in the package folder after using `get`.\n\nProperty | Description                                                     | Default values\n---------|-----------------------------------------------------------------|----------------------\nngin     | Path to directory where *.nuspec* to create package from it.    |\nngout    | Optional path to save the final `.nupkg` package in other place.|\nwpath    | *1.4+*  To change working directory.                            | 1.4+ *(The absolute path of the directory where the GetNuTool is located)*\n\n```bat\ngnt /t:pack /p:ngin=path\\to\\dir\ngnt /t:pack /p:ngin=\"path to\\dir\";ngout=..\\dst.nupkg\n```\n\n### `touch` \u0026 `install` \u0026 `run`\n\n1.10+\n\n*GetNuTool* automatically invokes *.pkg.install.bat* (or *.pkg.install.sh* depending on the environment) in activated `install` or `run` or `touch` modes if the package provides support for this. Note: Once per clean install (it won't trigger for cached or already unpacked packages).\n\nThe available options are the same as for the `get` mode described above.\n\nThe `install` mode can be activated in different ways,\n\n```bat\ngnt +DllExport\n```\n\n```bat\ngnt +\"DllExport;Conari\"\n```\n\nor using `/t:install`\n\n```bat\nmsbuild gnt.core /t:install /p:ngpackages=DllExport\n```\n\n```csharp\nio.github._3F.GetNuTool gnt = new();\ngnt.Run(ngpackages: \"Conari;DllExport\", tmode: \"install\");\n```\n\nThe `run` mode is similar to the *install* described above but using `*` instead of `+`,\n\n```bat\ngnt *DllExport\n```\n\n```bat\ngnt *\"DllExport;Conari\"\n```\n\nand `/t:run`\n\n```bat\nmsbuild gnt.core /t:run /p:ngpackages=DllExport\n```\n\n```csharp\ngnt.Run(ngpackages: \"Conari;DllExport\", tmode: \"run\");\n```\n\nThe `touch` mode extends the *install* mode and allows to work with package and its contents in a one-time or temporary execution. Once processing is complete, the package and its contents will be deleted.\n\nTo activate this mode, you can define `~` (tilde) in arguments:\n\n```bat\ngnt ~hMSBuild\n```\n\nor using `/t:touch`\n\n```bat\nmsbuild gnt.core /t:touch /p:ngpackages=hMSBuild\n```\n\n```csharp\ngnt.Run(ngpackages: \"hMSBuild\", tmode: \"touch\");\n```\n\nYou can also control the mode options via `/p:use=...`\n\n```bat\ngnt ~GetNuTool /p:use=documentation\n```\n\n#### .pkg.install.bat (.pkg.install.sh)\n\n*.pkg.install.\\** are text files which can optionally be located in the root directory of the package and support the following optional arguments:\n\nArguments                             |   #   | alternative in bat | alternative in bash | Example\n--------------------------------------|-------|--------------------|---------------------|----------\nVersion of the arguments format       | `%~1` | -        | -                  | 1\nActivated tMode                       | `%~2` | -        | -                  | `install` or `run` or `touch`\nFull path to the working directory    | `%~3` | `%cd%`   | `$PWD`             | D:\\projects\\obj\\\nFull path to the package              | `%~4` | `%~dp0`  | `$(dirname \"$0\")`  | D:\\projects\\obj\\packages\\DllExport\\\n\nAccessible environment variables:\n\nEnvironment variable | Description               | Example\n---------------------|---------------------------|----------\n`GetNuTool`          | GetNuTool version         | 1.9.0.58814+bb83b59\n`debug`              | Activated debug mode      | true\n`use`                | Mode options              | help.cmd\n\n*.pkg.install.\\** can be used for any purposes related to the installation process, for example, providing License.txt\n\n```bat\ncopy /Y/V \"%~dp0\\License.txt\" \"%cd%\\\"\n```\n\nor updating the version number for the directory up to the received \n\n```bat\nset /p _version=\u003c\"%~4\\.version\"\nren \"%~4\" MyPackage.%_version%\n```\n\nor to start setting up or updating something automatically.\n\nAdditionally `touch` mode allows to wrap or deliver anything, for example:\n\n1. Add *.pkg.install.bat*\n\n```bat\n@echo off\nif not \"%~2\"==\"touch\" exit /B0\nif \"%use%\"==\"help\" (\n    echo.\n    echo In the Beginning the World ...\n    exit /B0\n)\n```\n\n2. Generate package:\n\n\u003e gnt /t:pack /p:ngin=D:\\prg\\MyPackage\n\n3. Upload to the server you want.\n4. In the end, your workflow will contain nothing but the result after `gnt ~MyPackage /p:use=help`\n\n```\n\u003e gnt ~MyPackage /p:use=help /p:info=no;logo=no\n\nIn the Beginning the World ...\n```\n\nFor a real example, see the following *.pkg.install.bat* from *DllExport* package (1.8.2+)\n\n```bat\n@echo off\ncopy /Y/V \"%~dp0\\DllExport.bat\" \"%cd%\\\"\u003enul || exit /B1\nif \"%~2\"==\"touch\" exit /B0\n\n    set /p _version=\u003c\"%~dp0\\.version\"\n    set /p _rel=\u003c\"%~dp0\\.release.version\"\n    if defined _rel set _version=%_version%-%_rel%\n\nset \"dst=%~dp0\\..\\DllExport.%_version%\"\nif exist \"%dst%\" rmdir /S/Q \"%dst%\"\n\n::`ren` must be processed as a single command along with the called program due to line-by-line processing by the cmd processor after loss of src\nren \"%~dp0\" DllExport.%_version% \u0026\u0026 if \"%~2\"==\"run\" (\"%cd%\\DllExport.bat\") else echo.exit/B0\u003e\"%dst%\\.cmd\"\u0026\"%dst%\\.cmd\"\n```\n\nLogic follows the instructions from [here](https://github.com/3F/DllExport/wiki/Quick-start):\n1. Copy *DllExport.bat* into solution folder.\n1. Don't do anything else if activated `touch` mode (i.e. `gnt ~DllExport`). Otherwise:\n    1. Associate the latest received package (i.e. `gnt +DllExport`) with a specific version (as if it were like `gnt +DllExport/1.8.2-RC` etc.)\n    1. Run Wizard if activated `run` mode (i.e. `gnt *DllExport`).\n\nIn the end, ~8 KB of the *gnt.bat* now helps to achieve the same result in a fully automated way.\n\n## Global Properties\n\nProperty | Value\n---------|-------------\ndebug    | `true` to add extra info in stream.\nlogo     | `no` to hide logo when processing starts.\ninfo     | `no` to hide information about receiving packages etc.\n\nFor example:\n\n```bat\ngnt /t:pack /p:ngin=packages\\LX4Cnh /p:debug=true\n```\n\n```bat\nset debug=true \u0026 gnt /p:ngpackages=\"Conari;LX4cn;Fnv1a128\";break=no\n```\n\n## Extra Editions\n\n### Compiled. SobaScript component\n\nGetNuTool now is part of [NuGetComponent](https://3F.github.io/web.vsSBE/doc/Scripts/SBE-Scripts/Components/NuGetComponent/)\n\n```java\n#[NuGet gnt.raw(\"/t:pack /p:ngin=D:\\7z.Libs\")]\n```\n\n### C# GetNuTool.cs\n\n*GetNuTool.cs* includes a fully compatible *gnt.core* inside.\n\nAdd *GetNuTool.cs* to your project (.NET Framework 4.0+, .NET 5+, Mono, .NET Core, .NET Standard), then use it like:\n\n```csharp\nio.github._3F.GetNuTool gnt = new();\n\n// NOTE: older GetNuTool (before 1.10) used the `net.r_eg` namespace\n// var gnt = new net.r_eg.GetNuTool();\n\ngnt.Run(ngpackages: \"Conari;regXwild\");\n//...\ngnt.Run(ngpackages: \"Fnv1a128\");\n```\n\nNOTE: modern GetNuTool now provides [its own package](https://www.nuget.org/packages/GetNuTool/); In this case *GetNuTool.cs* can be automatically added to your project after installation in Visual Studio or like. Control it via `$(GetNuToolDisableCsharp)` option.\n\nTo override the way messages are printed in 1.10+\n\n```csharp\nclass MyGnt: io.github._3F.GetNuTool\n{\n    public override void StdOutLine(string msg = \"\", params object[] args)\n    {\n        base.StdOutLine(msg, args);\n    }\n\n    public override void StdErrLine(string msg = \"\", params object[] args)\n    {\n        base.StdErrLine(msg, args);\n    }\n}\n...\nMyGnt gnt = new();\ngnt.Run();\n```\n\n### Batch (.bat) edition\n\n~8 KB `gnt.bat` includes a fully compatible *gnt.core* inside.\n\n#### gnt.bat extra arguments\n\n First key to gnt.bat | Description                                                                   | Example\n----------------------|-------------------------------------------------------------------------------|----------------\n  ...                 | 1.9+ alias to `ngpackages=...`                                                | `gnt Conari`, `gnt \"regXwild;Fnv1a128\"`\n `-unpack`            | 1.6+ To generate minified gnt.core from gnt.bat.                              | `gnt -unpack`\n ~~`-msbuild`~~ path  | 1.6 - 1.8 To use specific msbuild. Removed in 1.9. Override engine instead    | `gnt -msbuild \"D:\\MSBuild\\bin\\amd64\\msbuild\" /p:ngpackages=Conari`\n`+` | 1.10+ Activate *install* mode. Automatic call `.pkg.install.*` for supported packages. `tMode == install` | `gnt +DllExport`, `gnt +\"DllExport;Conari\"`\n`*` | 1.10+ Activate *run* mode. Automatic call `.pkg.install.*` for supported packages. `tMode == run`         | `gnt *DllExport`, `gnt *\"DllExport;Conari\"`\n`~` | 1.10+ Activate *touch* mode. Automatic call `.pkg.install.*` for supported packages with their  automatic disposal. `tMode == touch`         | `gnt ~hMSBuild`\n\nOther keys to gnt.bat               | Description                        | Example\n------------------------------------|------------------------------------|---------\n`/help` `-help` `/h` `-h` `/?` `-?` | 1.9 Reserved; 1.10+ Help command;  | `gnt /help`\n\n#### Aliases to itself\n\n1.10+\n\n`gnt ~` (using *touch* mode), `gnt *` (using *run* mode), `gnt +` (using *install* mode)\n\nFor example:\n\nGets svc.gnt.bat\n\n```bat\ngnt ~\n```\n\nAccess *svc.gnt* helper and execute *-sha1-get* command\n\n```bat\ngnt ~\u0026 svc.gnt -sha1-get LX4Cnh/1.1\n```\n\nInstall and run the documentation\n```bat\ngnt */p:use=documentation\n```\n\nGet version of the core\n\n```bat\ngnt ~/p:use=version\n```\n\nsyntax\n\n```bat\ngnt ~/p:use=?\n```\n\netc.\n\nNote you can also generate wrapper using *svc.gnt -embed*, for example:\n\n```bat\ngnt ~/p:use=doc\n```\n\nas *help.bat*\n\n```bat\nsvc.gnt -embed \"~/p:use=doc\" -name help\n```\n\n#### Custom engine\n\nGetNuTool allows to override the engine in the following ways:\n\nEither create `hMSBuild.cmd` stub (inside the directory from which the call *gnt.bat* is planned, or globally using system or environment PATH) with the following content, for example:\n\n```bat\n@echo msbuild.exe\n```\n\nOr the same but using the full [hMSBuild.bat](https://github.com/3F/hMSBuild) (~19 KB) script.\n\nOr manually via **-unpack** command:\n\n```bat\ngnt -unpack \u0026 msbuild.exe gnt.core {args}\n```\n\nDeprecated:\n\n1.9: `msb.gnt.cmd` file stub and `%msb.gnt.cmd%` environment variable.\n\n1.6 - 1.8: `-msbuild` key.\n\n## NuGet package\n\n1.10+\n\nhttps://www.nuget.org/packages/GetNuTool/\n\nPredefined properties:\n\nMSBuild Properties | Description\n-------------------|---------------\n`GetNuToolRootPkg` |  Root path to the installed GetNuTool package.\n`GetNuToolBatPath` |  Path to the directory where batch scripts (.bat,.cmd).\n`GetNuToolBat`     |  Full path to *gnt.bat* edition.\n`GetNuToolSvcBat`  |  Full path to *svc.gnt.bat* helper.\n`GetNuToolCsharp`  |  Full path to *GetNuTool.cs* edition.\n`GetNuToolCore`    |  Full path to *gnt.core*.\n\nPreferences:\n\nMSBuild Property / Environment variable | Default value | Description\n----------------------------------------|---------------|---------------\n`GetNuToolDisableCsharp` |    | To prevent adding *GetNuTool.cs* for compilation with the project, set as **false**\n\n\n### Installation\n\n[GetNuTool](https://www.nuget.org/packages/GetNuTool/) supports *install* mode (+run, +touch) starting with 1.10.\n\nSupported `use` commands:\n\nCommand                 | Description\n------------------------|------------\n`?`                     | alias `svc.gnt -core syntax`\n`doc` / `documentation` | (depending on modes) Copy GetNuTool.version.html into the working directory; then open it.\n`-`                     | nothing\n` ` (empty)             | Copy fresh *gnt.bat* and *svc.gnt.bat* into the working directory.\n`version`               | alias `svc.gnt -version`\n`version-short`         | alias `svc.gnt -version-short`\n\nNote `gnt /help` is alias to `gnt ~/p:use=?`\n\nEmpty package name is alias to `GetNuTool/{version}`: `gnt ~`, `gnt +`, `gnt *`\n\nFor example, to install *gnt.bat* and *svc.gnt.bat* helper into the working directory: \n\n```bat\ngnt ~\n```\n\nNote `gnt ~GetNuTool` is equal to `gnt ~` but `gnt ~GetNuTool/1.10` can be different depending on actual *gnt.bat*\n\nSame but using addional properties (n. *ngserver*):\n\n```bat\ngnt ~/p:ngserver=...\n```\n\nAll this will result in overwriting existing local copies if there are any inside the working directory. To prevent this behaviour, update *reaonly* attribute e.g. `attrib +r gnt.bat` to lock updating and `attrib -r gnt.bat` to unlock respectively.\n\nUsing the format `gnt ~\u0026 svc.gnt ...` allows accessing to *svc.gnt* even if it doesn't exist locally, for example:\n\n\u003e gnt ~\u0026 svc.gnt -help\n\n### URLs / local paths / proxy\n\n*GetNuTool* supports hostname + IPv4 + IPv6 (via square brackets, `http://[::1]`) for specified protocol:\n\n* Over http: `http://`server/, `https://`server/\n* Over ftp: `ftp://`server/, `ftp://`usr@server/, `ftp://`usr:pwd@server/\n* Over URL File Format: `file:///`D:/path/\n\nLocal paths:\n\n* absolute: `D:/path/`, `D:\\path\\`, `D:\\\\path\\\\`, ...\n* relative: `../path/`, `..\\..\\path\\`,  ...\n\nProxy format:\n\n* `[usr[:pwd]@]host[:port]`. For example, `guest:1234@10.0.2.15:7428`\n\n## Examples\n\n```bat\ngnt vsSolutionBuildEvent/1.16.1:../SDK \u0026 SDK\\GUI\n```\n\n```bat\ngnt Conari\ngnt /p:ngpackages=Conari\nmsbuild gnt.core /p:ngpackages=Conari\n```\n\n```bat\ngnt \"Conari;regXwild;MvsSln\"\ngnt /p:ngpackages=\"Conari;regXwild;MvsSln\"\n```\n\n```bat\ngnt Fnv1a128\ngnt /t:pack /p:ngin=packages/Fnv1a128\n```\n\n```bat\ngnt LX4Cnh? /p:logo=no;info=no\n ... 65f7d7f5d29a16a91f1c0a8ae01ef65d5868c2cf[x]\n```\n\n```bat\ngnt LX4Cnh?65f7d7f5d29a16a91f1c0a8ae01ef65d5868c2cf\n```\n\n```bat\nmsbuild gnt.core /p:ngconfig=\".nuget/packages.config\";ngpath=\"../packages\"\n```\n\n```bat\ngnt Conari /p:proxycfg=\"guest:1234@10.0.2.15:7428\"\n```\n\n```bat\nset ngpackages=Conari \u0026 call gnt || echo Failed\n```\n\n```bat\ngnt \"7z.Libs;vsSolutionBuildEvent/1.16.1:../packages/SDK\"\n```\n\nDirect link to a remote package via https:\n\n```bat\ngnt :DllExport /p:ngserver=https://server/DllExport.1.7.4.nupkg\n```\n\nDirect link to a local package that will be stored at the top level next to the *gnt*\n\n```bat\ngnt : /p:ngserver=D:/local_dir/vsSolutionBuildEvent.SDK10.nupkg /p:ngpath=SDK10\n```\n\n```bat\ngnt \"Conari;Fnv1a12;LX4Cnh\" /p:break=no /p:debug=true\n\nConari use D:\\prg\\projects\\GetNuTool\\GetNuTool\\bin\\Release\\packages\\Conari\nFnv1a12 ... The remote server returned an error: (404) Not Found.\nLX4Cnh ... D:\\prg\\projects\\GetNuTool\\GetNuTool\\bin\\Release\\packages\\LX4Cnh\n- /.version\n- /build-info.txt\n- /lib/net40/LX4Cnh.dll\n- /lib/net40/LX4Cnh.xml\n- /lib/net5.0/LX4Cnh.dll\n- /lib/net5.0/LX4Cnh.xml\n- /License.txt\n- /LX4Cnh.nuspec\n- /Readme.md\n- /tools/gnt.bat\n- /tools/hMSBuild.bat\n...\n```\n\n```bat\ngnt Huid/1.0.0:src.zip /t:grab\n```\n\nSee also examples from [tests/](tests/keysAndLogicTests.bat)\n\n### Build and Use from source\n\n```bat\ngit clone https://github.com/3F/GetNuTool.git src\ncd src \u0026 build \u0026 bin\\Release\\gnt Conari\n```\n\nTest the result using the following,\n\n* [tests.bat](tests.bat) - for .bat edition\n* [tests.csharp.bat](tests.csharp.bat) - for C# edition\n\n### .sha1 official distribution\n\n*GetNuTool* releases are now accompanied by a *.sha1* file in the official distribution; At the same time, commits from which releases are published are signed with the committer's verified signature (GPG).\n\nMake sure you are using official, unmodified, safe versions.\n\nNote: *.sha1* file is a text list of published files with checksums in the format: \n\n`40-hexadecimal-digits` `\u003cspace\u003e` `file`\n\n```\ne9e533b0da8e5546eff821a40fbf7ca20ab9cf7e path\\file\n...\n```\n\n#### gnt.bat self validation\n\nIt is important to note the following: this is not a specialized protection of *gnt.bat*, this is only part of its capabilities which can also be used to check itself too.\n\nFor example, to validate itself:\n\n\u003e gnt ~\u0026 svc.gnt -sha1-cmp gnt.bat sha1 -package-as-path\n\nWhere *sha1* is the checksum from the [official distribution](https://github.com/3F/GetNuTool). Also, the official [package](https://www.nuget.org/packages/GetNuTool/) (`gnt +GetNuTool`) provides *validate.gnt.bat*; this is wrapper of the command above, located in `\\shell\\batch\\`\n\nHow safe is it?\n\nSince the testing logic is part of the feature `id[/version][?sha1]` support (here above, read about the alternative security check before each accessing on legacy windows xp etc), it is located inside *gnt.bat*. This way improves control over unexpected changes, however, it still cannot fully guarantee automatic protection against third party interference directly into the *gnt.bat*.\n\nSame for env protected properties (n. v1.10: *ngserver* and *proxycfg*); this improves control over unexpected modification in environment when processing at runtime, but this of course cannot stop direct modifications of the code. Keep this in mind.\n\n## Contributing\n\n[*GetNuTool*](https://github.com/3F/GetNuTool) is waiting for your awesome contributions!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3f%2Fgetnutool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F3f%2Fgetnutool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3f%2Fgetnutool/lists"}