MCPcopy Create free account
hub / github.com/AutoForgeAI/autoforge / _get_config_path

Function _get_config_path

server/services/project_config.py:87–106  ·  view source on GitHub ↗

Get the path to the project config file. Checks the new .autoforge/ location first, falls back to .autocoder/ for backward compatibility. Args: project_dir: Path to the project directory. Returns: Path to the config.json file in the appropriate directory.

(project_dir: Path)

Source from the content-addressed store, hash-verified

85
86
87def _get_config_path(project_dir: Path) -> Path:
88 """
89 Get the path to the project config file.
90
91 Checks the new .autoforge/ location first, falls back to .autocoder/
92 for backward compatibility.
93
94 Args:
95 project_dir: Path to the project directory.
96
97 Returns:
98 Path to the config.json file in the appropriate directory.
99 """
100 new_path = project_dir / ".autoforge" / "config.json"
101 if new_path.exists():
102 return new_path
103 old_path = project_dir / ".autocoder" / "config.json"
104 if old_path.exists():
105 return old_path
106 return new_path
107
108
109def _load_config(project_dir: Path) -> dict:

Callers 3

_load_configFunction · 0.85
_save_configFunction · 0.85
clear_dev_commandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected