/**
 * Generic CLI configuration loader.
 *
 * Manages CLI-specific configuration stored at `~/.{name}/config.json`.
 * Consumers keep their project-specific Zod schemas locally and use
 * these generic load/save functions.
 *
 * @module
 */
import type { z } from 'zod';
import type { EnvDeps, FsReadDeps, FsWriteDeps, LogDeps } from '../runtime/deps.js';
/**
 * Get the CLI config directory path (`~/.{name}`).
 *
 * @param runtime - runtime with `env_get` capability
 * @param name - application name (e.g., `"tx"`, `"zzz"`)
 * @returns path to config directory, or null if `$HOME` is not set
 */
export declare const get_app_dir: (runtime: Pick<EnvDeps, "env_get">, name: string) => string | null;
/**
 * Get the CLI config file path (`~/.{name}/config.json`).
 *
 * @param runtime - runtime with `env_get` capability
 * @param name - application name
 * @returns path to `config.json`, or null if `$HOME` is not set
 */
export declare const get_config_path: (runtime: Pick<EnvDeps, "env_get">, name: string) => string | null;
/**
 * Load CLI configuration from a JSON file with Zod schema validation.
 *
 * @param runtime - runtime with file read capability
 * @param path - path to the config JSON file
 * @param schema - Zod schema to validate against
 * @returns parsed config, or null if file doesn't exist or is invalid
 */
export declare const load_config: <T>(runtime: Pick<FsReadDeps, "stat" | "read_text_file"> & LogDeps, path: string, schema: z.ZodType<T>) => Promise<T | null>;
/**
 * Save CLI configuration to a JSON file.
 *
 * @param runtime - runtime with file write capability
 * @param path - path to the config JSON file
 * @param dir - directory containing the config file (created if missing)
 * @param config - configuration to save
 * @mutates filesystem - creates `dir` (recursive) and writes JSON to `path`
 */
export declare const save_config: <T>(runtime: Pick<FsWriteDeps, "mkdir" | "write_text_file">, path: string, dir: string, config: T) => Promise<void>;
//# sourceMappingURL=config.d.ts.map