/**
 * Application Factory
 *
 * Factory for creating and configuring the application.
 * Centralizes initialization logic extracted from index.ts.
 */
import type { ApplicationConfig, CommandLineOptions } from './types.js';
/**
 * Load environment variables
 */
export declare function loadEnvironment(): void;
/**
 * Load API key from various sources
 * Priority: environment > secure credential storage > legacy settings
 */
export declare function loadApiKey(): string | undefined;
/**
 * Load base URL from settings or environment
 */
export declare function loadBaseURL(): string;
/**
 * Load model from settings or environment
 */
export declare function loadModel(): string | undefined;
/**
 * Ensure user settings directory exists
 */
export declare function ensureUserSettings(): void;
/**
 * Setup process signal handlers for graceful shutdown
 */
export declare function setupSignalHandlers(): void;
/**
 * Build application configuration from command line options
 */
export declare function buildConfig(options: CommandLineOptions): ApplicationConfig;
/**
 * Validate application configuration
 */
export declare function validateConfig(config: ApplicationConfig): {
    valid: boolean;
    errors: string[];
};
/**
 * Application bootstrap options
 */
export interface BootstrapOptions {
    /** Skip environment loading (for testing) */
    skipEnv?: boolean;
    /** Skip signal handlers (for testing) */
    skipSignals?: boolean;
    /** Custom configuration */
    config?: Partial<ApplicationConfig>;
}
/**
 * Bootstrap the application
 * Sets up environment, signal handlers, and returns configuration
 */
export declare function bootstrap(options?: BootstrapOptions): Promise<ApplicationConfig>;
/**
 * Save command line settings to persistent storage
 */
export declare function saveSettings(apiKey?: string, baseURL?: string): Promise<void>;
export { type ApplicationConfig, type CommandLineOptions, } from './types.js';
