{"id":25879495,"url":"https://github.com/alastairlundy/cliinvoke","last_synced_at":"2026-04-08T13:31:13.117Z","repository":{"id":259065072,"uuid":"864892733","full_name":"alastairlundy/CliInvoke","owner":"alastairlundy","description":"CliInvoke is a .NET library for interacting with Command Line Interfaces and wrapping around executables.","archived":false,"fork":false,"pushed_at":"2026-02-11T18:05:13.000Z","size":3175,"stargazers_count":7,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-12T02:15:51.811Z","etag":null,"topics":["cli","cli-wrapper","command","command-line","csharp-library","dotnet","pipe-stderr","pipe-stdin","pipe-stdout","piping","process","run-command","shell","stderr","stdin","stdout"],"latest_commit_sha":null,"homepage":"https://alastairlundy.github.io/CliInvoke/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alastairlundy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","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}},"created_at":"2024-09-29T12:57:16.000Z","updated_at":"2026-02-11T18:05:33.000Z","dependencies_parsed_at":"2026-02-11T20:11:56.292Z","dependency_job_id":null,"html_url":"https://github.com/alastairlundy/CliInvoke","commit_stats":null,"previous_names":["alastairlundy/clirunner","alastairlundy/cliinvoke"],"tags_count":79,"template":false,"template_full_name":null,"purl":"pkg:github/alastairlundy/CliInvoke","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alastairlundy%2FCliInvoke","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alastairlundy%2FCliInvoke/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alastairlundy%2FCliInvoke/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alastairlundy%2FCliInvoke/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alastairlundy","download_url":"https://codeload.github.com/alastairlundy/CliInvoke/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alastairlundy%2FCliInvoke/sbom","scorecard":{"id":1238315,"data":{"date":"2025-09-30T08:32:22Z","repo":{"name":"github.com/alastairlundy/CliInvoke","commit":"8a4a3e73287a11a878655459cf72ee613ab8d676"},"scorecard":{"version":"v5.2.1","commit":"ab2f6e92482462fe66246d9e32f642855a691dc1"},"score":7.3,"checks":[{"name":"Dependency-Update-Tool","score":10,"reason":"update tool detected","details":["Info: detected update tool: Dependabot: .github/dependabot.yml:1"],"documentation":{"short":"Determines if the project uses a dependency update tool.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#dependency-update-tool"}},{"name":"Maintained","score":10,"reason":"30 commit(s) and 3 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#packaging"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#security-policy"}},{"name":"Token-Permissions","score":10,"reason":"GitHub workflow tokens follow principle of least privilege","details":["Warn: jobLevel 'contents' permission set to 'write': .github/workflows/release-drafter.yml:24","Info: topLevel 'contents' permission set to 'read': .github/workflows/dependency-review.yml:13","Info: topLevel 'actions' permission set to 'read': .github/workflows/gh-pages.yml:12","Info: topLevel 'contents' permission set to 'read': .github/workflows/release-drafter.yml:18","Info: topLevel permissions set to 'read-all': .github/workflows/scorecard.yml:18","Info: topLevel 'contents' permission set to 'read': .github/workflows/test.yml:6","Info: topLevel 'pull-requests' permission set to 'read': .github/workflows/test.yml:7"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":8,"reason":"dependency not pinned by hash detected -- score normalized to 8","details":["Warn: nugetCommand not pinned by hash: .github/workflows/test.yml:34: pin your dependecies by either enabling central package management (https://learn.microsoft.com/nuget/consume-packages/Central-Package-Management) or using a lockfile (https://learn.microsoft.com/nuget/consume-packages/package-references-in-project-files#locking-dependencies)","Info:  11 out of  11 GitHub-owned GitHubAction dependencies pinned","Info:   7 out of   7 third-party GitHubAction dependencies pinned","Info:   0 out of   1 nugetCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":0,"reason":"Found 0/21 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#code-review"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: Mozilla Public License 2.0: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#vulnerabilities"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#cii-best-practices"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#signed-releases"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#fuzzing"}},{"name":"SAST","score":10,"reason":"SAST tool is run on all commits","details":["Info: all commits (9) are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#sast"}},{"name":"Contributors","score":0,"reason":"project has 0 contributing companies or organizations -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project has a set of contributors from multiple organizations (e.g., companies).","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#contributors"}},{"name":"Branch-Protection","score":1,"reason":"branch protection is not maximal on development and all release branches","details":["Warn: branch protection not enabled for branch '1.5.x'","Info: 'allow deletion' disabled on branch 'main'","Info: 'force pushes' disabled on branch 'main'","Warn: 'branch protection settings apply to administrators' is disabled on branch 'main'","Info: 'stale review dismissal' is required to merge on branch 'main'","Warn: required approving review count is 1 on branch 'main'","Warn: codeowners review is required - but no codeowners file found in repo","Info: 'last push approval' is required to merge on branch 'main'","Warn: no status checks found to merge onto branch 'main'","Info: PRs are required in order to make changes on branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#branch-protection"}},{"name":"CI-Tests","score":10,"reason":"4 out of 4 merged PRs checked by a CI test -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project runs tests before pull requests are merged.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#ci-tests"}}]},"last_synced_at":"2025-09-30T10:23:50.325Z","repository_id":259065072,"created_at":"2025-09-30T10:23:50.325Z","updated_at":"2025-09-30T10:23:50.325Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29487814,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T19:29:10.908Z","status":"ssl_error","status_checked_at":"2026-02-15T19:29:10.419Z","response_time":118,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cli","cli-wrapper","command","command-line","csharp-library","dotnet","pipe-stderr","pipe-stdin","pipe-stdout","piping","process","run-command","shell","stderr","stdin","stdout"],"created_at":"2025-03-02T13:18:55.145Z","updated_at":"2026-04-08T13:31:13.090Z","avatar_url":"https://github.com/alastairlundy.png","language":"C#","readme":"# CliInvoke\n\n\u003c!-- Badges --\u003e\n[![Latest NuGet](https://img.shields.io/nuget/v/CliInvoke.svg?style=flat-square\u0026label=Latest%20Stable%20Release)](https://www.nuget.org/packages/CliInvoke/)\n[![Latest Pre-release NuGet](https://img.shields.io/nuget/vpre/CliInvoke.svg?style=flat-square\u0026label=Latest%20Pre-Release)](https://www.nuget.org/packages/CliInvoke/)\n[![Downloads](https://img.shields.io/nuget/dt/CliInvoke.svg?style=flat-square)](https://www.nuget.org/packages/CliInvoke/)\n![GitHub License](https://img.shields.io/github/license/alastairlundy/CliInvoke?style=flat-square\u0026color=6a0dad)\n![OpenSSF Scorecard Score](https://img.shields.io/ossf-scorecard/github.com/alastairlundy/CliInvoke?style=flat-square\u0026label=OpenSSF%20Scorecard%20Score)\n\n\u003cimg src=\"https://github.com/alastairlundy/CliInvoke/blob/main/.assets/icon.png\" width=\"192\" height=\"192\" alt=\"CliInvoke Logo\"\u003e\n\nCliInvoke is a .NET library for interacting with Command Line Interfaces and wrapping around executables.\n\nLaunch processes, redirect standard input and output streams, await process completion, and much more.\n\n## Table of Contents\n\n* [Features](#features)\n* [Comparison vs Alternatives](#comparison-vs-alternatives)\n* [Installing CliInvoke](#installing-cliinvoke)\n    * [Supported Platforms](#supported-platforms)\n* [CliInvoke Examples](#examples)\n* [Contributing to CliInvoke](#how-to-contribute-to-cliinvoke)\n* [Used By](#used-by)\n* [Roadmap](#cliinvokes-roadmap)\n* [License](#license)\n* [Acknowledgements](#acknowledgements)\n\n## Features\n\n* Clear separation of concerns between Process Configuration Builders, Process Configuration Models, and Invokers.\n* Supports .NET Standard 2.0, .NET 8, and newer TFMs, and has few dependencies.\n* Has Dependency Injection extensions to make using it a breeze.\n* Support for specific specializations such as running executables or commands via Windows PowerShell or CMD on\n  Windows \u003csup\u003e1\u003c/sup\u003e\n* [SourceLink](https://learn.microsoft.com/en-us/dotnet/standard/library-guidance/sourcelink) support\n\n\u003csup\u003e1\u003c/sup\u003e Specializations library distributed separately.\n\n## Comparison vs Alternatives\n\n| Feature / Criterion                                                        |  CliInvoke  |                                  [CliWrap](https://github.com/Tyrrrz/CliWrap/)                                   |  [ProcessX](https://github.com/Cysharp/ProcessX)   |                             .NET Process class                             |\n|----------------------------------------------------------------------------|:-----------:|:----------------------------------------------------------------------------------------------------------------:|:--------------------------------------------------:|:--------------------------------------------------------------------------:|\n| Dedicated builder, model, and invoker types (clear separation of concerns) |      ✅      |                                                        ❌                                                         |                         ❌                          | ⚠️, offers limited separation of concerns via ProcessStartInfo model class |\n| Dependency Injection registration extensions                               |      ✅      |                                                        ❌                                                         |                         ❌                          |                                     ❌                                      |\n| Installable via NuGet                                                      |      ✅      |                                                        ✅                                                         |                         ✅                          |                            ✅ , Built into .NET                             |\n| Official cross‑platform support (advertised: Windows/macOS/Linux/BSD)      |      ✅      |                                                        ✅*                                                        |                         ❌*                         |                                     ✅                                      |  \n| Buffered and non‑buffered execution modes                                  |      ✅      |                                                        ✅                                                         |                         ✅                          |           ⚠️, can lead to deadlocks or exceptions if not careful           |\n| Support for Process/Command Timeout                                        |      ✅      |                                :warning:, limited to cancelling via CancellationToken                                | :warning:, limited to cancelling via CancellationToken |             :warning:, limited to cancelling via CancellationToken             |\n| Graceful Cancellation Support via SIGTERM/SIGINT Signals                   |  ✅, 2.3.0+  |                                                        ✅                                                         |                         ❌                          |                                     ❌                                      |\n| Small surface area and minimal dependencies                                |      ✅      |                                                        ✅                                                         |                         ✅                          |                                     ✅                                      |  \n| Licensing / repository additional terms                                    | ✅ (MPL‑2.0) | ⚠️ (MIT; test project references a source‑available library; repo contains an informal \"Terms of Use\" statement) |                      ✅ (MIT)                       |                    ✅ (.NET Runtime licensed under MIT)                     |\n\nNotes:\n\n- *Indicates not explicitly advertised for all listed OSes but may work in practice; check each project's docs.\n- The CliWrap repository includes a test project that references a source‑available (non‑open source) library; that\n  library is used for tests and is not distributed with the runtime package. The repo also contains an informal \"Terms\n  of Use\" statement — review repository files if legal certainty is required.\n\n## Installing CliInvoke\n\nCliInvoke is available on [the NuGet Gallery](https://nuget.org) but call be also installed via the ``dotnet`` SDK CLI.\n\nThe package(s) to install depends on your use case:\n\n* For use in a .NET library - Install the abstractions package, your developer users can install the Implementation and\n  Dependency Injection packages.\n* For use in a .NET app - Install the implementation package and the Dependency Injection Extensions Package\n\n| Project type / Need                                                          | Packages to install (dotnet add package ...)                                      | Notes                                                                        |\n|------------------------------------------------------------------------------|-----------------------------------------------------------------------------------|------------------------------------------------------------------------------|\n| Library author (provide abstractions only)                                   | `CliInvoke.Core`                                                                  | Only the Core (abstractions) package — consumers can choose implementations. |\n| Library or app that needs concrete builders / implementations                | `CliInvoke.Core`, `CliInvoke`                                                     | Implementation package plus Core for models/abstractions.                    |\n| Desktop or Console application (common case — use DI \u0026 convenience helpers)  | `CliInvoke.Core`, `CliInvoke`, `CliInvoke.Extensions`                             | Includes DI registration and convenience extensions for easy setup.          |\n| Any project that needs platform‑specific or shell specializations (optional) | `CliInvoke.Specializations` (install in addition to the packages above as needed) | Adds Cmd/PowerShell and other specializations; include only when required.   |\n\n### Links to packages\n\n[CliInvoke.Core Nuget](https://nuget.org/packages/CliInvoke.Core)\n[CliInvoke Nuget](https://nuget.org/packages/CliInvoke)\n[CliInvoke.Extensions Nuget](https://nuget.org/packages/CliInvoke.Extensions)\n[CliInvoke.Specializations Nuget](https://nuget.org/packages/CliInvoke.Specializations)\n\n## Supported Platforms\n\nCliInvoke supports Windows, macOS, Linux, FreeBSD, Android, and potentially some other operating systems.\n\nFor more details see the [list of supported platforms](docs/docs/Supported-OperatingSystems.md)\n\n## Getting started\n\nInstall the packages you need (example: implementation and DI extensions):\n\n```bash\ndotnet add package CliInvoke\ndotnet add package CliInvoke.Extensions\n```\n\nMinimal Program.cs (console app) — registers services, builds a simple process configuration, and runs it buffered:\n\n```csharp\nusing System;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing Microsoft.Extensions.DependencyInjection;\nusing CliInvoke;\nusing CliInvoke.Core;\nusing CliInvoke.Core.Factories;\n\nclass Program\n{\n    static async Task Main()\n    {\n        var services = new ServiceCollection();\n        services.AddCliInvoke(); // from CliInvoke.Extensions\n        var provider = services.BuildServiceProvider();\n\n        var factory = provider.GetRequiredService\u003cIProcessConfigurationFactory\u003e();\n        var invoker = provider.GetRequiredService\u003cIProcessInvoker\u003e();\n\n        // Create a simple configuration (adjust path/args for your OS)\n        var config = factory.Create(\"dotnet\", \"--info\");\n\n        // Run and get buffered output\n        BufferedProcessResult result = await invoker.ExecuteBufferedAsync(config, CancellationToken.None);\n\n        Console.WriteLine($\"ExitCode: {result.ExitCode}\");\n        Console.WriteLine(\"Stdout:\");\n        Console.WriteLine(result.StandardOutput);\n        Console.WriteLine(\"Stderr:\");\n        Console.WriteLine(result.StandardError);\n    }\n}\n```\n\nNotes\n\n- Replace \"dotnet --info\" with the executable and arguments you need for your platform.\n- For non‑buffered/streaming scenarios, use ExecuteAsync/ExecuteBufferedAsync variants and builder options to redirect\n  streams instead of buffering everything in memory.\n\n## Examples\n\n### Simple ``ProcessConfiguration`` creation with Factory Pattern\n\nThis approach uses the ``IProcessConfigurationFactory`` interface factory to create a ``ProcessConfiguration``. It\nrequires fewer parameters and sets up more defaults for you.\n\nIt can be provided with a ``Action\u003cIProcessConfigurationBuilder\u003e configure`` optional parameter where greater control is\ndesired.\n\n#### Non-Buffered Execution Example\n\nThis example gets a non buffered ``ProcessResult`` that contains basic process exit code, ID, and other information.\n\n```csharp\nusing CliInvoke.Core.Factories;\nusing CliInvoke.Core;\n\nusing Microsoft.Extensions.DependencyInjection;\n\n// Dependency Injection setup code omitted for clarity\n\n// Get services \nIProcessConfigurationFactory processConfigFactory = serviceProvider.GetRequiredService\u003cIProcessConfigurationFactory\u003e();\nIProcessInvoker _invoker_ = serviceProvider.GetRequiredService\u003cIProcessInvoker\u003e();\n\n// Simply create the process configuration.\nProcessConfiguration configuration = processConfigFactory.Create(\"path/to/exe\", \"arguments\");\n\n// Run the process configuration and get the results.\nProcessResult result = await _invoker.ExecuteAsync(configuration, CancellationToken.None);\n```\n\n#### Buffered Execution Example\n\nThis example gets a ``BufferedProcessResult`` which contains redirected Standard Output and Standard Error as strings.\n\n```csharp\nusing CliInvoke.Core.Factories;\nusing CliInvoke.Core;\n\nusing Microsoft.Extensions.DependencyInjection;\n\n// Dependency Injection setup code omitted for clarity\n\n// Get services \nIProcessConfigurationFactory processConfigFactory = serviceProvider.GetRequiredService\u003cIProcessConfigurationFactory\u003e();\nIProcessInvoker _invoker_ = serviceProvider.GetRequiredService\u003cIProcessInvoker\u003e();\n\n// Simply create the process configuration.\nProcessConfiguration configuration = processConfigFactory.Create(\"path/to/exe\", \"arguments\");\n\n// Run the process configuration and get the results.\nBufferedProcessResult result = await _invoker.ExecuteBufferedAsync(configuration, CancellationToken.None);\n```\n\n### Advanced Configuration with Builders\n\nThe following examples show how to configure and build a ``ProcessConfiguration`` depending on whether Buffering the\noutput is desired.\n\n#### Non-Buffered Execution Example\n\nThis example gets a non buffered ``ProcessResult`` that contains basic process exit code, id, and other information.\n\n```csharp\nusing CliInvoke;\nusing CliInvoke.Core;\n\nusing CliInvoke.Builders;\nusing CliInvoke.Core.Builders;\n\nusing Microsoft.Extensions.DependencyInjection;\n\n  //Namespace and class code ommitted for clarity \n\n  // ServiceProvider and Dependency Injection setup code oomittedfor clarity\n  \n  IProcessInvoker _processInvoker = serviceProvider.GetRequiredService\u003cIProcessInvoker\u003e();\n\n  // Fluently configure your Command.\n  IProcessConfigurationBuilder builder = new ProcessConfigurationBuilder(\"Path/To/Executable\")\n                            .SetArguments([\"arg1\", \"arg2\"])\n                            .SetWorkingDirectory(\"/Path/To/Directory\");\n  \n  // Build it as a ProcessConfiguration object when you're ready to use it.\n  ProcessConfiguration config = builder.Build();\n  \n  // Execute the process through ProcessInvoker and get the results.\nProcessResult result = await _processConfigInvoker.ExecuteAsync(config);\n```\n\n#### Buffered Execution Example\n\nThis example gets a ``BufferedProcessResult`` which contains redirected StandardOutput and StandardError as strings.\n\n```csharp\nusing CliInvoke;\nusing CliInvoke.Builders;\n\nusing CliInvoke.Core;\nusing CliInvoke.Core.Builders;\n\nusing Microsoft.Extensions.DependencyInjection;\n\n\n  //Namespace and class code ommitted for clarity \n\n  // ServiceProvider and Dependency Injection setup code ommitted for clarity\n  \n  IProcessInvoker _processInvoker = serviceProvider.GetRequiredService\u003cIProcessInvoker\u003e();\n\n  // Fluently configure your Command.\n  IProcessConfigurationBuilder builder = new ProcessConfigurationBuilder(\"Path/To/Executable\")\n                            .SetArguments([\"arg1\", \"arg2\"])\n                            .SetWorkingDirectory(\"/Path/To/Directory\")\n                            .RedirectStandardOutput(true)\n                           .RedirectStandardError(true);\n  \n  // Build it as a ProcessConfiguration object when you're ready to use it.\n  ProcessConfiguration config = builder.Build();\n  \n  // Execute the process through ProcessInvoker and get the results.\nBufferedProcessResult result = await _processInvoker.ExecuteBufferedAsync(config);\n```\n\n## How to Build CliInvoke's code\n\nPlease see [building-cliinvoke.md](docs/docs/building-cliinvoke.md) for how to build CliInvoke from source.\n\n## How to Contribute to CliInvoke\n\nPlease see the [CONTRIBUTING.md file](CONTRIBUTING.md) for code and localization contributions.\n\nIf you want to file a bug report or suggest a potential feature to add, please check out\nthe [GitHub issues page](https://github.com/alastairlundy/CliInvoke/issues/) to see if a similar or identical issue is\nalready open.\nIf there isn't already a relevant issue filed,\nplease [file one here](https://github.com/alastairlundy/CliInvoke/issues/new) and follow the respective guidance from\nthe appropriate issue template.\n\n## Used By\n\nCliInvoke is used by these projects:\n\n* [WCountLib.Providers.wc](https://github.com/alastairlundy/WCount/tree/main/src/lib/WCountLib.Providers.wc) -\n  Implements WCountLib.Abstractions using the Unix ``wc`` command.\n\nWant your project added to this list? [Open an issue](https://github.com/alastairlundy/cliinvoke/issues/new/)\n\n## CliInvoke's Roadmap\n\nCliInvoke aims to make working with Commands and external processes easier.\n\nWhilst an initial set of features are available in version 1, there is room for more features and for modifications of\nexisting features in future updates.\n\nFuture updates may focus on one or more of the following:\n\n* Improved ease of use\n* Improved stability\n* New features\n* Enhancing existing features\n\n## New vs Old Package and Namespace\n\nCliInvoke changed it's Nuget package ID and namespace starting from the re-release of 2.0.0 (tagged as 2.0.0-v2) and has\nsince been published directly under the ``CliInvoke`` package ID prefix and namespace.\n\nThe previous packages Ids are marked as deprecated and will not receive future updates.\n\n## License\n\nCliInvoke is licensed under the MPL 2.0 license. You can learn more about it [here](https://www.mozilla.org/en-US/MPL/)\n\nShould your project incorporate CliInvoke, ensure that the full text of CliInvoke's LICENSE.txt is either incorporated\ninto your third-party licenses TXT file or provided as a distinct TXT file within your project's repository.\n\n### CliInvoke Assets\n\nCliInvoke's Icon is owned by and has all rights reserved to me (Alastair Lundy).\n\nIf you fork CliInvoke and re-distribute it, please replace the icon unless you have prior written approval from me.\n\n## Acknowledgements\n\n### Projects\n\nThis project would like to thank the following projects for their work:\n\n* [CliWrap](https://github.com/Tyrrrz/CliWrap/) for inspiring this project\n* [Polyfill](https://github.com/SimonCropp/Polyfill) for simplifying .NET Standard 2.0 support\n\nFor more information, please see\nthe [THIRD_PARTY_NOTICES file](https://github.com/alastairlundy/CliInvoke/blob/main/THIRD_PARTY_NOTICES.txt).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falastairlundy%2Fcliinvoke","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falastairlundy%2Fcliinvoke","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falastairlundy%2Fcliinvoke/lists"}