MCPcopy Create free account
hub / github.com/IAmUnbounded/devctx / saveConfig

Function saveConfig

devctx/src/utils/config.ts:59–66  ·  view source on GitHub ↗
(partial: Partial<UserConfig>)

Source from the content-addressed store, hash-verified

57 * Merges with existing config so partial updates work.
58 */
59export async function saveConfig(partial: Partial<UserConfig>): Promise<void> {
60 const dir = await getDevCtxDir();
61 const configPath = path.join(dir, "config.json");
62
63 const existing = await loadConfig();
64 const merged = { ...existing, ...partial };
65 fs.writeFileSync(configPath, JSON.stringify(merged, null, 2));
66}

Callers 1

configCommandFunction · 0.90

Calls 2

getDevCtxDirFunction · 0.90
loadConfigFunction · 0.85

Tested by

no test coverage detected