import type { ConfigFile, ConfigDefaults } from './types.js'; /** * Read the configuration file. * @throws {CliError} When config file exists but cannot be parsed. */ export declare const readConfig: () => ConfigFile; /** * Write the configuration file atomically. * Uses a temp file + rename to prevent corruption. */ export declare const writeConfig: (config: ConfigFile) => void; /** * Get the API key from config or environment. * Environment variable LINEAR_API_KEY takes precedence. */ export declare const getApiKey: () => string | undefined; /** * Get the API key or throw if not configured. * @throws {CliError} When no API key is configured (NOT_AUTHENTICATED). */ export declare const requireApiKey: () => string; /** * Save the API key to config with secure permissions. */ export declare const saveApiKey: (apiKey: string) => void; /** * Remove the API key from config. */ export declare const removeApiKey: () => void; /** * Get the config file path (for display purposes). */ export declare const getConfigPath: () => string; /** * Get defaults from config, with migration from legacy defaultTeamId. */ export declare const getDefaults: () => ConfigDefaults; /** * Get the default team ID from config. * Returns undefined if not configured. */ export declare const getDefaultTeamId: () => string | undefined; /** * Get the default team key from config. * Returns undefined if not configured. */ export declare const getDefaultTeamKey: () => string | undefined; /** * Set a default configuration value. */ export declare const setDefault: (key: keyof ConfigDefaults, value: string | undefined) => void; /** * Remove a default configuration value. */ export declare const removeDefault: (key: keyof ConfigDefaults) => void; /** * Valid configuration keys that can be set. */ export declare const CONFIG_KEYS: readonly ["default-team-id", "default-team-key"]; export type ConfigKey = (typeof CONFIG_KEYS)[number]; /** * Map config key to internal defaults key. */ export declare const configKeyToDefaultsKey: (key: ConfigKey) => keyof ConfigDefaults; /** * Check if a key is a valid config key. */ export declare const isValidConfigKey: (key: string) => key is ConfigKey;