Reference¶
Complete reference for all nodes and properties supported in a lets.kdl file.
Top-level nodes¶
description¶
Top-level help text shown in lets --help.
config¶
Global configuration.
include¶
Import commands from another KDL file. Paths are relative to the including file.
Command nodes¶
Any top-level node that isn't description, config, or include defines a command.
One-liner syntax¶
Block syntax¶
Command child nodes¶
description¶
Short help text shown in command lists.
long-description¶
Extended help text shown in lets <command> --help.
long-description """
Extended description with multiple lines.
Shown when viewing the command's own help.
"""
examples¶
Usage examples shown at the bottom of --help.
run¶
Shell command to execute. Multiple run nodes execute sequentially.
run-macos, run-linux, run-windows¶
Platform-specific run commands. Falls back to run if no match.
arg¶
Positional argument.
| Property | Type | Description |
|---|---|---|
| (first positional) | string | Argument name (required) |
| (remaining positional) | strings | Allowed choices |
help |
string | Help text |
default |
string | Default value (makes arg optional) |
flag¶
Boolean or valued flag.
| Property | Type | Description |
|---|---|---|
| (first positional) | string | Flag name (required) |
| (second positional) | string | Short alias (e.g. "-v") |
help |
string | Help text |
type |
string | Value type: "string", "int", "float" |
default |
string | Default value (valued flags only) |
deps¶
Tasks to run in parallel before this command.
steps¶
Tasks to run sequentially before this command.
before, after¶
Shell commands to run before/after the main run.
env¶
Set environment variables.
env-file¶
Load environment variables from a file. Explicit env values override.
dir¶
Set working directory.
shell¶
Override the shell (default: sh or global config shell).
platform¶
Restrict to specific platforms: "macos", "linux", "windows".
confirm¶
Yes/no confirmation prompt. Supports interpolation. Bypassed with --yes.
prompt¶
Text input bound to a variable.
choose¶
Selection menu bound to a variable.
alias¶
Alternative names for this command.
timeout¶
Kill after a duration. Formats: ms, s, m, h, or plain seconds.
retry¶
Retry on failure.
silent / quiet¶
Suppress output unless the command fails.
hide¶
Hide from --help and --list. Command still works when invoked directly.
deprecated¶
Mark as deprecated with optional message.
cmd¶
Escape reserved names as subcommands.
Interpolation¶
| Syntax | Description |
|---|---|
{name} |
Positional arg, valued flag, or interactive variable |
{?flag:text} |
Emit text if boolean flag is set |
{--} |
Passthrough arguments after -- |
{$VAR} |
Environment variable |
Execution order¶
deps(parallel)steps(sequential)- Interactive:
choose,prompt confirmbeforehookruncommands (sequential, with interpolation)afterhook