Skip to main content
Version: Next

jq CLI reference

ModularPipelines.Jq provides strongly typed access to the jq CLI.

Executable prerequisite

This package does not install the jq executable. Install it separately and ensure jq is available on PATH.

Follow the executable's official documentation for installation instructions.

Package installation

dotnet add package ModularPipelines.Jq

Resolve the service with context.Tools.Jq. Projects using C# 13 or another .NET language can use context.Tools.Get<ModularPipelines.Jq.Services.IJq>() instead.

Module example

using ModularPipelines;
using ModularPipelines.Jq.Options;

public class RunCommandModule : Module<CommandResult>
{
protected override async Task<CommandResult> ExecuteAsync(
IModuleContext context,
CancellationToken cancellationToken)
{
return await context.Tools.Jq.ExecuteAsync(
new JqExecuteOptions()
{
Filter = ".",
InputFiles = ["input.json"],
},
cancellationToken: cancellationToken);
}
}

Commands

CLI commandOptions record
jqJqExecuteOptions