UNPKG

@xec-sh/cli

Version:

Xec: The Universal Shell for TypeScript

31 lines (30 loc) 1.08 kB
export interface DiscoveredCommand { name: string; type: 'built-in' | 'dynamic'; path: string; description?: string; loaded?: boolean; error?: string; } export declare class CommandDiscovery { private commands; discoverAll(): Promise<DiscoveredCommand[]>; discoverBuiltInCommands(): Promise<DiscoveredCommand[]>; discoverDynamicCommands(): Promise<DiscoveredCommand[]>; private discoverCommandsInDirectory; private getDynamicCommandDirectories; private isCommandFile; private extractCommandDescription; loadCommandModule(filePath: string): Promise<{ description?: string; aliases?: string[]; usage?: string; }>; getCommands(): DiscoveredCommand[]; getBuiltInCommands(): DiscoveredCommand[]; getDynamicCommands(): DiscoveredCommand[]; findCommand(name: string): DiscoveredCommand | undefined; hasCommand(name: string): boolean; } export declare function getCommandDiscovery(): CommandDiscovery; export declare function discoverAllCommands(): Promise<DiscoveredCommand[]>;