Skip to content

augustoproiete/dotnet-args

Repository files navigation

README.md

dotnet-args

dotnet-args

Cross-platform .NET CLI Tool that prints the command-line arguments it receives, to help debug scripts and apps.

NuGet Version .NET .NET Core Stack Overflow

Screenshot of dotnet-args in action

Give a Star! ⭐

If you like or are using this project please give it a star. Thanks!

Background

When developing applications that can receive command-line arguments, it can be useful to test what command-line arguments the application would receive without actually running the application.

Another example where dotnet-args can be useful is when writing scripts for multiple platforms (e.g. run.cmd, run.ps1, run.sh, etc.) that forward arguments to an application or another script. You can modify the scripts temporarily to forward the arguments to dotnet-args instead of the real application, and test that the scripts are forwading the arguments as expected.

Prerequisites

The latest version of dotnet-args runs on Windows, OSX, and Linux using one of the following versions of .NET:

  • .NET 7.0
  • .NET 6.0
  • .NET 5.0
  • .NET Core 3.1
  • .NET Core 2.1

Getting started 🚀

Install the dotnet-args .NET CLI Tool from NuGet:

dotnet tool install dotnet-args --global

Next, call dotnet-args with the arguments that you'd like to test, for example:

dotnet args --file project.zip --message "My project!"

Screenshot of dotnet-args in action

More details on .NET CLI tools available on the official documentation from Microsoft.

Release History

Click on the Releases tab on GitHub.


Copyright © 2020-2023 C. Augusto Proiete & Contributors - Provided under the Apache License, Version 2.0. dotnet-args logo is a derivative of work by Goescat Wei (original).