Hyprx.Exec 0.0.0-alpha.1

This is a prerelease version of Hyprx.Exec.
dotnet add package Hyprx.Exec --version 0.0.0-alpha.1
                    
NuGet\Install-Package Hyprx.Exec -Version 0.0.0-alpha.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Hyprx.Exec" Version="0.0.0-alpha.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Hyprx.Exec" Version="0.0.0-alpha.1" />
                    
Directory.Packages.props
<PackageReference Include="Hyprx.Exec" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Hyprx.Exec --version 0.0.0-alpha.1
                    
#r "nuget: Hyprx.Exec, 0.0.0-alpha.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Hyprx.Exec&version=0.0.0-alpha.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Hyprx.Exec&version=0.0.0-alpha.1&prerelease
                    
Install as a Cake Tool

Hyprx.Exec

Overview

Provides a wrapper for executing apps from the command line similar to Go and Rust's Command implementation under os/exec.

There are additional commands to make it easier run scripts using pwsh, bash, sh, windows cmd, deno, bun, node, ruby, or python.

Usage

using Hyprx.Exec;

var output = new Command("dotnet")
    .WithArgs(["--version"])
    .Run();

Console.WriteLine(output.ExitCode);

output = new Command("dotnet")
    .WithArgs(["--version"])
    .Output();

// get the stdout as text.
Console.WriteLine(output.Text().Trim());
Console.WriteLine(output.Stdout.GetType().Name); // byte[]

// throws an exception if exit code is not zero
output.ThrowOnBadExit();

var pwsh = new PwshCommand();

pwsh.RunScript("echo 'Hello'");
pwsh.RunScript("./path/to/script.ps1");

// piping commands

var output = new Command(["echo", "my test"])
            .Pipe(["grep", "test"])
            .Pipe("cat")
            .Output();

Console.WriteLine(output.Text()); // my test
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Hyprx.Exec:

Package Downloads
Hyprx.Shell

Shell makes it easier to use functionality in .NET single file apps similar to what you would find in a shell script such as common posix file system utilities, echo, print, running commands, and more.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.0-alpha.1 113 6/25/2025
0.0.0-alpha.0 117 6/17/2025

# Hyprx.Exec Changelog

## 0.0.0-alpha.0

- Add core command class.
- Enable chaining commands.
- Enable running scripts for pwsh, bash, sh, windows cmd, deno,
 bun, node, python, and ruby.
 
## 0.0.0-alpha.1

- Add the interface ICommandArgsBuilder and abstract class
 CommandArgsBuilder to make it easier to create CommandArgsClasses
 for clis that have many sub commands.