Renderingen-US

Experimental through version 1. Version 0 was alpha. This is the first language release: the interface is relatively stable, not frozen. Nothing is promised stable until version 2.

operand

Translation status: English reader-locale proof. Term names and code fences follow the en pack; supporting prose may still be English.

Declares a CLI operand annotation.

Syntax: @ operand [rest] <type> <binding> [description \"...\"] [ubique] [vel <default>]

Category#

cli

Examples#

radix/corpus/reference/keyword/operandus/operandus.fab (canonical · keyword)#

Declares a CLI operand annotation.

# =============================================================================
# operand — Declares a CLI operand annotation.
# =============================================================================
#
# What this teaches:
#   • CLI operands — `@operand` declares positional arguments for CLI subcommands.
#   • Binding and description — Each operand specifies a type, binding name, and description.
#   • Variadic operands — The `rest` keyword marks an operand that consumes remaining arguments.
#
# Common mistakes:
#   • Duplicate operand bindings or type mismatches — each operand name must be unique and match its declared type.
#
# See also: option, cli, command, rest, global
# =============================================================================

# operand — CLI positional operand
#
# GRAMMAR:
#   annotation :← '@' 'operand' operandSpec
#
# EXPECTED OUTPUT:
#   No main — declaration or test-runner surface only.
#
# BACKEND:
#   declaration-only CLI metadata (whitelist: operand/operandus.fab).
#

@ cli { name = "operandus-smoke" }
@ operand { type = string, binding = input, description = "Input path" }
@ operand { rest = true, type = string, binding = files, description = "Extra files" }
main args args {
}