[FEATURE] Support custom distribution URL for air-gapped / restricted environments
The Problem
The official install command:
curl -fsSL https://claude.ai/install.sh | bash
redirects to bootstrap.sh on a GCS bucket, which downloads the version info, manifest, and binary — all from the same hardcoded GCS URL:
https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases
In corporate or air-gapped environments this URL is blocked, causing installation and upgrades to fail. Setting HTTPS_PROXY can help bootstrap.sh reach GCS, but the downloaded claude binary also has the GCS URL hardcoded — so claude install and auto-update checks fail regardless of proxy settings in the shell.
Suggested Fix
Two small changes would make Claude Code natively installable behind firewalls without any wrapper scripts or sed hacks:
1. Make bootstrap.sh respect a CLAUDE_DIST_URL environment variable
# In bootstrap.sh — replace the hardcoded assignment:
GCS_BUCKET="${CLAUDE_DIST_URL:-https://storage.googleapis.com/claude-code-dist-.../claude-code-releases}"
This lets organizations point the installer at an internal mirror:
export CLAUDE_DIST_URL="https://my.company.com/artifactory/claude-code-releases"
curl -fsSL https://claude.ai/install.sh | bash
2. Make the claude binary respect the same variable
The claude install subcommand and the auto-update mechanism should read CLAUDE_DIST_URL (or a --dist-url flag) to override the hardcoded GCS endpoint. This eliminates the second failure point — the binary calling home to a blocked URL.
Together these changes would make the entire install and update flow work through any HTTP-compatible mirror (Artifactory, Nexus, Cloudsmith, a simple nginx proxy, etc.) with zero patching.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗