Documentation

Schema Reference

Each command owns its parameters, so the hierarchy is expressed by nesting. A parameter belongs to exactly one command, and its key only needs to be unique among that command's parameters - so the same flag can appear on sibling commands. A parameter with recursive: true is inherited by every command beneath the one it belongs to.

Tool Object

The root object of a Commandly tool description.

FieldTypeRequiredDescription
binaryNamestring✓Unique CLI binary name for the tool, such as httpx or curl.
displayNamestring✓Human-readable display name.
interactiveboolean-If true, invoking the root tool opens an interactive session or prompt.
infoToolInfo Object-Metadata about the tool, including the homepage URL.
installationInstallation Object-Structured installation sources for the tool.
commandsCommand Object[]✓Top-level commands. Subcommands are nested on their parent.
parametersParameter Object[]✓Parameters accepted by the tool itself, before a command is chosen.
exclusionGroupsExclusionGroup Object[]-Groups of the tool's own parameters that are mutually exclusive or required.
metadataToolMetadata Object-Custom metadata.

ToolInfo Object

FieldTypeRequiredDescription
descriptionstring-Short description of the tool.
versionstring-Tool version string.
urlstring-URL to the tool's homepage or repository.

Installation Object

Structured installation instructions for the tool.

FieldTypeRequiredDescription
sourcesInstallationSource[]✓The documented ways to install the tool.

InstallationSource Object

A single documented way to install the tool.

FieldTypeRequiredDescription
keystring✓Unique identifier for this source within the tool.
methodInstallationMethod✓How the tool is installed.
managerstring-Package manager name. Only set when method is package_manager (e.g. "brew", "go").
commandstring✓The command that installs the tool.
urlstring-Documentation URL describing this installation method.
osstring[]-Platforms this source applies to: linux, macos, or windows. Omit when unrestricted.
notestring-Additional context, such as prerequisites or platform restrictions.

InstallationMethod

ValueDescription
package_managerInstalled with a package manager such as brew, go, pip, npm.
binaryA prebuilt release binary is downloaded and unpacked.
dockerThe tool is pulled and run as a container image.
scriptThe tool is installed by running a vendor-provided script.

Command Object

FieldTypeRequiredDescription
keystring✓Unique identifier for this command within the tool.
displayNamestring✓Human-readable display name of the command.
aliasesstring[]-Alternate spellings that invoke this command in place of displayName.
descriptionstring-Human-readable description of the command.
interactiveboolean-If true, the command requires interactive user input at runtime. Defaults to false.
sortOrdernumber-Display sort order.
parametersParameter Object[]-Parameters accepted by this command. Keys are unique among them. Omit for grouping commands.
exclusionGroupsExclusionGroup[]-Groups of this command's parameters with mutual exclusion or required-one-of constraints.
commandsCommand Object[]-Subcommands nested beneath this command.

Parameter Object

FieldTypeRequiredDescription
keystring✓Unique identifier among its command's parameters. For flags and options this is the full flag, dashes included (e.g. "--output", "-list"); positional arguments use a plain name.
displayNamestring✓Human-readable parameter name.
parameterTypeParameterType✓One of Flag, Option, or Argument.
dataTypeParameterDataType✓One of String, Number, Boolean, or Enum.
isRequiredboolean-Whether the parameter must be provided.
isRepeatableboolean-Whether the parameter can appear more than once.
recursiveboolean-If true, the parameter is inherited by every command beneath the one it belongs to. A parameter on Tool.parameters with recursive: true is inherited by the whole tree. Defaults to false.
descriptionstring-Human-readable description.
groupstring-Display group label for UI grouping.
aliasesstring[]-Short names and other spellings for Flag and Option types (e.g. ["-o"]). The full flag is key.
positionnumber-Zero-based positional index that orders Argument parameters. Optional; defaults to 0.
sortOrdernumber-Display sort order.
arraySeparatorstring-Separator used when a repeatable parameter is joined into a single token.
keyValueSeparatorstring-Character between the flag and its value. Defaults to a space.
enumParameterEnumValues Object-Required when dataType is Enum.
validationsParameterValidation Object[]-Validation rules applied to the parameter value.
dependenciesParameterDependency Object[]-Conditional relationships with other parameters.
metadataParameterMetadata Object-Custom metadata.

ParameterType

ValueDescription
FlagA boolean switch with no value (e.g. --verbose). Use with dataType: Boolean.
OptionA named parameter that accepts a value (e.g. --output file.txt).
ArgumentA positional parameter identified by its position in the command, not a flag.

ParameterDataType

ValueDescription
StringA string value.
NumberA numeric value.
BooleanA boolean value. Typically used with Flag type.
EnumOne of a predefined set of values. Requires enum.

ParameterEnumValues Object

FieldTypeRequiredDescription
valuesParameterEnumValue Object[]✓Ordered list of allowed values.
allowMultipleboolean-Whether multiple values can be selected simultaneously.
separatorstring-Separator used when multiple values are combined into one token.

ParameterEnumValue Object

FieldTypeRequiredDescription
valuestring✓The raw value passed to the CLI.
displayNamestring✓Human-readable label shown in the UI.
descriptionstring-Description of what this value does.
isDefaultboolean-Whether this value is selected by default.
sortOrdernumber-Display sort order.

ExclusionGroup Object

Defines a group of parameters that are mutually exclusive or where exactly one must be chosen. Declare groups on the command that owns the parameters, or on the tool for its own parameters.

FieldTypeRequiredDescription
keystring-Unique identifier for the group.
displayNamestring✓Human-readable group name.
exclusionTypeExclusionType✓One of mutual_exclusive or required_one_of.
parameterKeysstring[]✓Keys of the parameters belonging to this group.

ExclusionType

ValueDescription
mutual_exclusiveAt most one parameter in the group may be set at a time.
required_one_ofExactly one parameter in the group must be set.

ParameterValidation Object

FieldTypeRequiredDescription
keystring✓Unique identifier.
validationTypeParameterValidationType✓The kind of validation to apply.
validationValuestring✓The threshold or pattern for the validation.
errorMessagestring✓Message displayed when validation fails.

ParameterValidationType

ValueDescription
min_lengthMinimum number of characters in the string value.
max_lengthMaximum number of characters in the string value.
min_valueMinimum numeric value.
max_valueMaximum numeric value.
regexRegular expression the value must match.

ParameterDependency Object

Defines a conditional relationship between two parameters.

FieldTypeRequiredDescription
keystring✓Unique identifier.
parameterKeystring✓Key of the parameter this dependency rule applies to.
dependsOnParameterKeystring✓Key of the parameter being depended upon.
dependencyTypeParameterDependencyType✓One of requires or conflicts_with.
conditionValuestring-Specific value of dependsOnParameter that activates this dependency. If omitted, the dependency applies whenever dependsOnParameter is set.

ParameterDependencyType

ValueDescription
requiresThis parameter can only be set if dependsOnParameter is also set.
conflicts_withThis parameter cannot be set when dependsOnParameter is set.

ParameterMetadata Object

FieldTypeRequiredDescription
tagsstring[]-Custom string tags. Used to annotate parameters (e.g. "non-configurable", "output-file").