name: claude-share
description: Share host's Claude CLI state (auth, history, plugins, top-level config) plus the host's installed Claude versions into containers, running the newest version live. The versions/ tree is mounted read-only and a launcher always execs the highest version present, so a host-side 'claude update' propagates to running containers with no restart; in-container self-update is disabled (DISABLE_AUTOUPDATER) and 'claude --upgrade' is intercepted with a hint to upgrade on the host. Enables security.nesting because Claude Code's bundled Bun/JavaScriptCore requires it for interactive mode (thread-suspension signal path is blocked by the non-nesting AppArmor profile).
config:
  environment.PATH: ${HOME}/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  environment.DISABLE_AUTOUPDATER: "1"
  security.nesting: "true"
devices:
  claude-state:
    type: disk
    source: ${HOME}/.claude
    path: ${HOME}/.claude
    shift: "true"
  claude-config:
    type: disk
    source: ${HOME}/.claude.json
    path: ${HOME}/.claude.json
    shift: "true"
  claude-versions:
    type: disk
    source: ${HOME}/.local/share/claude
    path: ${HOME}/.local/share/claude
    readonly: "true"
    shift: "true"
  claude-bin:
    type: disk
    source: /usr/local/share/repoman/recipes/claude/claude-launcher.sh
    path: ${HOME}/.local/bin/claude
    readonly: "true"
    shift: "true"
