Skip to content

claude-code

Repo box/github.com/opencharly/layer-claude-code:v2026.271.2310

Installs the Claude Code CLI via the official native installer (https://claude.ai/install.sh) — the currently-recommended method (https://code.claude.com/docs/en/quickstart). At image-build time it fetches the platform-native claude binary, lets the installer self-install its launcher under the build user’s home, then relocates the real binary to /usr/local/bin/claude — a system path that survives the deploy-time home-volume mount (anything a candy installs under ${HOME} at build time is SHADOWED once the live pod mounts its persistent home volume over /home/). Replaces the deprecated @anthropic-ai/claude-code npm package (a thin launcher that deferred a native-binary download to first runtime and so failed claude --version in hermetic offline image builds). A CUE-validated tmux terminal profile makes the same CLI available through the generic local/SSH/nested Charly agent channel, and runtime self-updates are disabled (DISABLE_AUTOUPDATER=1) so the image-owned install remains immutable across real terminal sessions. Verifiable offline: /usr/local/bin/claude exists and claude --version prints the Claude Code banner — both in the built image and on a live deployment.

Installed on every distro:

  • curl

This candy’s plan: — the runnable spec charly check executes against a live deployment. check: steps are idempotent probes; run: steps change state.

Intent Step
run download the official claude code native installer into the build user’s home, never /tmp
run install the claude code native binary (latest stable) via the official installer
run relocate the native binary to /usr/local/bin so it survives the deploy-time home-volume mount
check the claude binary is installed at the system-wide native install location
check Claude Code runtime self-updates are disabled for reproducible image-owned installs
check running claude –version exits cleanly and prints the Claude Code banner