Command Registry API
Reference for command registration and execution.
Command Structure
{
command: '/command-name',
description: 'What this does',
usage: '/command-name [options]',
handler: async (args) => {
// Command implementation
}
}
Register Command
import { registerCommand } from '../core/command-registry.js';
registerCommand({
command: '/mycommand',
description: 'My awesome command',
usage: '/mycommand <arg>',
handler: async (args) => {
// Implementation
}
});
Initialize Registry
import { initializeRegistry } from '../core/command-registry.js';
initializeRegistry(); // Load all default commands
See Also: CLI Commands