{"record":{"id":"d76e36e5afd89118","repo":"github/copilot-sdk","slug":"no-cli-version-pinned-this-is-a-development-insta","errorCode":null,"errorMessage":"No CLI version pinned. This is a development install — set COPILOT_CLI_PATH or install a published wheel.","messagePattern":"No CLI version pinned\\. This is a development install — set COPILOT_CLI_PATH or install a published wheel\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"python/copilot/_cli_download.py","lineNumber":201,"sourceCode":"\n\ndef download_cli(version: str | None = None, *, force: bool = False) -> str:\n    \"\"\"Provision a complete runtime bundle with a ``copilot[.exe]`` alias.\n\n    Args:\n        version: CLI version to download. Defaults to the pinned CLI_VERSION.\n        force: If True, re-download even if already cached.\n\n    Returns:\n        Path to the compatibility entrypoint adjacent to the complete runtime bundle.\n\n    Raises:\n        RuntimeError: If the version is not set, download fails, or\n                      checksum verification fails.\n    \"\"\"\n    ver = version or CLI_VERSION\n    if not ver:\n        raise RuntimeError(\n            \"No CLI version pinned. This is a development install — \"\n            \"set COPILOT_CLI_PATH or install a published wheel.\"\n        )\n\n    binary_name = get_cli_binary_name()\n\n    if not force:\n        cached = get_cached_cli_path(ver)\n        if cached is not None:\n            return cached\n\n    wrapper_path = Path(ensure_runtime_wrapper(ver, force=force))\n    binary_path = wrapper_path.with_name(binary_name)\n    fd, temp_name = tempfile.mkstemp(dir=wrapper_path.parent, prefix=\".cli-\")\n    try:\n        with os.fdopen(fd, \"wb\") as destination:\n            destination.write(wrapper_path.read_bytes())\n        staged = Path(temp_name)","sourceCodeStart":183,"sourceCodeEnd":219,"githubUrl":"https://github.com/github/copilot-sdk/blob/cd8cf15dc3f9e762615790aaed0a771a0f392755/python/copilot/_cli_download.py#L183-L219","documentation":"download_cli requires a pinned CLI version (CLI_VERSION or the version argument). In development installs where no version is set, the library refuses to guess and raises this error telling you to point COPILOT_CLI_PATH at an existing binary or install a published wheel.","triggerScenarios":"Calling download_cli() or main() with no explicit version argument while CLI_VERSION is empty — which happens when the package is installed from source rather than a published wheel with the version baked in.","commonSituations":"Installing from a git checkout or editable install where the build step did not stamp CLI_VERSION; running in CI from source; forgetting COPILOT_CLI_PATH in a dev environment.","solutions":["Install a published wheel from PyPI instead of the source tree.","Set the COPILOT_CLI_PATH environment variable to an existing Copilot CLI binary.","Pass an explicit version to download_cli(version=...).","Rebuild the package so the version stamping step populates CLI_VERSION."],"exampleFix":"# before\n$ python -m copilot   # source install, no pin\n# after\n$ export COPILOT_CLI_PATH=/usr/local/bin/copilot\n# or\n$ pip install github-copilot-cli  # published wheel pins CLI_VERSION","handlingStrategy":"validation","validationCode":"import copilot._cli_download as d\nif not (d.CLI_VERSION or os.environ.get(\"COPILOT_CLI_PATH\")):\n    raise SystemExit(\"dev install: set COPILOT_CLI_PATH or pip install a published wheel\")","typeGuard":null,"tryCatchPattern":"try:\n    cli = download_cli()\nexcept RuntimeError as e:\n    if \"No CLI version pinned\" in str(e):\n        cli = os.environ[\"COPILOT_CLI_PATH\"]\n    else:\n        raise","preventionTips":["Always install the published wheel in production.","Set COPILOT_CLI_PATH in dev/CI from source installs.","Assert CLI_VERSION is truthy in application startup checks."],"tags":["configuration","development-install","missing-version"],"backgroundTag":"missing-config-value","analyzedSha":"cd8cf15dc3f9e762615790aaed0a771a0f392755","analyzedAt":"2026-09-09T18:32:31.973Z","contentChangedAt":"2026-09-09T18:32:31.973Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}