Flucli 0.2.0-beta

This is a prerelease version of Flucli.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Flucli --version 0.2.0-beta                
NuGet\Install-Package Flucli -Version 0.2.0-beta                
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="Flucli" Version="0.2.0-beta" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Flucli --version 0.2.0-beta                
#r "nuget: Flucli, 0.2.0-beta"                
#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.
// Install Flucli as a Cake Addin
#addin nuget:?package=Flucli&version=0.2.0-beta&prerelease

// Install Flucli as a Cake Tool
#tool nuget:?package=Flucli&version=0.2.0-beta&prerelease                

NuGet GitHub license Actions

Flucli

Library for interacting with external command-line interfaces.

Ported from CliWrap and support .netstandard 2.0 without other dependencies.

Support Verb="runas" and simplify some APIs.

Usage

Command

CliResult result = await "cmd"
    .WithArguments("/c echo Hello World!")
    .ExecuteAsync();

Console.WriteLine("ExitCode is " + result.ExitCode);

Piper

StringBuilder stdout = new();
StringBuilder stderr = new();

var command1 = "cmd"
    .WithArguments("/c echo Hello World!");

var command2 = "cmd"
    .WithArguments("/c findstr o")
    .WithStandardOutputPipe(PipeTarget.ToStringBuilder(stdout, Encoding.UTF8))
    .WithStandardErrorPipe(PipeTarget.ToStringBuilder(stderr, Encoding.UTF8));

CliResult result = await (command1 | command2).ExecuteAsync();

Console.WriteLine("STDOUT: " + stdout.ToString());
Console.WriteLine("STDERR: " + stderr.ToString());
Console.WriteLine("ExitCode is " + result.ExitCode);

Parser

StringBuilder stdout = new();
StringBuilder stderr = new();

Cli command = "cmd /c echo Follow | cmd /c findstr F | cmd /c findstr l*"
    .ParseCli()
    .PipeTail // Switch to tail command
    .WithStandardOutputPipe(PipeTarget.ToStringBuilder(stdout, Encoding.UTF8))
    .WithStandardErrorPipe(PipeTarget.ToStringBuilder(stderr, Encoding.UTF8))
    .PipeHeader; // Switch to header command

CliResult result = await command.ExecutePipeAsync();

Console.WriteLine("STDOUT: " + stdout.ToString());
Console.WriteLine("STDERR: " + stderr.ToString());
Console.WriteLine("ExitCode is " + result.ExitCode);
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net5.0-windows7.0 is compatible.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net6.0-windows7.0 is compatible.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net7.0-windows7.0 is compatible.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net8.0-windows7.0 is compatible. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 is compatible.  net472 is compatible.  net48 is compatible.  net481 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.7.1

    • No dependencies.
  • .NETFramework 4.7.2

    • No dependencies.
  • .NETFramework 4.8

    • No dependencies.
  • .NETFramework 4.8.1

    • No dependencies.
  • .NETStandard 2.0

    • No dependencies.
  • net5.0-windows7.0

    • No dependencies.
  • net6.0-windows7.0

    • No dependencies.
  • net7.0-windows7.0

    • No dependencies.
  • net8.0-windows7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.3.2 191 11/10/2024
0.3.1 88 11/9/2024
0.3.0 74 11/9/2024
0.2.0-beta 78 9/24/2024
0.1.0-beta 81 9/7/2024