()
| 54 | |
| 55 | /** Read the current ~/.qodex/.env into a map (empty if absent/unreadable). */ |
| 56 | export async function readEnvFile(): Promise<Record<string, string>> { |
| 57 | try { |
| 58 | const raw = await fs.readFile(QODEX_ENV_FILE, 'utf-8'); |
| 59 | return parseEnvFile(raw); |
| 60 | } catch { |
| 61 | return {}; |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | /** |
| 66 | * Persist (or update) a single KEY in ~/.qodex/.env without disturbing the others. |
no test coverage detected