Universal.GenerativeAI.CommandCompression
1.0.0
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
<PackageReference Include="Universal.GenerativeAI.CommandCompression" Version="1.0.0" />
<PackageVersion Include="Universal.GenerativeAI.CommandCompression" Version="1.0.0" />
<PackageReference Include="Universal.GenerativeAI.CommandCompression" />
paket add Universal.GenerativeAI.CommandCompression --version 1.0.0
#r "nuget: Universal.GenerativeAI.CommandCompression, 1.0.0"
#:package Universal.GenerativeAI.CommandCompression@1.0.0
#addin nuget:?package=Universal.GenerativeAI.CommandCompression&version=1.0.0
#tool nuget:?package=Universal.GenerativeAI.CommandCompression&version=1.0.0
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 | Versions 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. |
-
.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.
Initial release.