Hyprx.Exec
0.0.0-alpha.1
dotnet add package Hyprx.Exec --version 0.0.0-alpha.1
NuGet\Install-Package Hyprx.Exec -Version 0.0.0-alpha.1
<PackageReference Include="Hyprx.Exec" Version="0.0.0-alpha.1" />
<PackageVersion Include="Hyprx.Exec" Version="0.0.0-alpha.1" />
<PackageReference Include="Hyprx.Exec" />
paket add Hyprx.Exec --version 0.0.0-alpha.1
#r "nuget: Hyprx.Exec, 0.0.0-alpha.1"
#addin nuget:?package=Hyprx.Exec&version=0.0.0-alpha.1&prerelease
#tool nuget:?package=Hyprx.Exec&version=0.0.0-alpha.1&prerelease
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 | Versions 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. |
-
net10.0
- Hyprx.Core (>= 0.0.0-alpha.1)
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.