/** * Cross-platform utilities for Miyabi CLI * Provides Windows/macOS/Linux compatibility */ import { ExecSyncOptions, SpawnSyncOptions } from 'child_process'; /** * Check if running on Windows */ export declare const isWindows: () => boolean; /** * Check if running on macOS */ export declare const isMacOS: () => boolean; /** * Check if running on Linux */ export declare const isLinux: () => boolean; /** * Get the current platform name */ export declare const getPlatform: () => "windows" | "macos" | "linux" | "unknown"; export interface ExecCommandOptions extends Omit { /** Suppress stderr output */ silent?: boolean; } /** * Execute a shell command with cross-platform compatibility * Automatically adds shell: true on Windows for proper command execution */ export declare function execCommand(command: string, options?: ExecCommandOptions): string; /** * Execute a command and return the result without throwing on error */ export declare function execCommandSafe(command: string, options?: ExecCommandOptions): { success: boolean; output: string; error?: Error; }; /** * Check if a command is available on the system * Uses 'where' on Windows, 'command -v' on Unix */ export declare function isCommandAvailable(command: string): boolean; /** * Get the path to a command * Returns null if the command is not found */ export declare function getCommandPath(command: string): string | null; /** * Get the default shell for the current platform */ export declare function getDefaultShell(): string; /** * Normalize a path for display (convert backslashes to forward slashes) */ export declare function normalizePathForDisplay(path: string): string; /** * Get spawn options with proper shell configuration */ export declare function getSpawnOptions(options?: SpawnSyncOptions): SpawnSyncOptions; //# sourceMappingURL=cross-platform.d.ts.map