MCPcopy Index your code
hub / github.com/github/spec-kit / load_init_options

Function load_init_options

src/specify_cli/_init_options.py:22–31  ·  view source on GitHub ↗

Load persisted init options, returning an empty dict when unavailable.

(project_path: Path)

Source from the content-addressed store, hash-verified

20
21
22def load_init_options(project_path: Path) -> dict[str, Any]:
23 """Load persisted init options, returning an empty dict when unavailable."""
24 path = project_path / INIT_OPTIONS_FILE
25 if not path.exists():
26 return {}
27 try:
28 payload = json.loads(path.read_text(encoding="utf-8"))
29 except (json.JSONDecodeError, OSError, UnicodeError):
30 return {}
31 return payload if isinstance(payload, dict) else {}
32
33
34def is_ai_skills_enabled(opts: Mapping[str, Any] | None) -> bool:

Calls 1

read_textMethod · 0.80