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

@@ -20,7 +20,7 @@ import {
} from "../commands/onboard-helpers.js";
import { formatCliCommand } from "../cli/command-format.js";
import type { OnboardOptions } from "../commands/onboard-types.js";
import type { ClawdbotConfig } from "../config/config.js";
import type { MoltbotConfig } from "../config/config.js";
import { resolveGatewayService } from "../daemon/service.js";
import { isSystemdUserServiceAvailable } from "../daemon/systemd.js";
import { ensureControlUiAssetsBuilt } from "../infra/control-ui-assets.js";
@@ -37,8 +37,8 @@ import type { WizardPrompter } from "./prompts.js";
type FinalizeOnboardingOptions = {
flow: WizardFlow;
opts: OnboardOptions;
baseConfig: ClawdbotConfig;
nextConfig: ClawdbotConfig;
baseConfig: MoltbotConfig;
nextConfig: MoltbotConfig;
workspaceDir: string;
settings: GatewayWizardSettings;
prompter: WizardPrompter;
@@ -305,9 +305,9 @@ export async function finalizeOnboardingWizard(options: FinalizeOnboardingOption
await prompter.note(
[
"Gateway token: shared auth for the Gateway + Control UI.",
"Stored in: ~/.clawdbot/clawdbot.json (gateway.auth.token) or CLAWDBOT_GATEWAY_TOKEN.",
"Web UI stores a copy in this browser's localStorage (clawdbot.control.settings.v1).",
`Get the tokenized link anytime: ${formatCliCommand("clawdbot dashboard --no-open")}`,
"Stored in: ~/.clawdbot/moltbot.json (gateway.auth.token) or CLAWDBOT_GATEWAY_TOKEN.",
"Web UI stores a copy in this browser's localStorage (moltbot.control.settings.v1).",
`Get the tokenized link anytime: ${formatCliCommand("moltbot dashboard --no-open")}`,
].join("\n"),
"Token",
);
@@ -337,7 +337,7 @@ export async function finalizeOnboardingWizard(options: FinalizeOnboardingOption
if (seededInBackground) {
await prompter.note(
`Web UI seeded in the background. Open later with: ${formatCliCommand(
"clawdbot dashboard --no-open",
"moltbot dashboard --no-open",
)}`,
"Web UI",
);
@@ -364,8 +364,8 @@ export async function finalizeOnboardingWizard(options: FinalizeOnboardingOption
[
`Dashboard link (with token): ${authedUrl}`,
controlUiOpened
? "Opened in your browser. Keep that tab to control Clawdbot."
: "Copy/paste this URL in a browser on this machine to control Clawdbot.",
? "Opened in your browser. Keep that tab to control Moltbot."
: "Copy/paste this URL in a browser on this machine to control Moltbot.",
controlUiOpenHint,
]
.filter(Boolean)
@@ -374,7 +374,7 @@ export async function finalizeOnboardingWizard(options: FinalizeOnboardingOption
);
} else {
await prompter.note(
`When you're ready: ${formatCliCommand("clawdbot dashboard --no-open")}`,
`When you're ready: ${formatCliCommand("moltbot dashboard --no-open")}`,
"Later",
);
}
@@ -422,8 +422,8 @@ export async function finalizeOnboardingWizard(options: FinalizeOnboardingOption
[
`Dashboard link (with token): ${authedUrl}`,
controlUiOpened
? "Opened in your browser. Keep that tab to control Clawdbot."
: "Copy/paste this URL in a browser on this machine to control Clawdbot.",
? "Opened in your browser. Keep that tab to control Moltbot."
: "Copy/paste this URL in a browser on this machine to control Moltbot.",
controlUiOpenHint,
]
.filter(Boolean)
@@ -448,10 +448,10 @@ export async function finalizeOnboardingWizard(options: FinalizeOnboardingOption
: [
"If you want your agent to be able to search the web, youll need an API key.",
"",
"Clawdbot uses Brave Search for the `web_search` tool. Without a Brave Search API key, web search wont work.",
"Moltbot uses Brave Search for the `web_search` tool. Without a Brave Search API key, web search wont work.",
"",
"Set it up interactively:",
`- Run: ${formatCliCommand("clawdbot configure --section web")}`,
`- Run: ${formatCliCommand("moltbot configure --section web")}`,
"- Enable web_search and paste your Brave Search API key",
"",
"Alternative: set BRAVE_API_KEY in the Gateway environment (no config changes).",
@@ -467,9 +467,9 @@ export async function finalizeOnboardingWizard(options: FinalizeOnboardingOption
await prompter.outro(
controlUiOpened
? "Onboarding complete. Dashboard opened with your token; keep that tab to control Clawdbot."
? "Onboarding complete. Dashboard opened with your token; keep that tab to control Moltbot."
: seededInBackground
? "Onboarding complete. Web UI seeded in the background; open it anytime with the tokenized link above."
: "Onboarding complete. Use the tokenized dashboard link above to control Clawdbot.",
: "Onboarding complete. Use the tokenized dashboard link above to control Moltbot.",
);
}

View File

@@ -1,6 +1,6 @@
import { randomToken } from "../commands/onboard-helpers.js";
import type { GatewayAuthChoice } from "../commands/onboard-types.js";
import type { ClawdbotConfig } from "../config/config.js";
import type { MoltbotConfig } from "../config/config.js";
import { findTailscaleBinary } from "../infra/tailscale.js";
import type { RuntimeEnv } from "../runtime.js";
import type {
@@ -12,8 +12,8 @@ import type { WizardPrompter } from "./prompts.js";
type ConfigureGatewayOptions = {
flow: WizardFlow;
baseConfig: ClawdbotConfig;
nextConfig: ClawdbotConfig;
baseConfig: MoltbotConfig;
nextConfig: MoltbotConfig;
localPort: number;
quickstartGateway: QuickstartGatewayDefaults;
prompter: WizardPrompter;
@@ -21,7 +21,7 @@ type ConfigureGatewayOptions = {
};
type ConfigureGatewayResult = {
nextConfig: ClawdbotConfig;
nextConfig: MoltbotConfig;
settings: GatewayWizardSettings;
};

View File

@@ -77,7 +77,7 @@ vi.mock("../tui/tui.js", () => ({
describe("runOnboardingWizard", () => {
it("exits when config is invalid", async () => {
readConfigFileSnapshot.mockResolvedValueOnce({
path: "/tmp/.clawdbot/clawdbot.json",
path: "/tmp/.clawdbot/moltbot.json",
exists: true,
raw: "{}",
parsed: {},
@@ -174,7 +174,7 @@ describe("runOnboardingWizard", () => {
it("launches TUI without auto-delivery when hatching", async () => {
runTui.mockClear();
const workspaceDir = await fs.mkdtemp(path.join(os.tmpdir(), "clawdbot-onboard-"));
const workspaceDir = await fs.mkdtemp(path.join(os.tmpdir(), "moltbot-onboard-"));
await fs.writeFile(path.join(workspaceDir, DEFAULT_BOOTSTRAP_FILENAME), "{}");
const select: WizardPrompter["select"] = vi.fn(async (opts) => {
@@ -230,7 +230,7 @@ describe("runOnboardingWizard", () => {
it("offers TUI hatch even without BOOTSTRAP.md", async () => {
runTui.mockClear();
const workspaceDir = await fs.mkdtemp(path.join(os.tmpdir(), "clawdbot-onboard-"));
const workspaceDir = await fs.mkdtemp(path.join(os.tmpdir(), "moltbot-onboard-"));
const select: WizardPrompter["select"] = vi.fn(async (opts) => {
if (opts.message === "How do you want to hatch your bot?") return "tui";

View File

@@ -27,7 +27,7 @@ import type {
ResetScope,
} from "../commands/onboard-types.js";
import { formatCliCommand } from "../cli/command-format.js";
import type { ClawdbotConfig } from "../config/config.js";
import type { MoltbotConfig } from "../config/config.js";
import {
DEFAULT_GATEWAY_PORT,
readConfigFileSnapshot,
@@ -53,11 +53,11 @@ async function requireRiskAcknowledgement(params: {
[
"Security warning — please read.",
"",
"Clawdbot is a hobby project and still in beta. Expect sharp edges.",
"Moltbot is a hobby project and still in beta. Expect sharp edges.",
"This bot can read files and run actions if tools are enabled.",
"A bad prompt can trick it into doing unsafe things.",
"",
"If youre not comfortable with basic security and access control, dont run Clawdbot.",
"If youre not comfortable with basic security and access control, dont run Moltbot.",
"Ask someone experienced to help before enabling tools or exposing it to the internet.",
"",
"Recommended baseline:",
@@ -67,8 +67,8 @@ async function requireRiskAcknowledgement(params: {
"- Use the strongest available model for any bot with tools or untrusted inboxes.",
"",
"Run regularly:",
"clawdbot security audit --deep",
"clawdbot security audit --fix",
"moltbot security audit --deep",
"moltbot security audit --fix",
"",
"Must read: https://docs.molt.bot/gateway/security",
].join("\n"),
@@ -90,11 +90,11 @@ export async function runOnboardingWizard(
prompter: WizardPrompter,
) {
printWizardHeader(runtime);
await prompter.intro("Clawdbot onboarding");
await prompter.intro("Moltbot onboarding");
await requireRiskAcknowledgement({ opts, prompter });
const snapshot = await readConfigFileSnapshot();
let baseConfig: ClawdbotConfig = snapshot.valid ? snapshot.config : {};
let baseConfig: MoltbotConfig = snapshot.valid ? snapshot.config : {};
if (snapshot.exists && !snapshot.valid) {
await prompter.note(summarizeExistingConfig(baseConfig), "Invalid config");
@@ -109,13 +109,13 @@ export async function runOnboardingWizard(
);
}
await prompter.outro(
`Config invalid. Run \`${formatCliCommand("clawdbot doctor")}\` to repair it, then re-run onboarding.`,
`Config invalid. Run \`${formatCliCommand("moltbot doctor")}\` to repair it, then re-run onboarding.`,
);
runtime.exit(1);
return;
}
const quickstartHint = `Configure details later via ${formatCliCommand("clawdbot configure")}.`;
const quickstartHint = `Configure details later via ${formatCliCommand("moltbot configure")}.`;
const manualHint = "Configure port, network, Tailscale, and auth options.";
const explicitFlowRaw = opts.flow?.trim();
const normalizedExplicitFlow = explicitFlowRaw === "manual" ? "advanced" : explicitFlowRaw;
@@ -335,7 +335,7 @@ export async function runOnboardingWizard(
const workspaceDir = resolveUserPath(workspaceInput.trim() || DEFAULT_WORKSPACE);
let nextConfig: ClawdbotConfig = {
let nextConfig: MoltbotConfig = {
...baseConfig,
agents: {
...baseConfig.agents,