Launch Claude Code against Argonne-hosted backends.
This repo has two pieces:
argonne-claude.shlaunches Claude Code with the right backend env vars.main.pyis the local proxy used by theargobackend.
Supported backends:
argo: tunnels to Argonne's internal Argo API throughhomes.cels.anl.gov.asksage: talks directly to AskSage's Anthropic-compatible endpoint.
Prereqs:
- Python 3.14+
uv- Claude Code
curl -fsSL https://claude.ai/install.sh | bashClone the repo somewhere stable and add it to your PATH:
git clone https://github.com/NicholasSynovic/argo-opencode-integration.git ~/argo-opencode-integration
export PATH="$HOME/argo-opencode-integration:$PATH"Optional dev setup:
make create-devBuild the package:
make build--backend is required.
Argo:
argonne-claude.sh --backend=argoAskSage:
argonne-claude.sh --backend=asksageOverride the identity if needed:
argonne-claude.sh --backend=argo --identity=jdoe
argonne-claude.sh --backend=asksage --identity=sk-asksage-...For Argo, --identity sets the SSH username for the target and jump hosts.
If omitted, it defaults to your current local username.
Argo flow:
- SSH tunnels local port
8082toapps.inside.anl.gov:443viahomes.cels.anl.gov. main.pylistens on127.0.0.1:8083and rewrites requests for the Argo API.- Claude Code talks to
http://127.0.0.1:8083/argoapi/.
AskSage flow:
- The launcher resolves an API key from
--identity,ASKSAGE_API_KEY, or~/.asksage/token. - It queries
${ASKSAGE_BASE_URL}/v1/modelsand probes adaptive-thinking support unless you override that behavior withASKSAGE_MODEL,ASKSAGE_SMALL_FAST_MODEL, orCLAUDE_CODE_DISABLE_ADAPTIVE_THINKING. - It sets
NODE_EXTRA_CA_CERTStocerts/incommon-rsa-server-ca-2.pemunless you already exported one.
UANs need this SSH config so homes.cels.anl.gov routes through the login host:
Host homes.cels.anl.gov
ProxyJump logins.cels.anl.govOn compute nodes, the launcher adds the extra UAN hop automatically when $PBS_JOBID is set.
Recommended setup:
mkdir -p ~/.asksage && chmod 700 ~/.asksage
printf '%s\n' 'your-asksage-key' > ~/.asksage/token
chmod 600 ~/.asksage/tokenCLAUDE_EXECUTABLEchanges theclaudebinary.ARGO_AURORA_UANandARGO_SSH_JUMPoverride Aurora jump-host selection.ASKSAGE_BASE_URLtargets another AskSage tenant.ASKSAGE_MODELandASKSAGE_SMALL_FAST_MODELpin models and skip discovery.
Run the proxy directly:
python3.14 main.pyRun the tunnel by hand:
ssh -L 8082:apps.inside.anl.gov:443 -N homes.cels.anl.gov