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

Function saveProjectConfig

packages/cli/src/utils/config.ts:70–80  ·  view source on GitHub ↗
(
  config: ProjectConfig,
  cwd: string = process.cwd()
)

Source from the content-addressed store, hash-verified

68 * Save project configuration to .tianjirc in specified directory
69 */
70export async function saveProjectConfig(
71 config: ProjectConfig,
72 cwd: string = process.cwd()
73): Promise<void> {
74 try {
75 const projectConfigPath = path.join(cwd, PROJECT_CONFIG_FILE);
76 await fs.writeJson(projectConfigPath, config, { spaces: 2 });
77 } catch (error) {
78 throw new Error(`Failed to save project config: ${error}`);
79 }
80}
81
82/**
83 * Check if user is logged in (has valid global config)

Callers 2

handlerFunction · 0.85
handlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected