registerBuiltinCommands method
void
registerBuiltinCommands({})
Register all built-in commands.
Accepts maps of command instances grouped by category. Each entry is a command instance; the registry assigns the correct category, aliases, and flags.
Call this during app initialization with all 88 built-in commands.
Implementation
void registerBuiltinCommands({
List<Command> navigationCommands = const [],
List<Command> sessionCommands = const [],
List<Command> configCommands = const [],
List<Command> toolCommands = const [],
List<Command> gitCommands = const [],
List<Command> debugCommands = const [],
List<Command> systemCommands = const [],
List<Command> helpCommands = const [],
}) {
for (final cmd in navigationCommands) {
register(cmd, category: CommandCategory.navigation);
}
for (final cmd in sessionCommands) {
register(cmd, category: CommandCategory.session);
}
for (final cmd in configCommands) {
register(cmd, category: CommandCategory.config);
}
for (final cmd in toolCommands) {
register(cmd, category: CommandCategory.tools);
}
for (final cmd in gitCommands) {
register(cmd, category: CommandCategory.git, requiresGit: true);
}
for (final cmd in debugCommands) {
register(cmd, category: CommandCategory.debug);
}
for (final cmd in systemCommands) {
register(cmd, category: CommandCategory.system);
}
for (final cmd in helpCommands) {
register(cmd, category: CommandCategory.help);
}
}