MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / readEnvFile

Function readEnvFile

src/setup/env-writer.ts:56–63  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

54
55/** Read the current ~/.qodex/.env into a map (empty if absent/unreadable). */
56export 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.

Callers 2

setEnvKeyFunction · 0.85
loadEnvFileIntoProcessFunction · 0.85

Calls 1

parseEnvFileFunction · 0.85

Tested by

no test coverage detected