Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# SC2059: Don't use variables in the printf format string.
# Our info/warn/ok/error helpers and banner intentionally embed ANSI color
# variables in printf format strings. This is safe because the variables
# contain only escape sequences, never user input.
#
# SC1091: Not following sourced file.
# We dynamically source nvm.sh and runtime.sh at paths that shellcheck
# cannot resolve statically.
disable=SC2059,SC1091
13 changes: 8 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@ FROM node:22-slim@sha256:4f77a690f2f8946ab16fe1e791a3ac0667ae1c3575c3e4d0d4589e9

ENV DEBIAN_FRONTEND=noninteractive

# hadolint ignore=DL3008
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 python3-pip python3-venv \
curl git ca-certificates \
iproute2 \
python3=3.11.2-1+b1 \
python3-pip=23.0.1+dfsg-1 \
python3-venv=3.11.2-1+b1 \
curl=7.88.1-10+deb12u14 \
git=1:2.39.5-0+deb12u3 \
ca-certificates=20230311+deb12u1 \
iproute2=6.1.0-3 \
&& rm -rf /var/lib/apt/lists/*

# Create sandbox user (matches OpenShell convention)
Expand Down Expand Up @@ -54,7 +57,7 @@ RUN mkdir -p /sandbox/.openclaw-data/agents/main/agent \

# Install OpenClaw CLI and PyYAML for blueprint runner (single layer)
RUN npm install -g openclaw@2026.3.11 \
&& pip3 install --no-cache-dir --break-system-packages "pyyaml==6.0.2"
&& pip3 install --no-cache-dir --break-system-packages "pyyaml==6.0.3"

# Copy built plugin and blueprint into the sandbox
COPY --from=builder /opt/nemoclaw/dist/ /opt/nemoclaw/dist/
Expand Down
17 changes: 10 additions & 7 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ usage() {
printf " ${C_DIM}Options:${C_RESET}\n"
printf " --non-interactive Skip prompts (uses env vars / defaults)\n"
printf " --version, -v Print installer version and exit\n"
printf " --help Show this help message and exit\n\n"
printf " --help, -h Show this help message and exit\n\n"
printf " ${C_DIM}Environment:${C_RESET}\n"
printf " NVIDIA_API_KEY API key (skips credential prompt)\n"
printf " NEMOCLAW_NON_INTERACTIVE=1 Same as --non-interactive\n"
Expand Down Expand Up @@ -208,7 +208,10 @@ version_gte() {
}

# Ensure nvm environment is loaded in the current shell.
# Skip if node is already on PATH — sourcing nvm.sh can reset PATH and
# override the caller's node/npm (e.g. in test environments with stubs).
ensure_nvm_loaded() {
command -v node &>/dev/null && return 0
if [[ -z "${NVM_DIR:-}" ]]; then
export NVM_DIR="$HOME/.nvm"
fi
Expand Down Expand Up @@ -443,10 +446,10 @@ pre_extract_openclaw() {
install_nemoclaw() {
if [[ -f "./package.json" ]] && grep -q '"name": "nemoclaw"' ./package.json 2>/dev/null; then
info "NemoClaw package.json found in current directory — installing from source…"
spin "Preparing OpenClaw package" bash -lc "$(declare -f pre_extract_openclaw); pre_extract_openclaw \"\$1\"" _ "$(pwd)" \
spin "Preparing OpenClaw package" bash -c "$(declare -f info warn pre_extract_openclaw); pre_extract_openclaw \"\$1\"" _ "$(pwd)" \
|| warn "Pre-extraction failed — npm install may fail if openclaw tarball is broken"
spin "Installing NemoClaw dependencies" npm install --ignore-scripts
spin "Building NemoClaw plugin" bash -lc 'cd nemoclaw && npm install --ignore-scripts && npm run build'
spin "Building NemoClaw plugin" bash -c 'cd nemoclaw && npm install --ignore-scripts && npm run build'
spin "Linking NemoClaw CLI" npm link
else
info "Installing NemoClaw from GitHub…"
Expand All @@ -457,11 +460,11 @@ install_nemoclaw() {
rm -rf "$nemoclaw_src"
mkdir -p "$(dirname "$nemoclaw_src")"
spin "Cloning NemoClaw source" git clone --depth 1 https://github.com/NVIDIA/NemoClaw.git "$nemoclaw_src"
spin "Preparing OpenClaw package" bash -lc "$(declare -f pre_extract_openclaw); pre_extract_openclaw \"\$1\"" _ "$nemoclaw_src" \
spin "Preparing OpenClaw package" bash -c "$(declare -f info warn pre_extract_openclaw); pre_extract_openclaw \"\$1\"" _ "$nemoclaw_src" \
|| warn "Pre-extraction failed — npm install may fail if openclaw tarball is broken"
spin "Installing NemoClaw dependencies" bash -lc "cd \"$nemoclaw_src\" && npm install --ignore-scripts"
spin "Building NemoClaw plugin" bash -lc "cd \"$nemoclaw_src\"/nemoclaw && npm install --ignore-scripts && npm run build"
spin "Linking NemoClaw CLI" bash -lc "cd \"$nemoclaw_src\" && npm link"
spin "Installing NemoClaw dependencies" bash -c "cd \"$nemoclaw_src\" && npm install --ignore-scripts"
spin "Building NemoClaw plugin" bash -c "cd \"$nemoclaw_src\"/nemoclaw && npm install --ignore-scripts && npm run build"
spin "Linking NemoClaw CLI" bash -c "cd \"$nemoclaw_src\" && npm link"
fi

refresh_path
Expand Down
3 changes: 3 additions & 0 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@ else
fi

# Ensure nvm environment is loaded in the current shell.
# Skip if node is already on PATH — sourcing nvm.sh can reset PATH and
# override the caller's node/npm (e.g. in test environments with stubs).
ensure_nvm_loaded() {
command -v node &>/dev/null && return 0
if [ -z "${NVM_DIR:-}" ]; then
export NVM_DIR="$HOME/.nvm"
fi
Expand Down