milpa itself command-tree
Prints a tree of known commands
Usage
milpa itself command-tree [options] [PREFIX...]
Description
Prints out command names and descriptions, or optionally a nested representation of all properties of commands, serialized as json or yaml. Custom textual representations of commands can be obtained by using the --template option and specifying a go-template to be applied to every command. See chinampa/pkg.Command and milpa/internal/command.Meta for references on the structs available during template rendering.
Examples
# print all known subcommands
milpa itself command-tree
# print a tree of milpa itself sub-commands
milpa itself command-tree itself
# get all commands as a json tree
milpa itself command-tree --output json
# same, but as the yaml representation of this command itself
milpa itself command-tree --output json itself command-tree
# print out all commands, skipping groups
milpa itself command-tree --template '{{ if (not (eq .Command.Meta.Kind "virtual")) }}{{ .Command.FullName }}'$'\n''{{ end }}'
Arguments
PREFIX...- Sets the name prefix to list from
Options
--depth(string): The maximum depth to search for commands. Default: 15.--output(string): the format to output results in. Default: text.--template(string): with--output text, a go template to apply to every command.
Global Options
--color(bool): Always print colors to stderr. Default: true.--help(bool): Display help for any command.--no-color(bool): Disable printing of colors to stderr.--silent(bool): Silence non-error logging.--skip-validation(bool): Do not validate any arguments or options.--verbose(bool): Log verbose output to stderr.