| name | web-environment-setup |
| description | Sets up Claude Code web environment for building the Umbraco.AI solution. Installs .NET SDK, configures proxy for NuGet, and prepares git for GitVersioning. Use this when starting a new Claude Code web session to build the project. |
Web Environment Setup
You are helping set up the Umbraco.AI repository for building in Claude Code web environment.
Task
Run the web environment setup script to prepare the environment for .NET development.
Quick Start
source .claude/scripts/setup-web-environment.sh
dotnet build Umbraco.AI.slnx
Workflow
-
Run the setup script:
source .claude/scripts/setup-web-environment.sh
-
Verify the setup by checking:
dotnet --version returns 10.x
- Proxy environment variables are set
- Git is not a shallow clone
-
Test the build:
dotnet build Umbraco.AI.slnx
Problem
Claude Code web runs in a sandboxed environment with restrictions:
- Proxy Authentication - Network requests go through a JWT-authenticated proxy
- Package Feed Restrictions - Only certain hosts are allowed (e.g.,
api.nuget.org but not www.myget.org)
- Shallow Git Clones - May break Nerdbank.GitVersioning
- .NET SDK - May not be pre-installed
Scripts
| Script | Purpose | Usage |
|---|
setup-web-environment.sh | Full environment setup | source .claude/scripts/setup-web-environment.sh |
setup-dotnet-proxy.sh | Proxy + NuGet config only | source .claude/scripts/setup-dotnet-proxy.sh |
dotnet-with-proxy.sh | Run dotnet with proxy | .claude/scripts/dotnet-with-proxy.sh restore |
What setup-web-environment.sh Does
- Installs .NET SDK 10.0 via apt (if not present)
- Starts px-proxy to handle JWT-authenticated proxy for NuGet
- Creates user-level NuGet.Config that uses only
api.nuget.org (bypasses restricted MyGet feeds)
- Unshallows git clone so Nerdbank.GitVersioning can calculate version height
Environment Detection
All scripts automatically detect if they're running in Claude Code web by checking for JWT proxy patterns:
if [[ "$HTTP_PROXY" =~ "jwt_" ]] && [[ "$HTTP_PROXY" =~ "@" ]]; then
else
fi
| Environment | HTTP_PROXY value | Detection |
|---|
| Claude Code web | http://...jwt_eyJ...@host:port | โ
Detected |
| Local (no proxy) | (unset) | โ Not detected |
| Local (corporate proxy) | http://proxy.corp:8080 | โ Not detected |
On local machines, the scripts do nothing - they're safe to run anywhere.
Troubleshooting
| Issue | Solution |
|---|
| Proxy errors | Check /tmp/px-proxy.log |
| NuGet restore fails | Verify proxy: pgrep -f px |
| GitVersioning errors | Run git fetch --unshallow origin |
| MyGet warnings | Safe to ignore - nuget.org is used instead |
How It Works
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Claude Code Web Environment โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ HTTP_PROXY = http://...jwt_<token>@<host>:<port> โ
โ โ โ
โ โผ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โ px-proxy โโโโโโถโ Sandbox โโโโโโถโ Allowed โ โ
โ โ :3128 โ โ Proxy โ โ Hosts โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โฒ โ โ
โ โ โผ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โ dotnet โ โ api.nuget.orgโ โ
โ โ restore โ โ (allowed) โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
The px-proxy handles the JWT authentication transparently, allowing standard .NET tooling to work through the sandbox proxy.