KetraTerm
API · DevelopmentAll versions

TerminalCommandSpec

data class TerminalCommandSpec @JvmOverloads constructor(val name: String, val description: String = "", val aliases: List<String> = emptyList(), val subcommands: List<TerminalCommandSpec> = emptyList(), val options: List<TerminalOptionSpec> = emptyList(), val positionalArguments: List<TerminalArgumentSpec> = emptyList(), val positionalArgumentPathKind: TerminalPathArgumentKind = TerminalPathArgumentKind.NONE, val positionalArgumentValueDomain: TerminalCompletionValueDomain = TerminalCompletionValueDomain.NONE, val positionalArgumentHiddenPathPolicy: TerminalHiddenPathPolicy = TerminalHiddenPathPolicy.DEFAULT, val repeatableSubcommands: Boolean = false)

Declarative command specification consumed by the in-process completion engine.

This is KetraTerm's stable internal model. External formats, including Fig-style specs, should be imported into this representation instead of being exposed to UI modules.

Throws

if name or any alias is blank.

Constructors

Link copied to clipboard
constructor(name: String, description: String = "", aliases: List<String> = emptyList(), subcommands: List<TerminalCommandSpec> = emptyList(), options: List<TerminalOptionSpec> = emptyList(), positionalArguments: List<TerminalArgumentSpec> = emptyList(), positionalArgumentPathKind: TerminalPathArgumentKind = TerminalPathArgumentKind.NONE, positionalArgumentValueDomain: TerminalCompletionValueDomain = TerminalCompletionValueDomain.NONE, positionalArgumentHiddenPathPolicy: TerminalHiddenPathPolicy = TerminalHiddenPathPolicy.DEFAULT, repeatableSubcommands: Boolean = false)

Properties

Link copied to clipboard

additional tokens that resolve to this command.

Link copied to clipboard

short human-readable description.

Link copied to clipboard

canonical command or subcommand token.

Link copied to clipboard

options available at this command level.

Link copied to clipboard
Link copied to clipboard

file-system path kind accepted by bare positional arguments after this command or subcommand.

Link copied to clipboard

ordered positional argument declarations. When nonempty, they take precedence over the scalar positional metadata.

Link copied to clipboard

dynamic host-owned value domain accepted by bare positional arguments after this command or subcommand.

Link copied to clipboard

whether multiple child subcommand tokens may appear as sibling positional command values. This models task-style CLIs such as Gradle, where gradle clean build is a sequence of tasks rather than build being nested below clean.

Link copied to clipboard

nested subcommands available after this command.