CommandRegistry class

Core registry to manage and load CLI commands.

Constructors

CommandRegistry(Logger logger)

Properties

commands List<KhademCommand>
Get all registered commands (core + custom).
no setter
coreCommands List<KhademCommand>
Get only core commands.
no setter
customCommands List<KhademCommand>
Get only custom commands.
no setter
hashCode int
The hash code for this object.
no setterinherited
logger Logger
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

autoDiscoverCommands(String projectPath) Future<void>
Auto-discover and register custom commands from the user's project using mirrors.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerCustom(KhademCommand command) → void
Register additional custom CLI commands (e.g., from plugins).
registerCustomCommand(KhademCommand command) → void
Programmatic API for external projects to register custom commands. This is the recommended way for external projects to add commands.
suggestCommands(String input, {int limit = 3}) List<String>
Returns close matches for a command name (for smarter UX on typos).
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited