Claude Code¶
Description¶
Claude Code is Anthropic’s terminal coding agent. This role installs it on a workstation and points it at the platform’s own model gateway instead of the vendor API.
Overview¶
The agent speaks the Anthropic Messages API, which the LiteLLM gateway serves alongside its OpenAI routes. The role writes the gateway URL, the workstation’s key and the model aliases to /usr/local/etc/claude-gateway.env and installs the launcher /usr/local/bin/claude-gateway, which exports them and then starts claude. A session started with claude-gateway sends every request through the gateway, where it is accounted; a session started with claude keeps the user’s own login, for example a subscription, and both share ~/.claude with its memory, skills and projects.
The gateway mints its virtual keys from the inventory it is deployed from, and a workstation is deployed from a different one. The key is therefore an operator-supplied credential on the workstation side: mint it on the server, then put it into the workstation inventory.
Architecture¶
ARCHITECTURE.md draws Claude Code from its own metadata: the containers it runs under compose, what changes under swarm, how each volume is backed, and every role it depends on or is depended upon by.
Section |
Drawn from |
|---|---|
|
|
|
|
|
|
|
Features¶
Gateway-backed:
ANTHROPIC_BASE_URL(the gateway root, since the agent appends/v1/messagesitself) andANTHROPIC_AUTH_TOKENpoint the agent at the platform gateway.Explicit models:
ANTHROPIC_MODELandANTHROPIC_DEFAULT_HAIKU_MODELname gateway aliases, because the vendor’s own model ids do not exist there.services.claude.modelandservices.claude.background_modelset them; without a model the gateway’s first chat model is used.No configuration without a key: the launcher and its settings are written only once both the gateway URL and the key are set.
User-owned: the launcher and its settings belong to the workstation user and only they can read them, because the settings carry the key.
Quick Setup¶
Development¶
Clone, set up the workstation, and deploy Claude Code onto the local stack:
git clone https://github.com/infinito-nexus/core.git
cd core
make onboard
make compose-deploy mode=reinstall apps=dsk-gnt-claude full_cycle=false
Production¶
Install Claude Code directly onto the target machine: clone the repository, install the OS prerequisites and the repository toolchain, then deploy against localhost over a local connection (no SSH, no container):
git clone https://github.com/infinito-nexus/core.git
cd core
bash scripts/install/package.sh
make install
source scripts/meta/env/load.sh
APP=dsk-gnt-claude
DOMAIN="<your-domain>"
TLS_MODE=self_signed
SSH_PUBLIC_KEY="<your-ssh-public-key>"
INVENTORY=inventories/production
infinito administration inventory provision "$INVENTORY" \
--inventory-file "$INVENTORY/devices.yml" \
--host localhost \
--include "$APP" \
--vars "{\"TLS_MODE\": \"$TLS_MODE\", \"DOMAIN_PRIMARY\": \"$DOMAIN\", \"users\": {\"administrator\": {\"authorized_keys\": [\"$SSH_PUBLIC_KEY\"]}}}"
infinito administration deploy dedicated "$INVENTORY/devices.yml" \
--password-file "$INVENTORY/.password" \
--diff -vv
Credits¶
Part of the Infinito.Nexus Project and maintained by Kevin Veen-Birkenbach. Licensed under the Infinito.Nexus Community License (Non-Commercial).
That licence covers this role. The software it deploys is a separate grant: LicenseRef-Anthropic-Commercial-Terms, under which commercial use is decided by the vendor’s agreement. You owe its authors this much: accept the vendor’s terms; redistribution is usually forbidden. Permission for one of the two is not permission for the other.