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

Function loadProjectConfig

packages/cli/src/utils/config.ts:51–65  ·  view source on GitHub ↗
(
  cwd: string = process.cwd()
)

Source from the content-addressed store, hash-verified

49 * Load project configuration from .tianjirc in current directory
50 */
51export async function loadProjectConfig(
52 cwd: string = process.cwd()
53): Promise<ProjectConfig | null> {
54 try {
55 const projectConfigPath = path.join(cwd, PROJECT_CONFIG_FILE);
56 if (await fs.pathExists(projectConfigPath)) {
57 const config = await fs.readJson(projectConfigPath);
58 return config;
59 }
60 return null;
61 } catch (error) {
62 console.error('Error loading project config:', error);
63 return null;
64 }
65}
66
67/**
68 * Save project configuration to .tianjirc in specified directory

Callers 2

handlerFunction · 0.85
handlerFunction · 0.85

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected