export declare function providerKeyForEnvVar(envVar: string): string | undefined;
/**
 * Load environment variables from .env files.
 * Priority: CWD .env (project-scoped) > ancestor .env files (nearest wins,
 * walking up to $HOME / fs root / {@link MAX_ENV_WALK_LEVELS}) > monorepo
 * root .env (development). dotenv never overrides already-set vars, so load
 * order IS precedence. The upward walk is what lets a project run from
 * `<workspace>/<project>/` pick up the keys in `<workspace>/.env`.
 */
export declare function loadEnv(): void;
/**
 * Get API key from config, environment, or prompt
 */
export declare function getApiKey(envVar: string, providerName: string, optionValue?: string): Promise<string | null>;
/**
 * Resolve an API key without prompting.
 *
 * This is for library-style execution paths that should respect
 * `vibe setup --scope project` but must not stop for interactive input
 * when no key exists. Precedence matches `getApiKey()` up to the prompt:
 * CLI override > nearest project/user config.yaml > .env/process env.
 */
export declare function getConfiguredApiKey(envVar: string, optionValue?: string, options?: {
    cwd?: string;
}): Promise<string | undefined>;
/** True when a key exists in CLI override, config.yaml, .env, or env. */
export declare function hasConfiguredApiKey(envVar: string, optionValue?: string, options?: {
    cwd?: string;
}): Promise<boolean>;
export declare class ApiKeyError extends Error {
    envVar: string;
    providerName: string;
    constructor(envVar: string, providerName: string);
    toStructured(): {
        success: false;
        error: string;
        code: string;
        exitCode: number;
        suggestion: string;
        retryable: false;
    };
}
/**
 * Check if an API key is available without prompting or side effects.
 *
 * Sync env-only check — for the config-file fallback (set via `vibe setup`),
 * use the async {@link getApiKey} instead. Two bugs in the previous
 * implementation made this lie: (1) `getApiKeyFromConfig` is async and
 * was called without `await`, so `!!Promise` always returned `true`,
 * and (2) the function expects a provider key (`"elevenlabs"`) but was
 * being passed the env-var name (`"ELEVENLABS_API_KEY"`). The result
 * was that `vibe scene add --tts auto` always took the ElevenLabs path
 * and crashed with "API key required" even though we were supposed to
 * fall back to local Kokoro. Caught during pre-HN error-message audit.
 */
export declare function hasApiKey(envVar: string): boolean;
/**
 * Get API key or throw ApiKeyError if not found.
 * Use this instead of getApiKey() + manual null check.
 */
export declare function requireApiKey(envVar: string, providerName: string, cliOverride?: string): Promise<string>;
