Table of Contents

Class TigerCliRawArgumentsAttribute

Namespace
ItTiger.TigerCli.Commands
Assembly
ItTiger.TigerCli.dll
Declares that a command accepts a raw trailing argument tail: every command-line token after the first -- separator, bound literally and in order. Apply to a writable string-collection property on a TigerCliSettings-derived type.
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public sealed class TigerCliRawArgumentsAttribute : Attribute
Inheritance
TigerCliRawArgumentsAttribute
Inherited Members

Remarks

The tail exists for commands that hand their trailing tokens to something else — a child executable, a nested tool, a pass-through argument list. TigerCli parses only the head of the command line (the part before --) and never inspects the tail: tail tokens are not matched against app options, framework options such as --theme / --non-interactive, or app-contributed global options; they are never prompted for and never validated against a provider.

The separator itself is not part of the bound tail. Every token after it is preserved exactly, including tokens starting with - or --, repeated tokens, empty strings, and any later --. Only the first -- splits the command line.

Support is opt-in per command. A command whose settings type does not declare this attribute rejects a supplied tail as a usage error with the standard help hint.

public sealed class ExecSettings : TigerCliSettings
{
    [TigerCliOption("--connection-string-env", Description = "Environment variable holding the connection string.")]
    public string ConnectionStringEnv { get; set; } = string.Empty;

    [TigerCliRawArguments(
        Name = "tool-args",
        Description = "Child executable and its arguments, passed through unchanged.",
        Required = true)]
    public IReadOnlyList<string> Arguments { get; init; } = [];
}
Invoked as app exec --connection-string-env DB_CONNECTION -- my-tool --report, the command receives ["my-tool", "--report"].

Supported property types are string[], List<string>, and IReadOnlyList<string>; the property must be writable (an init accessor is fine). A settings type may declare at most one raw-argument property, and the property must not also carry TigerCliOptionAttribute or TigerCliArgumentAttribute. Violations are configuration errors and fail when the application is built.

Properties

Description

Fallback help text for the tail. Replaced by DescriptionResourceKey when that key resolves.
public string? Description { get; set; }

Property Value

string

DescriptionResourceKey

Optional resource key resolved through the app-owned ResourceManager registered via TigerCliAppBuilder.UseAppResources(...) against the active run culture. When the key resolves to a non-empty string it replaces Description in help. Missing keys silently fall back to Description; the raw key is never surfaced.
public string? DescriptionResourceKey { get; set; }

Property Value

string

Name

Optional display name used in generated help, rendered as -- <name>.... When not set, a kebab-case form of the property name is used.
public string? Name { get; set; }

Property Value

string

Required

When true, the command requires at least one token after the separator. Both a missing separator and an empty tail (app exec --) then fail with a usage error and the MissingRequiredArgument exit mapping. The tail is never prompted for, so a required tail fails identically in both interaction modes. The default is false, which binds an empty collection.
public bool Required { get; set; }

Property Value

bool