Universal.GenerativeAI.CommandCompression 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Universal.GenerativeAI.CommandCompression --version 1.0.0
                    
NuGet\Install-Package Universal.GenerativeAI.CommandCompression -Version 1.0.0
                    
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="Universal.GenerativeAI.CommandCompression" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Universal.GenerativeAI.CommandCompression" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Universal.GenerativeAI.CommandCompression" />
                    
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 Universal.GenerativeAI.CommandCompression --version 1.0.0
                    
#r "nuget: Universal.GenerativeAI.CommandCompression, 1.0.0"
                    
#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.
#:package Universal.GenerativeAI.CommandCompression@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Universal.GenerativeAI.CommandCompression&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Universal.GenerativeAI.CommandCompression&version=1.0.0
                    
Install as a Cake Tool

Universal.GenerativeAI.CommandCompression

Lossy, LLM-context-oriented compression of CLI command output — git, docker, kubectl, cloud CLIs, build tools, test runners, package managers, and more — independent of any specific agent framework.

CommandCompressor

The main entry point. Tokenizes a raw command string and compresses its captured stdout/stderr against the registered compressors, always falling back to the original output unchanged when nothing recognizes the shape.

var compressor = CommandCompressorBuilder.FromDefaults().Build();
var result = compressor.Compress("git status --porcelain -b", stdout, stderr, exitCode);

if (result.WasCompressed)
{
    Console.WriteLine(result.Stdout); // shorter, still semantically equivalent
}

CommandCompressorBuilder

Assembles the compressor battery. FromDefaults() registers every compressor this library ships; the builder exposes Add/Remove/Replace/AddBefore/AddAfter so a caller can take the defaults and make a small, targeted change without rebuilding the list by hand.

var builder = CommandCompressorBuilder.FromDefaults();
builder.RemoveCompressors<PingCompressor>();
builder.AddCompressorAfter<GitCompressor>(new MyCustomCompressor());

var compressor = builder.Build();

What's covered

Version control (git, gh), containers and orchestration (docker, kubectl, helm, podman, oc, stern), cloud CLIs (aws, azure, gcloud), infrastructure (terraform, ansible), build tools (dotnet, gradle, maven, cargo, go, npm, pnpm, yarn, pip, uv, poetry, bundle, turbo, nx), test runners (pytest, jest, vitest, playwright, go test, cargo test, dotnet test, rspec, rake), linters and type-checkers (eslint, tsc, ruff, mypy, biome, semgrep), security scanners (npm audit, snyk, trivy), databases (psql, mysql), and general-purpose tools (curl, wget, grep, ping, jq).

Design principles

  • Correctness over compression ratio. When a compressor can't positively confirm a shape is safe to collapse, it leaves the output untouched rather than guessing.
  • No process ownership. This library never runs commands itself — callers execute commands however they already do and hand the captured output to Compress.
  • Fail open. Every compressor declines safely on output it doesn't recognize; nothing here can corrupt data it doesn't understand.
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  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.  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.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
.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 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
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.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Universal.GenerativeAI.CommandCompression:

Package Downloads
Universal.Operative.Sdk.Compression

Shell tool output compression for Universal.Operative.Sdk: an AfterExecute hook backed by Universal.GenerativeAI.CommandCompression, and a BeforeExecute hook that proxies simple commands through the external rtk CLI.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0 175 8/21/2026
1.0.0 225 7/26/2026

Initial release.