MCPcopy
hub / github.com/msgbyte/tianji / saveGlobalConfig

Function saveGlobalConfig

packages/cli/src/utils/config.ts:39–46  ·  view source on GitHub ↗
(config: GlobalConfig)

Source from the content-addressed store, hash-verified

37 * Save global configuration to ~/.config/tianji/config.json
38 */
39export async function saveGlobalConfig(config: GlobalConfig): Promise<void> {
40 try {
41 await fs.ensureDir(GLOBAL_CONFIG_DIR);
42 await fs.writeJson(GLOBAL_CONFIG_PATH, config, { spaces: 2 });
43 } catch (error) {
44 throw new Error(`Failed to save global config: ${error}`);
45 }
46}
47
48/**
49 * Load project configuration from .tianjirc in current directory

Callers 1

handlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected