MCPcopy Index your code
hub / github.com/msgbyte/tianji / loadGlobalConfig

Function loadGlobalConfig

packages/cli/src/utils/config.ts:23–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21 * Load global configuration from ~/.config/tianji/config.json
22 */
23export async function loadGlobalConfig(): Promise<GlobalConfig | null> {
24 try {
25 if (await fs.pathExists(GLOBAL_CONFIG_PATH)) {
26 const config = await fs.readJson(GLOBAL_CONFIG_PATH);
27 return config;
28 }
29 return null;
30 } catch (error) {
31 console.error('Error loading global config:', error);
32 return null;
33 }
34}
35
36/**
37 * Save global configuration to ~/.config/tianji/config.json

Callers 3

isLoggedInFunction · 0.85
handlerFunction · 0.85
handlerFunction · 0.85

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected