UNPKG

chittycan

Version:

Your completely autonomous network that grows with you - DNA ownership platform with encrypted vaults, PDX portability, and ChittyFoundation governance

28 lines 773 B
import fs from "fs"; import path from "path"; import os from "os"; export const CONFIG_DIR = path.join(os.homedir(), ".config", "chitty"); export const CONFIG_PATH = path.join(CONFIG_DIR, "config.json"); export function loadConfig() { try { const data = fs.readFileSync(CONFIG_PATH, "utf8"); return JSON.parse(data); } catch { return { remotes: {}, nudges: { enabled: true, intervalMinutes: 45 } }; } } export function saveConfig(cfg) { fs.mkdirSync(CONFIG_DIR, { recursive: true }); fs.writeFileSync(CONFIG_PATH, JSON.stringify(cfg, null, 2), "utf8"); } export function getConfigPath() { return CONFIG_PATH; } //# sourceMappingURL=config.js.map