Sign inSign up

docker/sbx-kit-claude-sbx-statusline:latest

Multi-platform
Manifest digest

sha256:b9001136a00adcef1a629c57e9423be01f1afc343713d32c7e61460d4830cfd4

Last pushed

9 days by cdupuis

Type

Sandbox Kit

Manifest digest

sha256:b9001136a00adcef1a629c57e9423be01f1afc343713d32c7e61460d4830cfd4

yaml
schemaVersion: "3"
displayName: Claude Code Status Line
description: Adds a two-line Docker Sandboxes status line to Claude Code (host, cwd, git branch, model, context %, memory, load, cost). Ships ~/.claude/statusline.sh and sets the statusLine key in ~/.claude/settings.json, merging so every other setting is preserved (an existing statusLine is intentionally replaced, since installing this status line is the point of the kit).
version: 1.0.0
kind: mixin
requires:
    - claude
    - deb/jq
capabilities:
    - type: com.docker.sandbox/lifecycle@1
      config:
        install:
            - command: |
                set -e
                mkdir -p /home/agent/.claude
                f=/home/agent/.claude/settings.json
                [ -f "$f" ] || echo '{}' > "$f"
                # Set only the statusLine key (any existing one is replaced by design);
                # the jq merge leaves all other settings untouched. Temp file lives in the
                # same dir as $f so the mv below is an atomic rename, not a cross-fs copy.
                tmp=$(mktemp -p /home/agent/.claude)
                jq '.statusLine = {type: "command", command: "~/.claude/statusline.sh"}' "$f" > "$tmp"
                mv "$tmp" "$f"
                # Shipped files arrive 0644; unexecutable, it renders nothing and no error.
                chmod +x /home/agent/.claude/statusline.sh
                # Enumerated, not recursive: ~/.claude holds runtime-managed content
                # this kit doesn't own, so `chown -R` on the parent would take
                # ownership of paths outside the kit's control.
                chown agent:agent /home/agent/.claude "$f" /home/agent/.claude/statusline.sh
              description: Set the statusLine key in ~/.claude/settings.json to ~/.claude/statusline.sh (jq merge, so all other keys are preserved; any existing statusLine is replaced by design) and make the script executable
              user: "0"
    - type: com.docker.sandbox/agent-context@1
      config:
        contentFile: /usr/share/sandbox/kit/claude-sbx-statusline/claude-sbx-statusline-context.md