UNPKG

@webdevtoday/grok-cli

Version:

A sophisticated CLI tool for interacting with xAI Grok 4, featuring conversation history, file reference, custom commands, memory system, and genetic development workflows

75 lines 1.93 kB
/** * Custom command tool for user-defined commands * Allows users to create and manage their own command shortcuts */ import { BaseTool } from './base'; import type { ToolResult } from '../types'; export interface CustomCommand { name: string; description: string; command: string; args?: string[]; cwd?: string; env?: Record<string, string>; timeout?: number; tags?: string[]; examples?: string[]; } export interface CustomParams { action: 'run' | 'list' | 'add' | 'remove' | 'edit' | 'import' | 'export'; name?: string; command?: CustomCommand; file?: string; } /** * Tool for managing and executing custom user-defined commands */ export declare class CustomTool extends BaseTool { private customCommandsPath; constructor(); validateParams(params: Record<string, unknown>): boolean; execute(params: Record<string, unknown>): Promise<ToolResult>; /** * Run a custom command by name */ private runCustomCommand; /** * List all custom commands */ private listCustomCommands; /** * Add a new custom command */ private addCustomCommand; /** * Remove a custom command */ private removeCustomCommand; /** * Edit an existing custom command */ private editCustomCommand; /** * Import custom commands from a file */ private importCustomCommands; /** * Export custom commands to a file */ private exportCustomCommands; /** * Load custom commands from storage */ private loadCustomCommands; /** * Save custom commands to storage */ private saveCustomCommands; getParameterSchema(): Record<string, unknown>; getUsageExamples(): string[]; /** * Get predefined commands for genetic development */ static getGeneticDevCommands(): CustomCommand[]; } //# sourceMappingURL=custom.d.ts.map