diff --git a/src/specify_cli/__init__.py b/src/specify_cli/__init__.py index 1dedb31949..82d0041ec5 100644 --- a/src/specify_cli/__init__.py +++ b/src/specify_cli/__init__.py @@ -635,8 +635,9 @@ def deep_merge(base: dict, update: dict) -> dict: return merged def download_template_from_github(ai_assistant: str, download_dir: Path, *, script_type: str = "sh", verbose: bool = True, show_progress: bool = True, client: httpx.Client = None, debug: bool = False, github_token: str = None) -> Tuple[Path, dict]: - repo_owner = "github" - repo_name = "spec-kit" + # Support custom repository via environment variables for testing and enterprise use + repo_owner = os.getenv("SPEC_KIT_REPO_OWNER", "github") + repo_name = os.getenv("SPEC_KIT_REPO_NAME", "spec-kit") if client is None: client = httpx.Client(verify=ssl_context) @@ -1307,8 +1308,9 @@ def version(): pass # Fetch latest template release version - repo_owner = "github" - repo_name = "spec-kit" + # Support custom repository via environment variables for testing and enterprise use + repo_owner = os.getenv("SPEC_KIT_REPO_OWNER", "github") + repo_name = os.getenv("SPEC_KIT_REPO_NAME", "spec-kit") api_url = f"https://api.github.com/repos/{repo_owner}/{repo_name}/releases/latest" template_version = "unknown"