refactor: rename clawdbot to moltbot with legacy compat

This commit is contained in:
Peter Steinberger
2026-01-27 12:19:58 +00:00
parent 83460df96f
commit 6d16a658e5
1839 changed files with 11250 additions and 11199 deletions

View File

@@ -14,7 +14,7 @@ RUN corepack enable \
&& pnpm install --frozen-lockfile
COPY . .
COPY scripts/docker/cleanup-smoke/run.sh /usr/local/bin/clawdbot-cleanup-smoke
RUN chmod +x /usr/local/bin/clawdbot-cleanup-smoke
COPY scripts/docker/cleanup-smoke/run.sh /usr/local/bin/moltbot-cleanup-smoke
RUN chmod +x /usr/local/bin/moltbot-cleanup-smoke
ENTRYPOINT ["/usr/local/bin/clawdbot-cleanup-smoke"]
ENTRYPOINT ["/usr/local/bin/moltbot-cleanup-smoke"]

View File

@@ -3,8 +3,8 @@ set -euo pipefail
cd /repo
export CLAWDBOT_STATE_DIR="/tmp/clawdbot-test"
export CLAWDBOT_CONFIG_PATH="${CLAWDBOT_STATE_DIR}/clawdbot.json"
export CLAWDBOT_STATE_DIR="/tmp/moltbot-test"
export CLAWDBOT_CONFIG_PATH="${CLAWDBOT_STATE_DIR}/moltbot.json"
echo "==> Seed state"
mkdir -p "${CLAWDBOT_STATE_DIR}/credentials"
@@ -14,7 +14,7 @@ echo 'creds' >"${CLAWDBOT_STATE_DIR}/credentials/marker.txt"
echo 'session' >"${CLAWDBOT_STATE_DIR}/agents/main/sessions/sessions.json"
echo "==> Reset (config+creds+sessions)"
pnpm clawdbot reset --scope config+creds+sessions --yes --non-interactive
pnpm moltbot reset --scope config+creds+sessions --yes --non-interactive
test ! -f "${CLAWDBOT_CONFIG_PATH}"
test ! -d "${CLAWDBOT_STATE_DIR}/credentials"
@@ -25,7 +25,7 @@ mkdir -p "${CLAWDBOT_STATE_DIR}/credentials"
echo '{}' >"${CLAWDBOT_CONFIG_PATH}"
echo "==> Uninstall (state only)"
pnpm clawdbot uninstall --state --yes --non-interactive
pnpm moltbot uninstall --state --yes --non-interactive
test ! -d "${CLAWDBOT_STATE_DIR}"

View File

@@ -8,7 +8,7 @@ RUN apt-get update \
git \
&& rm -rf /var/lib/apt/lists/*
COPY run.sh /usr/local/bin/clawdbot-install-e2e
RUN chmod +x /usr/local/bin/clawdbot-install-e2e
COPY run.sh /usr/local/bin/moltbot-install-e2e
RUN chmod +x /usr/local/bin/moltbot-install-e2e
ENTRYPOINT ["/usr/local/bin/clawdbot-install-e2e"]
ENTRYPOINT ["/usr/local/bin/moltbot-install-e2e"]

View File

@@ -33,9 +33,9 @@ elif [[ "$MODELS_MODE" == "anthropic" && -z "$ANTHROPIC_API_TOKEN" && -z "$ANTHR
fi
echo "==> Resolve npm versions"
EXPECTED_VERSION="$(npm view "clawdbot@${INSTALL_TAG}" version)"
EXPECTED_VERSION="$(npm view "moltbot@${INSTALL_TAG}" version)"
if [[ -z "$EXPECTED_VERSION" || "$EXPECTED_VERSION" == "undefined" || "$EXPECTED_VERSION" == "null" ]]; then
echo "ERROR: unable to resolve clawdbot@${INSTALL_TAG} version" >&2
echo "ERROR: unable to resolve moltbot@${INSTALL_TAG} version" >&2
exit 2
fi
if [[ -n "$E2E_PREVIOUS_VERSION" ]]; then
@@ -43,7 +43,7 @@ if [[ -n "$E2E_PREVIOUS_VERSION" ]]; then
else
PREVIOUS_VERSION="$(node - <<'NODE'
const { execSync } = require("node:child_process");
const versions = JSON.parse(execSync("npm view clawdbot versions --json", { encoding: "utf8" }));
const versions = JSON.parse(execSync("npm view moltbot versions --json", { encoding: "utf8" }));
if (!Array.isArray(versions) || versions.length === 0) process.exit(1);
process.stdout.write(versions.length >= 2 ? versions[versions.length - 2] : versions[0]);
NODE
@@ -55,7 +55,7 @@ if [[ "$SKIP_PREVIOUS" == "1" ]]; then
echo "==> Skip preinstall previous (CLAWDBOT_INSTALL_E2E_SKIP_PREVIOUS=1)"
else
echo "==> Preinstall previous (forces installer upgrade path; avoids read() prompt)"
npm install -g "clawdbot@${PREVIOUS_VERSION}"
npm install -g "moltbot@${PREVIOUS_VERSION}"
fi
echo "==> Run official installer one-liner"
@@ -68,10 +68,10 @@ else
fi
echo "==> Verify installed version"
INSTALLED_VERSION="$(clawdbot --version 2>/dev/null | head -n 1 | tr -d '\r')"
INSTALLED_VERSION="$(moltbot --version 2>/dev/null | head -n 1 | tr -d '\r')"
echo "installed=$INSTALLED_VERSION expected=$EXPECTED_VERSION"
if [[ "$INSTALLED_VERSION" != "$EXPECTED_VERSION" ]]; then
echo "ERROR: expected clawdbot@$EXPECTED_VERSION, got clawdbot@$INSTALLED_VERSION" >&2
echo "ERROR: expected moltbot@$EXPECTED_VERSION, got moltbot@$INSTALLED_VERSION" >&2
exit 1
fi
@@ -80,7 +80,7 @@ set_image_model() {
shift
local candidate
for candidate in "$@"; do
if clawdbot --profile "$profile" models set-image "$candidate" >/dev/null 2>&1; then
if moltbot --profile "$profile" models set-image "$candidate" >/dev/null 2>&1; then
echo "$candidate"
return 0
fi
@@ -94,7 +94,7 @@ set_agent_model() {
local candidate
shift
for candidate in "$@"; do
if clawdbot --profile "$profile" models set "$candidate" >/dev/null 2>&1; then
if moltbot --profile "$profile" models set "$candidate" >/dev/null 2>&1; then
echo "$candidate"
return 0
fi
@@ -177,7 +177,7 @@ run_agent_turn() {
local session_id="$2"
local prompt="$3"
local out_json="$4"
clawdbot --profile "$profile" agent \
moltbot --profile "$profile" agent \
--session-id "$session_id" \
--message "$prompt" \
--thinking off \
@@ -339,7 +339,7 @@ run_profile() {
echo "==> Onboard ($profile)"
if [[ "$agent_model_provider" == "openai" ]]; then
clawdbot --profile "$profile" onboard \
moltbot --profile "$profile" onboard \
--non-interactive \
--accept-risk \
--flow quickstart \
@@ -351,7 +351,7 @@ run_profile() {
--workspace "$workspace" \
--skip-health
elif [[ -n "$ANTHROPIC_API_TOKEN" ]]; then
clawdbot --profile "$profile" onboard \
moltbot --profile "$profile" onboard \
--non-interactive \
--accept-risk \
--flow quickstart \
@@ -364,7 +364,7 @@ run_profile() {
--workspace "$workspace" \
--skip-health
else
clawdbot --profile "$profile" onboard \
moltbot --profile "$profile" onboard \
--non-interactive \
--accept-risk \
--flow quickstart \
@@ -425,7 +425,7 @@ run_profile() {
echo "==> Start gateway ($profile)"
GATEWAY_LOG="$workspace/gateway.log"
clawdbot --profile "$profile" gateway --port "$port" --bind loopback >"$GATEWAY_LOG" 2>&1 &
moltbot --profile "$profile" gateway --port "$port" --bind loopback >"$GATEWAY_LOG" 2>&1 &
GATEWAY_PID="$!"
cleanup_profile() {
if kill -0 "$GATEWAY_PID" 2>/dev/null; then
@@ -437,12 +437,12 @@ run_profile() {
echo "==> Wait for health ($profile)"
for _ in $(seq 1 60); do
if clawdbot --profile "$profile" health --timeout 2000 --json >/dev/null 2>&1; then
if moltbot --profile "$profile" health --timeout 2000 --json >/dev/null 2>&1; then
break
fi
sleep 0.25
done
clawdbot --profile "$profile" health --timeout 10000 --json >/dev/null
moltbot --profile "$profile" health --timeout 10000 --json >/dev/null
echo "==> Agent turns ($profile)"
TURN1_JSON="/tmp/agent-${profile}-1.json"

View File

@@ -23,7 +23,7 @@ WORKDIR /home/app
ENV NPM_CONFIG_FUND=false
ENV NPM_CONFIG_AUDIT=false
COPY run.sh /usr/local/bin/clawdbot-install-nonroot
RUN sudo chmod +x /usr/local/bin/clawdbot-install-nonroot
COPY run.sh /usr/local/bin/moltbot-install-nonroot
RUN sudo chmod +x /usr/local/bin/moltbot-install-nonroot
ENTRYPOINT ["/usr/local/bin/clawdbot-install-nonroot"]
ENTRYPOINT ["/usr/local/bin/moltbot-install-nonroot"]

View File

@@ -18,26 +18,26 @@ export PATH="$HOME/.npm-global/bin:$PATH"
echo "==> Verify git installed"
command -v git >/dev/null
echo "==> Verify clawdbot installed"
echo "==> Verify moltbot installed"
EXPECTED_VERSION="${CLAWDBOT_INSTALL_EXPECT_VERSION:-}"
if [[ -n "$EXPECTED_VERSION" ]]; then
LATEST_VERSION="$EXPECTED_VERSION"
else
LATEST_VERSION="$(npm view clawdbot version)"
LATEST_VERSION="$(npm view moltbot version)"
fi
CMD_PATH="$(command -v clawdbot || true)"
if [[ -z "$CMD_PATH" && -x "$HOME/.npm-global/bin/clawdbot" ]]; then
CMD_PATH="$HOME/.npm-global/bin/clawdbot"
CMD_PATH="$(command -v moltbot || true)"
if [[ -z "$CMD_PATH" && -x "$HOME/.npm-global/bin/moltbot" ]]; then
CMD_PATH="$HOME/.npm-global/bin/moltbot"
fi
if [[ -z "$CMD_PATH" ]]; then
echo "clawdbot not on PATH" >&2
echo "moltbot not on PATH" >&2
exit 1
fi
INSTALLED_VERSION="$("$CMD_PATH" --version 2>/dev/null | head -n 1 | tr -d '\r')"
echo "installed=$INSTALLED_VERSION expected=$LATEST_VERSION"
if [[ "$INSTALLED_VERSION" != "$LATEST_VERSION" ]]; then
echo "ERROR: expected clawdbot@$LATEST_VERSION, got @$INSTALLED_VERSION" >&2
echo "ERROR: expected moltbot@$LATEST_VERSION, got @$INSTALLED_VERSION" >&2
exit 1
fi

View File

@@ -15,7 +15,7 @@ RUN set -eux; \
sudo \
&& rm -rf /var/lib/apt/lists/*
COPY run.sh /usr/local/bin/clawdbot-install-smoke
RUN chmod +x /usr/local/bin/clawdbot-install-smoke
COPY run.sh /usr/local/bin/moltbot-install-smoke
RUN chmod +x /usr/local/bin/moltbot-install-smoke
ENTRYPOINT ["/usr/local/bin/clawdbot-install-smoke"]
ENTRYPOINT ["/usr/local/bin/moltbot-install-smoke"]

View File

@@ -7,10 +7,10 @@ SKIP_PREVIOUS="${CLAWDBOT_INSTALL_SMOKE_SKIP_PREVIOUS:-0}"
echo "==> Resolve npm versions"
if [[ -n "$SMOKE_PREVIOUS_VERSION" ]]; then
LATEST_VERSION="$(npm view clawdbot version)"
LATEST_VERSION="$(npm view moltbot version)"
PREVIOUS_VERSION="$SMOKE_PREVIOUS_VERSION"
else
VERSIONS_JSON="$(npm view clawdbot versions --json)"
VERSIONS_JSON="$(npm view moltbot versions --json)"
versions_line="$(node - <<'NODE'
const raw = process.env.VERSIONS_JSON || "[]";
let versions;
@@ -44,22 +44,22 @@ if [[ "$SKIP_PREVIOUS" == "1" ]]; then
echo "==> Skip preinstall previous (CLAWDBOT_INSTALL_SMOKE_SKIP_PREVIOUS=1)"
else
echo "==> Preinstall previous (forces installer upgrade path)"
npm install -g "clawdbot@${PREVIOUS_VERSION}"
npm install -g "moltbot@${PREVIOUS_VERSION}"
fi
echo "==> Run official installer one-liner"
curl -fsSL "$INSTALL_URL" | bash
echo "==> Verify installed version"
INSTALLED_VERSION="$(clawdbot --version 2>/dev/null | head -n 1 | tr -d '\r')"
INSTALLED_VERSION="$(moltbot --version 2>/dev/null | head -n 1 | tr -d '\r')"
echo "installed=$INSTALLED_VERSION expected=$LATEST_VERSION"
if [[ "$INSTALLED_VERSION" != "$LATEST_VERSION" ]]; then
echo "ERROR: expected clawdbot@$LATEST_VERSION, got clawdbot@$INSTALLED_VERSION" >&2
echo "ERROR: expected moltbot@$LATEST_VERSION, got moltbot@$INSTALLED_VERSION" >&2
exit 1
fi
echo "==> Sanity: CLI runs"
clawdbot --help >/dev/null
moltbot --help >/dev/null
echo "OK"