Structure
Commands
Represents a top-level group of configured commands. This is usually created by calling
resolve(for:) on Commands.struct Commands
Topics
Initializers
init(commands: [String : any AnyCommand], defaultCommand: (any AnyCommand)?, enableAutocomplete: Bool)Creates a newConfiguredCommandsstruct. This is usually done by callingresolve(for:)onCommands.
Instance Properties
var commands: [String : any AnyCommand]Top-level available commands, stored by unique name.var defaultCommand: (any AnyCommand)?If set, this is the default top-level command that should run if no other commands are specified.var enableAutocomplete: BoolIftrue, anautocompletesubcommand will be added to any createdCommandGroup.
Instance Methods
func group(help: String) -> any CommandGroupCreates aCommandGroupfor thisCommands.func use(any AnyCommand, as: String, isDefault: Bool)Adds aCommandinstance to the config.
Relationships
Conforms To
Swift.SendableSwift.SendableMetatype