SopsCommand.Builder

Fluent builder for SopsCommand.

public sealed class SopsCommand.Builder

1. Methods

1.1. Build()

Builds the command. Throws when required fields are missing.

public SopsCommand Build()

Returns: SopsCommand

1.2. Create()

Creates a new builder.

public static SopsCommand.Builder Create()

Returns: SopsCommand.Builder

1.3. WithEntry(string, string)

Sets one flat/single-line entry. A value containing a newline is auto-detected as multiline (rendered as a block scalar). Same-key entries upsert.

public SopsCommand.Builder WithEntry(string key, string value)
Table 1. Parameters
Name Type Description

key

string

value

string

Returns: SopsCommand.Builder

1.4. WithMultilineEntry(string, string)

Sets one multiline entry (rendered as a YAML block scalar). Same-key entries upsert.

public SopsCommand.Builder WithMultilineEntry(string key, string value)
Table 2. Parameters
Name Type Description

key

string

value

string

Returns: SopsCommand.Builder

1.5. WithOutputPath(AbsolutePath)

Sets the output yaml path (required).

public SopsCommand.Builder WithOutputPath(AbsolutePath path)
Table 3. Parameters
Name Type Description

path

AbsolutePath

Returns: SopsCommand.Builder

1.6. WithRecipient(string)

Adds an age public key recipient (at least one required).

public SopsCommand.Builder WithRecipient(string ageRecipient)
Table 4. Parameters
Name Type Description

ageRecipient

string

Returns: SopsCommand.Builder

1.7. WithSecret(NixSecretEntry)

Adds a pre-built secret entry (nested key paths + explicit multiline flag). Same-key upsert.

public SopsCommand.Builder WithSecret(NixSecretEntry entry)
Table 5. Parameters
Name Type Description

entry

NixSecretEntry

Returns: SopsCommand.Builder